Author Topic: Crash after failed quicksave  (Read 1858 times)

Wing

  • Probably not a Spambot
  • *
  • Posts: 29
  • Karma: +2/-0
    • View Profile
Crash after failed quicksave
« on: September 06, 2014, 05:03:04 pm »
I quicksaved about the same time I was detected by the bot sentries under the Junkyard and the saved failed with the message popup saying the save cannot happen at this time but after that the screen was black and it crashed soon after. Some sort of race condition?


System.NullReferenceException: Object reference not set to an instance of an object.
   at w1.a(bka A_0, bp5 A_1, Boolean A_2)
   at lp.a(acs A_0, Double A_1, Int32 A_2, Int32 A_3)
   at amd.jl(a8e A_0)
   at bph.ahe(u5 A_0)
   at j5.a(Object A_0, buf A_1)
   at mf.fa(Object A_0, l1 A_1)
   at a7t.fa(Object A_0, l1 A_1)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at bdr.b(ace A_0, akq A_1, bsv A_2)
   at bdr.aei(ace A_0)
   at a7t.aei(ace A_0)
   at bmh.aei(ace A_0)
   at bdr.aei(ace A_0)
   at ai6.aei(ace A_0)
   at p2.fv(ace A_0)
   at c5.a(ace A_0)
   at ux.Update(GameTime gameTime)
   at ew.Update(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
   at Microsoft.Xna.Framework.GameHost.OnIdle()
   at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
   at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
   at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at Microsoft.Xna.Framework.WindowsGameHost.Run()
   at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
   at ayq.a(String[] A_0)

Styg

  • Administrator
  • Godman
  • *****
  • Posts: 2406
  • Karma: +513/-31
    • View Profile
Re: Crash after failed quicksave
« Reply #1 on: September 17, 2014, 07:15:20 am »
I think I found it. It should happen when you manage to issue a move command to the player just as it's about to save. Anyway, should be fixed in the next version.

Wing

  • Probably not a Spambot
  • *
  • Posts: 29
  • Karma: +2/-0
    • View Profile
Re: Crash after failed quicksave
« Reply #2 on: September 20, 2014, 01:08:53 am »
It looks like you're not using a classical single threaded main loop style of programming to run the game. Well the drawback is you have to be very careful of race conditions. Good luck.

Styg

  • Administrator
  • Godman
  • *****
  • Posts: 2406
  • Karma: +513/-31
    • View Profile
Re: Crash after failed quicksave
« Reply #3 on: September 21, 2014, 07:12:18 pm »
It looks like you're not using a classical single threaded main loop style of programming to run the game. Well the drawback is you have to be very careful of race conditions. Good luck.

I am using a single thread, but multiple action are queued and executed in segments between processing inputs, rendering, etc, so they can sometimes mess up the game state for one another.