System.IndexOutOfRangeException at ORTS.Viewer3D.WorldSounds.GetTType (X3194)

Bug #1473986 reported by traindriver300
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Open Rails
Fix Released
Medium
James Ross

Bug Description

Hi.
When i'm playing in some routes, i have this crash:
"Index is over the matrix limit"
i attach what is written in the log file, and how can i fix this bug?

Error: System.IndexOutOfRangeException: Indice oltre i limiti della matrice.
   in ORTS.Viewer3D.WorldSounds.GetTType(Train train) in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Sound.cs:riga 2058
   in ORTS.Viewer3D.TrackSoundSource.UpdateTType() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Sound.cs:riga 188
   in ORTS.Viewer3D.TrackSoundSource.Update() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Sound.cs:riga 257
   in ORTS.SoundProcess.Sound() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Processes\SoundProcess.cs:riga 130
   in ORTS.SoundProcess.DoSound() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Processes\SoundProcess.cs:riga 114
   in ORTS.SoundProcess.SoundThread() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Processes\SoundProcess.cs:riga 98
   in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   in System.Threading.ThreadHelper.ThreadStart()

Information: Game.PopState()

Tags: crash sounds
James Ross (twpol)
summary: - "index is over the matrix limit"
+ System.IndexOutOfRangeException at ORTS.Viewer3D.WorldSounds.GetTType
tags: added: crash graphics
Changed in or:
status: New → Triaged
Revision history for this message
Carlo Santucci (carlosanit1) wrote : Re: System.IndexOutOfRangeException at ORTS.Viewer3D.WorldSounds.GetTType

It's better if you attach the complete logfile.

tags: added: sounds
Revision history for this message
traindriver300 (eurostar9433) wrote : RE: [Bug 1473986] Re: System.IndexOutOfRangeException at ORTS.Viewer3D.WorldSounds.GetTType

thank you. now i attack the log file with the crash

> Date: Wed, 15 Jul 2015 16:35:16 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 1473986] Re: System.IndexOutOfRangeException at ORTS.Viewer3D.WorldSounds.GetTType
>
> It's better if you attach the complete logfile.
>
> ** Tags added: sounds
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1473986
>
> Title:
> System.IndexOutOfRangeException at ORTS.Viewer3D.WorldSounds.GetTType
>
> Status in Open Rails:
> Triaged
>
> Bug description:
> Hi.
> When i'm playing in some routes, i have this crash:
> "Index is over the matrix limit"
> i attach what is written in the log file, and how can i fix this bug?
>
> Error: System.IndexOutOfRangeException: Indice oltre i limiti della matrice.
> in ORTS.Viewer3D.WorldSounds.GetTType(Train train) in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Sound.cs:riga 2058
> in ORTS.Viewer3D.TrackSoundSource.UpdateTType() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Sound.cs:riga 188
> in ORTS.Viewer3D.TrackSoundSource.Update() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Sound.cs:riga 257
> in ORTS.SoundProcess.Sound() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Processes\SoundProcess.cs:riga 130
> in ORTS.SoundProcess.DoSound() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Processes\SoundProcess.cs:riga 114
> in ORTS.SoundProcess.SoundThread() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Processes\SoundProcess.cs:riga 98
> in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
> in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> in System.Threading.ThreadHelper.ThreadStart()
>
>
> Information: Game.PopState()
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/or/+bug/1473986/+subscriptions

Revision history for this message
traindriver300 (eurostar9433) wrote : Re: System.IndexOutOfRangeException at ORTS.Viewer3D.WorldSounds.GetTType

this is the complete log file.

Revision history for this message
Carlo Santucci (carlosanit1) wrote :

Can you please attach file LP - ESCity 9803 - P1 - player.pat ?
Near what station does the crash occur?

Revision history for this message
traindriver300 (eurostar9433) wrote :

I have crash only between Milano Centrale and Milano Rogoredo station.
I send You the patch, but any patch that i use i have crashes bweteen these 2 stations.
Sorry for my bad english...

Revision history for this message
traindriver300 (eurostar9433) wrote :

