System.NullReferenceException at ORTS.LightDrawer.UpdateState (X1743)

Bug #1222160 reported by Carlo Santucci
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Rails
Fix Released
Undecided
Peter Gulyas

Bug Description

Running an activity with many AI trains quite at the end of the activity I have got the above crash error.
Logfile attached.

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

This error didn't appear in old versions (I don't know from which version the error appears.

Revision history for this message
Dennis A T (dennisat) wrote :

I have exactly the same problem with Dorset Coast Route under X1743. Below is the trace portion of my log which contains the line numbers of the source code at the time of the failure:

Error: System.NullReferenceException: Object reference not set to an instance of an object.
   at ORTS.LightDrawer.UpdateState() in D:\Open Rails\Source\Source\RunActivity\Viewer3D\Lights.cs:line 465
   at ORTS.LightDrawer.PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) in D:\Open Rails\Source\Source\RunActivity\Viewer3D\Lights.cs:line 385
   at ORTS.TrainDrawer.PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) in D:\Open Rails\Source\Source\RunActivity\Viewer3D\Trains.cs:line 124
   at ORTS.World.PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) in D:\Open Rails\Source\Source\RunActivity\Viewer3D\World.cs:line 150
   at ORTS.Viewer3D.Update(Single elapsedRealTime, RenderFrame frame) in D:\Open Rails\Source\Source\RunActivity\Viewer3D\- Viewer3D.cs:line 591
   at ORTS.UpdaterProcess.Update() in D:\Open Rails\Source\Source\RunActivity\Processes\UpdaterProcess.cs:line 159
   at ORTS.UpdaterProcess.DoUpdate() in D:\Open Rails\Source\Source\RunActivity\Processes\UpdaterProcess.cs:line 115
   at ORTS.UpdaterProcess.UpdaterThread() in D:\Open Rails\Source\Source\RunActivity\Processes\UpdaterProcess.cs:line 79
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Revision history for this message
Peter Gulyas (pzgulyas) wrote :

Tried to fix in r1749. Could you please make a test?

Changed in or:
assignee: nobody → Peter Gulyas (pzgulyas)
status: New → In Progress
Revision history for this message
Carlo Santucci (carlosanit1) wrote :

I didn't get the crash any more. I hope Dennis will test too. Thanks Peter!

Revision history for this message
Dennis A T (dennisat) wrote :

I will get the new version and run the test today, I hope.

Revision history for this message
Dennis A T (dennisat) wrote :

I've checked the activity with X1750 and the error has been cleared.

Thank you for your efforts.

Revision history for this message
Peter Gulyas (pzgulyas) wrote :

You are welcome! :)

Changed in or:
status: In Progress → Fix Committed
James Ross (twpol)
Changed in or:
milestone: none → 1.0
James Ross (twpol)
summary: - x1743: System.NullReferenceException in ORTS.LightDrawer.UpdateState()
+ System.NullReferenceException at ORTS.LightDrawer.UpdateState (X1743)
James Ross (twpol)
tags: added: crash
tags: added: 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.

Other bug subscribers

Remote bug watches

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