Author Topic: Program unhandled error on file save, v3.18  (Read 4933 times)

soo_gp9

  • New Member
  • *
  • Posts: 2
Program unhandled error on file save, v3.18
« on: January 26, 2015, 07:02:43 PM »
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at fi.a(hu A_0, a7 A_1, a7 A_2, a7 A_3, a7 A_4, a7 A_5, a7 A_6, ix A_7, f3 A_8, f3 A_9)
   at bo..ctor(fi A_0)
   at g4..ctor(du A_0)
   at ek..ctor(du A_0)
   at jq.a(String& A_0, Boolean A_1)
   at jq.h(Object A_0, EventArgs A_1)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8009 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
ctc
    Assembly Version: 3.18.0.0
    Win32 Version: 3.18.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/WebRailRoader/CTC/ctc.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8008 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8009 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8007 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8007 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8009 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8012 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8007 (FX35W81RTMGDR.050727-8000)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

DPump

  • Administrator
  • Full Member
  • *****
  • Posts: 215
Re: Program unhandled error on file save, v3.18
« Reply #1 on: January 27, 2015, 11:26:08 AM »
Thanks for your report.

The stack trace indicates that there is something wrong with a particular message that is to be saved as part of the whole game data. Messages are generated when e.g. one of your virtual train engineers wants to call you to talk about a problem he has at this moment.

The null reference apparently points to a parameter identifying caller, e.g. the train, by its key. We haven't identified yet the root cause why this would be null, and also haven't been able to reproduce it.

There is one exception: if you go off-hook on the phone with no message waiting, an empty message is setup as a "reason" for the phone conversation dialog. Such a message is not involved in any processing, and it wouldn't be saved - normally that is. But a weird situation can never be ruled out. We're still looking around.

For the upcoming CTC 3.19 the whole message/phone conversation system is overhauled but we'll keep your report in mind just to cover anything we might not have yet.

If you have any additional information that can help us, please let us know. But we realize that you may not be able to provide more details, since you may not know what (faulty) messages are in the loop. But we would be interested if you have a way to reproduce it.

Regards,
Your WebRailRoader Team

soo_gp9

  • New Member
  • *
  • Posts: 2
Re: Program unhandled error on file save, v3.18
« Reply #2 on: January 29, 2015, 11:48:03 AM »
I am new to the game, I managed to flood the alliance map with many trains so most trains were calling dispatch.  I mostly left the phone off the hook unless I wanted to talk to a train.  It has been stable since number of trains has been reduced and map is more fluid.  It will be real nice to call a specific train.  I use to be in train service in CTC territory, it is ironic to be getting annoyed by trains telling you they are stopped and how long will it be.  I now appreciate the dispatcher's patience.

DPump

  • Administrator
  • Full Member
  • *****
  • Posts: 215
Re: Program unhandled error on file save, v3.18
« Reply #3 on: January 31, 2015, 12:37:47 PM »
An update:

We have found one scenario where we were able to reproduce the error:

If you let a train pass a red signal and it hits a switch that is not aligned properly, you'll get a message "Switch xxx damaged. Repair crew on the way". It creates a message with incomplete information, that causes the save failure.

Although not mentioned yet in this topic, we assume that's what happened. Leaving the phone off-hook is not causing any problems as such, that much we can tell. Regular messages should be fine, but the problem did occur in the message area, and the above scenario is the only one that looked suspicious - and it is.

Good news: for CTC 3.19 we're changing this situation such that the crew is not sent right away - you have to call the maintenance office to ask for a crew to take care of it. For that we're creating an alarm list, from which you can take proper action. The message box will not show anymore, you'll get an alarm instead.

Changes for this feature have been in the works for quite some time now - you may have noticed the disabled "Alarm" button. The whole alarm handling is still inactive but some changes were made in anticipation of this feature.

For further explanation: A message is the vehicle for calls between you and your virtual partners, so that's why one was created, but in the switch-damaged situation with the alarms still disabled a message is not really needed. In fact, a message is not needed until you actually make the call.

This message, not needed yet and incomplete, was creating the havoc.

We have now fine-tuned this feature now, including the communications part, to get it ready for the official release in CTC 3.19. With that the reported exception error should not occur.

We anticipate the release of CTC 3.19 in February 2015.