Elvas Tower: Crash Taking Screenshot with Printscreen - Elvas Tower

Jump to content

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

Crash Taking Screenshot with Printscreen Inconsistent to Reproduce Rate Topic: -----

#1 User is offline   pschlik 

  • Conductor
  • Group: Status: Active Member
  • Posts: 352
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 27 April 2024 - 09:08 AM

Got a crash trying to take a screenshot, appears Viewer3D wanted to change a popup message but something went wrong.

Error: System.NullReferenceException: Object reference not set to an instance of an object.
   at Orts.Viewer3D.Popups.MessagesWindow.PrepareFrame(ElapsedTime elapsedTime, Boolean updateFull) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Popups\MessagesWindow.cs:line 142
   at Orts.Viewer3D.Popups.Window.PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime, Boolean updateFull) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Popups\Window.cs:line 236
   at Orts.Viewer3D.Popups.WindowManager.PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Popups\WindowManager.cs:line 229
   at Orts.Viewer3D.Viewer.Update(RenderFrame frame, Single elapsedRealTime) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Viewer.cs:line 906
   at Orts.Viewer3D.Processes.GameStateViewer3D.Update(RenderFrame frame, Double totalRealSeconds) in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\GameStateViewer3D.cs:line 126
   at Orts.Viewer3D.Processes.UpdaterProcess.Update() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\UpdaterProcess.cs:line 131
   at Orts.Viewer3D.Processes.UpdaterProcess.DoUpdate() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\UpdaterProcess.cs:line 108
   at Orts.Viewer3D.Processes.UpdaterProcess.UpdaterThread() in C:\Jenkins\jobs\Open Rails Unstable\workspace\Source\RunActivity\Viewer3D\Processes\UpdaterProcess.cs:line 74
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()



The offending line of code is related to setting the transparency of the message, but this code hasn't been touched in years.
                message.LabelShadow.Color.A = message.LabelText.Color.A = (byte)MathHelper.Lerp(255, 0, MathHelper.Clamp((float)((Owner.Viewer.Simulator.GameTime - message.EndTime) / FadeTime), 0, 1));

Of course, I cannot get this crash to happen consistently, and I didn't have a debugger attached so I'm not sure which of these variables was actually Null.


Attached File  OpenRailsLog.txt (16.1K)
Number of downloads: 10

#2 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,999
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 27 April 2024 - 09:15 AM

Hello.
I thought, it was just windows-protected folder's issue.
Just Prt Sc keypress causes crash for year, or so...
Shift+PrintScreen, then Ctrl+V into image editor works for me.
I don't like huge *.PNG images, stored far in user's subfolder, so I don't use Prt Sc barely.
But unexperienced users would suffer with that.

#3 User is offline   ExRail 

  • Fireman
  • Group: Status: Active Member
  • Posts: 174
  • Joined: 31-December 21
  • Gender:Male
  • Simulator:ORNYMG
  • Country:

Posted 01 May 2024 - 08:08 AM

Since I've been screen shooting like cracy I've had a bunch of crashes, and I've started to delete TakeShot.wav to see if that had any effect,
Since it often sound like It's delayed and is slow loading or something, but not sure yet.

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