And then, i have crash in Italia 23 towards Verona Porta Nuova and Sommacampagna - Sona and throughout the route Sicily 1.....

Revision history for this message
Carlo Santucci (carlosanit1) wrote :

traindriver, if you have other crashes please always attach the logfile, and if the crashes are different open new bug reports.
I have no errors in Sicilia1.

Referring to Italia13 you should find the solution to your problem here
http://www.trainsimhobby.net/forum/viewtopic.php?f=33&t=14104&hilit=Italia13&start=15#p343323

however I will try to make a change in the OR code to avoid the crash.

Revision history for this message
Carlo Santucci (carlosanit1) wrote :

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.

Revision history for this message
Carlo Santucci (carlosanit1) wrote :

I suggest to James to mark this as "Won't fix". I have not the privileges to do that.

Revision history for this message
traindriver300 (eurostar9433) wrote : RE: [Bug 1473986] Re: System.IndexOutOfRangeException at ORTS.Viewer3D.WorldSounds.GetTType

Thank You, so how i can fix this problem?

> Date: Fri, 17 Jul 2015 16:18:53 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 1473986] Re: System.IndexOutOfRangeException at ORTS.Viewer3D.WorldSounds.GetTType
>
> I suggest to James to mark this as "Won't fix". I have not the
> privileges to do that.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1473986
>
> Title:
> System.IndexOutOfRangeException at ORTS.Viewer3D.WorldSounds.GetTType
>
> Status in Open Rails:
> Triaged
>
> Bug description:
> Hi.
> When i'm playing in some routes, i have this crash:
> "Index is over the matrix limit"
> i attach what is written in the log file, and how can i fix this bug?
>
> Error: System.IndexOutOfRangeException: Indice oltre i limiti della matrice.
> in ORTS.Viewer3D.WorldSounds.GetTType(Train train) in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Sound.cs:riga 2058
> in ORTS.Viewer3D.TrackSoundSource.UpdateTType() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Sound.cs:riga 188
> in ORTS.Viewer3D.TrackSoundSource.Update() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Sound.cs:riga 257
> in ORTS.SoundProcess.Sound() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Processes\SoundProcess.cs:riga 130
> in ORTS.SoundProcess.DoSound() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Processes\SoundProcess.cs:riga 114
> in ORTS.SoundProcess.SoundThread() in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Processes\SoundProcess.cs:riga 98
> in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
> in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> in System.Threading.ThreadHelper.ThreadStart()
>
>
> Information: Game.PopState()
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/or/+bug/1473986/+subscriptions

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

thank you, now i don't have any problems, but in italia23 and sicilia1 i have the same problems, tomorrow i'll attach the logs files

Revision history for this message
traindriver300 (eurostar9433) wrote :

Hi. This is the log where i have the same problems in sicilia 1

Revision history for this message
traindriver300 (eurostar9433) wrote :

and this is the path

Revision history for this message
Carlo Santucci (carlosanit1) wrote :

As this is again a problem on the route, I suggest you to open a post on the Trainsimhobby forum, where maybe someone will find out what has to be changed in the route.

Revision history for this message
traindriver300 (eurostar9433) wrote :

i've seen, the problem is already solved; the guide is in this page http://www.trainsimhobby.net/forum/viewtopic.php?f=33&t=14484&hilit=sicilia+1

James Ross (twpol)
summary: System.IndexOutOfRangeException at ORTS.Viewer3D.WorldSounds.GetTType
+ (X3194)
Revision history for this message
James Ross (twpol) wrote :

Fixed in X3799.

Changed in or:
assignee: nobody → James Ross (twpol)
importance: Undecided → Low
importance: Low → Medium
status: Triaged → In Progress
milestone: none → 1.3
status: In Progress → Fix Committed
Derek Morton (derek-a)
Changed in or:
status: Fix Committed → Fix Released
James Ross (twpol)
Changed in or:
status: Fix Released → Fix Committed
James Ross (twpol)
tags: removed: graphics
James Ross (twpol)
Changed in or:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.