System.IndexOutOfRangeException: Index was outside the bounds of the array. ???

Hello

I have a strange bug, that leads to, that I can not open my project any more.

Before this error-message came, I copied a road shape and tried to paste it to another track.
Then BTB crashed and gave me that message.

I give you the whole message:

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at BobsBits.SurfaceMaterial.SetMaterialPositions(SurfaceShape& loSS)
at BobsBits.SurfaceMaterials.SetMaterialPositions(SurfaceShape& loSS)
at BobsBits.Track.SetStartPositions()
at BobsBits.Track.Calculate(Boolean UsingPointCloud)
at BobsBits.Venue.CalculateTracks(Boolean UsingPointCloud)
at BobsBits.Venue.LoadFromBinary(String ProjectFolder, String Filename, Boolean ForAnUndo, String& ErrorMessage)
at BobsTrackBuilder.frmMain.(String , String , Boolean )
at BobsTrackBuilder.frmMain.(Object , EventArgs )
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItem.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Command.DispatchID(Int32 id)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I hope theres any way I can solve this problem, because I worked very long on this project! :frown:
 
In the btb folder in program files there is a 'Temporary Files' directory, open the folder, sort them by date modified and copy the most recent ones and paste them into another directory in 'My Documents' somewhere (you do this because btb deletes these files at times, this way you have them forever.) Check the file size of your current project, then look at the backup files for the most recent one and look at the file size, one will be very close to the current project, that will be the most recent backed up one. Rename your current project to 'venue.bin.old then rename the backed up file you found to 'venue.bin' start btb and try load it up. You will lose the most recent work you did, but you wont lose the whole project. [ED] from now on, every day you start to work on your project, save a back up. You can keep the same single back up project to save space (best to keep about 3 backed up projects) and just overwrite them each time. But remember to close the project once you have saved a back up and reopen the actual project, otherwise you will be working on the backed up project and not the actual project.
 
Thanks for that. But I know about this. But there's only 1 file in the temp-directory which belongs to another project on which i worked some days ago. Nothing for THIS project there.

I have done some backups. But I've done some big improvements today and have not done a backup today. Shame!

Is there no way to edit the Venue.bin file?
 
I don't think you will be able to edit the venue.bin file, I'd say it's possible, but you'd need to be a software engineer to figure it out. Do you have windows 7 or maybe vista does it too, try looking for previous versions of the file?
 
I don't think you will be able to edit the venue.bin file, I'd say it's possible, but you'd need to be a software engineer to figure it out. Do you have windows 7 or maybe vista does it too, try looking for previous versions of the file?

Well, I have figured it out. I found the part in the venue.bin, which caused the error. I just replaced the wrong Surface1 of my newest track with an Surface from another version of the project. It went well and now I can continue work. The only thing I had to do in BTB was, to set the Material of the Surface of the track from Trees to Tarmac :D
 

Latest News

How long have you been simracing

  • < 1 year

    Votes: 309 15.5%
  • < 2 years

    Votes: 212 10.6%
  • < 3 years

    Votes: 204 10.2%
  • < 4 years

    Votes: 156 7.8%
  • < 5 years

    Votes: 271 13.6%
  • < 10 years

    Votes: 232 11.6%
  • < 15 years

    Votes: 150 7.5%
  • < 20 years

    Votes: 118 5.9%
  • < 25 years

    Votes: 89 4.5%
  • Ok, I am a dinosaur

    Votes: 257 12.9%
Back
Top