Elvas Tower: C++ programmers, please read - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

C++ programmers, please read Rate Topic: -----

#1 User is offline   ChrisD 

  • Hostler
  • Group: Status: Active Member
  • Posts: 78
  • Joined: 19-March 13
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 08 May 2013 - 06:24 AM

Surely a lot of You have seen this before:

Error: System.IO.InvalidDataException: ShapeIndex not found

The first line in an Error Message that stopped OR in its tracks and asked for Your help to report the bug.

But this time I am convinced that the fault is mine. I know for sure that some shape-file is missing somewhere or one is faulty, and this is where I need Your help.

The OR team is quite busy, so I do not think I can ask them to add a line to the error-message stating what shape-file the program could not find.

I have seen examples where other proficient programmers had made a mod to the source code in order to show their point in some discussions.

I know that the OR Team are the only ones to publish code, so what I want is You to show me where to patch the runactivity code and with what to patch it.

Then I can make a "debug" version, just for me, which is OK, as far as I know.

Can anybody help?

ChrisD

#2 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 08 May 2013 - 08:40 AM

 ChrisD, on 08 May 2013 - 06:24 AM, said:

The OR team is quite busy, so I do not think I can ask them to add a line to the error-message stating what shape-file the program could not find.


Actually, you can. :jawdrop2:

Two things to remember about Open Rails when it reports data/user errors:
  • It must not crash/terminate unless it is an absolutely critical problem.
  • It must provide you, or the route creator, with enough information to identify the problem with reasonable accuracy.


In this case, we've failed on both parts, it appears. Please could you attach a log file and tell us which route and activity you were running. If we need to make a modification to a route to get this error, please describe the modification.

Thanks.

#3 User is offline   ChrisD 

  • Hostler
  • Group: Status: Active Member
  • Posts: 78
  • Joined: 19-March 13
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 08 May 2013 - 10:32 AM

 James Ross, on 08 May 2013 - 08:40 AM, said:

Actually, you can. :)

Two things to remember about Open Rails when it reports data/user errors:
  • It must not crash/terminate unless it is an absolutely critical problem.
  • It must provide you, or the route creator, with enough information to identify the problem with reasonable accuracy.


In this case, we've failed on both parts, it appears. Please could you attach a log file and tell us which route and activity you were running. If we need to make a modification to a route to get this error, please describe the modification.

Thanks.


Thank You James ;)

My computer refuses forcefully to run MSTS (Radeon HD7970 Catalyst 13.1 reports No Hardware Accelleration??), so I rely solely on OR ;)

Before I report a bug, I have to transfer the entire install to my laptop and check everything carefully to verify that the install indeed functions in MSTS.
This is very tedious and time consuming, so this procedure is my very last resort.

So, when a route loads some explorer sessions OK and crashes on others, I prefer to do some checking myself.

The complete error message:

Error: System.IO.InvalidDataException: ShapeIndex not found
at MSTS.TrackShapes.Get(UInt32 targetShapeIndex)
at ORTS.Debugging.SwitchWidget..ctor(TrackNode item)
at ORTS.Debugging.DispatchViewer.InitData()
at ORTS.Debugging.DispatchViewer..ctor(Simulator simulator, Viewer3D viewer)
at ORTS.Program.Start(UserSettings settings, String[] args)
at ORTS.Program.<>c__DisplayClass6.<Main>b__3()
at ORTS.Program.Main(String[] args)


I try to figure out how You can find the faulty Shapefile from this info, but until now I have failed completely.

If You have to download the Route to Your computer in order to track down the problem, I must be 110% sure that the error is not mine.

I hope You can see my dilemma. :D


If You could provide me with a debug version of OR that gives the extra info, I would be grateful. :)


As a last resort, I will of course provide You a bug report with all info attatched.

Until then, thank You for a great Program. :)

ChrisD

#4 User is offline   Stefan PAITONI 

  • Fireman
  • Group: Status: Active Member
  • Posts: 118
  • Joined: 26-February 13
  • Gender:Male
  • Location:Belgium,
  • Simulator:MSTS & OR
  • Country:

Posted 08 May 2013 - 11:04 AM

Hello,
What is the route you try to run ?
Is it accessible somewhere ?

Maybe you can try to make your own version with debug!

Stef

#5 User is offline   ChrisD 

  • Hostler
  • Group: Status: Active Member
  • Posts: 78
  • Joined: 19-March 13
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 08 May 2013 - 12:12 PM

Hi Stef.

I am not ready to blame any specific route, until I am absolutely sure that I am not the one to blame.

Please, bear with me, but I really hope that James or somebody else can/will provide me with the code needed to get this extra info out of the Error Reporter.


With this in my hand, I will be able to do some serious tracing and hopefully nail the culprit without having to report a bug.


I will tell You when and If I get any the wiser :)

Thanks for Your interest

ChrisD

#6 User is offline   ChrisD 

  • Hostler
  • Group: Status: Active Member
  • Posts: 78
  • Joined: 19-March 13
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 09 May 2013 - 01:45 AM

New development.

It seems that M$ had decided to terminate my Visual C Studio trial.

After providing M$ with Name, Residence, DOB, Birthplace, Creditcardinfo (no just kidding) I got my Visual Studio back. :)

This enhanced the Error message:

Error: System.IO.InvalidDataException: ShapeIndex not found
at MSTS.TrackShapes.Get(UInt32 targetShapeIndex) in P:\I\OR-1600\Source\MSTS\TSectionDat.cs:line 248
at ORTS.Debugging.SwitchWidget..ctor(TrackNode item) in P:\I\OR-1600\Source\RunActivity\Debugging\DebugViewerForm.cs:line 2402
at ORTS.Debugging.DispatchViewer.InitData() in P:\I\OR-1600\Source\RunActivity\Debugging\DebugViewerForm.cs:line 311
at ORTS.Debugging.DispatchViewer..ctor(Simulator simulator, Viewer3D viewer) in P:\I\OR-1600\Source\RunActivity\Debugging\DebugViewerForm.cs:line 168
at ORTS.Program.Start(UserSettings settings, String[] args) in P:\I\OR-1600\Source\RunActivity\_Main.cs:line 216
at ORTS.Program.<>c__DisplayClass6.<Main>b__3() in P:\I\OR-1600\Source\RunActivity\_Main.cs:line 100
at ORTS.Program.Main(String[] args) in P:\I\OR-1600\Source\RunActivity\_Main.cs:line 139


This will certainly help the programmers, but it does not help me. :thumbup3:

All refs are to the program code, not the faulty Shapefile.

So, I still plea for help.

ChrisD

#7 User is offline   Stefan PAITONI 

  • Fireman
  • Group: Status: Active Member
  • Posts: 118
  • Joined: 26-February 13
  • Gender:Male
  • Location:Belgium,
  • Simulator:MSTS & OR
  • Country:

Posted 09 May 2013 - 09:32 AM

OKi,
You got it..
Can you load the sources and open the 'RunActivity.csproj' project with Visual ?
If so, can you visualise the 'Solution Explorer', and than the 'RunActivity' section ?
In this section (expand it with the plus sign), you have a folder named 'MSTS' that you can expand.
Double click on the file 'TSectionDAT.cs' to open it. Go to the line given in the exception (248). That's where you display the error.
Now, the best is to start debugging your Project with a breakpoint at the first line of the function, but you have to define a route to test and that's the tricky thing.

Can you go so far ?

Stef

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users