[Problem] Engine freezes at shutdown - unknown software exception

Started by Yeppoh, Mon 16/03/2009 16:33:23

Previous topic - Next topic

Yeppoh

When shutting down the game I'm working on (either with QuitGame() or Alt+X), in windowed mode, launched from the editor (debugging enabled), sometimes the game freezes. Most of the time I need to kill the process.

Sometimes I get this error :
  'unknown software exception (0x40000015) at location 0x00465b4b;'

Or sometimes it doesn't and shuts down properly.

Due to its random nature I couldn't find out if it's a problem coming from my computer, or the engine, and what exactly.

Until now it didn't happen when fully compiled, and/or full screen. It isn't a major hindrance, just annoying sometimes  while I'm working on it.

I have this issue on Windows XP SP3, while on Win2000 it works fine. I remember it didn't occur before version 3.1.2 of AGS.
DirectX 9 is the most up to date.

Thank you for helping me on this one.


GarageGothic

Does it happen when you test the game without the debugger (Ctrl+F5)?

Yeppoh

It does happen without the debugger too; only when windowed though.

Pumaman


freshpaint

I have the problem quite often, though I've never gotten an exception message.  I often have to kill the program with task manager.  I run XP SP3 with McCafee and Windows automatically updated.  I have 512 meg memory, 120 DPI screen mode.

I get it in windowed and fullscreen mode too.  Then it seems to go away for awhile while I'm testing, then suddenly it freezes again.  I've never created a game below level 3.0 -- the freeze has happened in every version I've used, however, in both the development environment and compiled and run outside it.

I always figured it had something to do with my old computer or my virus protection, since I'd seen nothing reported in any of the forums.  It happens with the "quit game" function, closing a window with the windows x, and also alt-x.  No one who ran my Darkdevil County demo complained about it (tho there were't a lot of testers), so I figured it had to be me.

I think I've also had the problem running the new King's Quest I (tho I might be misremembering).

Pumaman

Hmm, strange. I've never had this problem, so I suppose the best thing to do would probably be for me to add some sort of logging to a future version so that if it hangs when shutting down we can track down why it's happening.

Yeppoh

I think I've finally discovered and resolved the issue. It wasn't because of AGS Engine, but because of a faulty driver... of  my Pen Tablet.

A little background :
For some time my computer had, when I shut it down, a error stating : ' The instruction at "0x00000000" referenced memory at "0x00000000". The memory could not be "written" ' (or sometimes "read").
After googling I learnt that some softwares and/or drivers make this happen, because of faulty coding that allocate it in the memory where it shouldn't.
Since it happened at the end of a session and didn't stop the computer of shutting down (just a little unesthetic imperfection), I haven't given any attention until rencently when I had time to look into it.
After some investigations, I discovered the driver of my Pen tablet was at fault. I removed it and installed a up-to-date one.

I never linked this problem with the issue I had with my AGS game. Until last night when I remarked :
"Hey! It's been a week and the Game shuts itself down properly now."
It took me twenty minutes, then I connected the dots : "Ah... That's a convenient coincidence..."

Somehow I may speculate that, because of this bad allocated driver, it thwarted occasionally AGS to dump the game correctly from memory, since I noticed the game was only 25-50% dumped before crashing. But I can be mistaken.

I'll keep you informed if it happens again.

Pumaman


SMF spam blocked by CleanTalk