Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi gents,

I am using this function in VB.NET but on one client with P3Dv4 it crashed with "Index and length must refer to a location within the string. (Parameter 'length')"
The function I am using is

Try
    If FSUIPCConnection.IsOpen = False Then
    	FSUIPCConnection.Open()
        FSUIPCConnection.AirportsDatabase.Load()                
    Else
        FSUIPCConnection.Process()                
    End If
Catch ex As Exception
    MsgBox(ex.Message.toString)
End Try

It is running great on other PCs with P3Dv5.

FSUIPCClient.dll Version 3.2.21.391

Any ideas?

Regards,
Peter

Posted

Hi Peter,

The problem is going to be specific to your user's scenery (e.g. third party airports etc). Maybe one of the airports has a strange character in the name, or a missing runway number or something.

The easiest way to solve this is if I could get the MakeRunways output files from the user's computer. I could then run the load() here and see what's causing the problem. I'll be able to put a check or workaround in my code to stop it crashing.

I'll need:

Runways.xml
F5.csv
R5.csv
G5.csv
Helipads.csv
T5.csv

If your user is not willing to send these to you then I'll come up with another plan.

Paul

  • Thanks 1
Posted

Thanks for the files.

The problem was the user has an airport with an ICAO code of "0". My code assumed 3 or 4 characters.

I've fixed this in version 3.2.25, now available on NuGet. Any length of ICAO is now supported.

Paul

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.