Comment 8 for bug 1473986

Revision history for this message
Carlo Santucci (carlosanit1) wrote : Re: System.IndexOutOfRangeException at ORTS.Viewer3D.WorldSounds.GetTType

Now I remember the error that the route has. Within a .ws file there is this SoundRegion:
 Soundregion (
  SoundregionRoty ( -3.07446 )
  SoundregionTrackType ( 0 )
  TrItemId ( 0 10097 )
  TrItemId ( 0 10089 )
  TrItemId ( 0 10096 )
  TrItemId ( 0 10095 )
  TrItemId ( 0 10094 )
  TrItemId ( 0 10093 )
  TrItemId ( 0 10092 )
  TrItemId ( 0 10091 )
  TrItemId ( 0 10090 )
  TrItemId ( 0 10057 )
  TrItemId ( 0 10058 )
  TrItemId ( 0 10088 )
  UiD ( 100018 )
  FileName ( IMRegionPoint.s )
  StaticFlags ( 00100000 )
  Position ( -305.08 1.88123 -448.427 )
  QDirection ( 0 0.999437 0 0.0335603 )
  VDbId ( 4294967295 )
 )

however the TrackItem with higher number in the route is 10088, and this leads to the crash. So the route has incoherent files.
Inserting a check would not be difficult, however the check should be inserted in a big loop that is run very frequently, only to catch this case (and maybe few others of other faulty routes), that anyhow should be corrected at route file level. So my opinion is not to fix this.