Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Crash when exit game  (Read 5024 times)

0 Members and 1 Guest are viewing this topic.

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 116
    • View Profile
Crash when exit game
« on: January 12, 2012, 05:27:16 PM »

Hi, I'm testing my game is some computers.
In all WindowsXP computers that I have tested the game works OK.
But in 2 computers with Windows7 the game crash when exits, this is the crash.log:

Code: [Select]
-----------------------------------------------------------------
---------- wme 1.9.001 crash report: 12-01-2012, 11:21 ----------
-----------------------------------------------------------------
JamesPeris.exe caused a EXCEPTION_ACCESS_VIOLATION in module JamesPeris.exe at 0023:00419F7F
EAX=00000004  EBX=00000001  ECX=00000000  EDX=005A2614  ESI=00000000
EDI=FFFFFFFE  EBP=0018FCD4  ESP=0018FCD0  EIP=00419F7F  FLG=00010202
CS=0023   DS=002B  SS=002B  ES=002B   FS=0053  GS=002B
Stack trace:
0023:00419F7F (0x1E972D2B 0x027C5BB0 0x0018FE28 0x00598957) JamesPeris.exe
0023:00479B11 (0x027C5BB0 0x0018FDA0 0x00451D62 0x00000001) JamesPeris.exe, CBGame::IsDirectXBound()+112289 byte(s)
0023:00418ADF (0x00000001 0x75F814DD 0x01E20000 0x00000000) JamesPeris.exe
0023:00451D62 (0x03360000 0x0000003E 0x0277E758 0x0000003E) JamesPeris.exe
0023:00401B49 (0x1E972FEF 0x01F5E038 0x0018FEA0 0x00594843) JamesPeris.exe
0023:0040155F (0x01F5E038 0x0018FEB0 0x0044F689 0x00000001) JamesPeris.exe
0023:00408D7F (0x00000001 0x1E972F6B 0xFFFFFFFE 0x00000000) JamesPeris.exe
0023:0044F689 (0x1E972F3B 0xFFFFFFFE 0x00000000 0x00000001) JamesPeris.exe
0023:00401066 (0x01F5E038 0x00400000 0x00000000 0x0026361E) JamesPeris.exe
0023:004010ED (0x7EFDE000 0x0018FFD4 0x770B9EF2 0x7EFDE000) JamesPeris.exe
0023:75F8339A (0x7EFDE000 0x76B81FE4 0x00000000 0x00000000) kernel32.dll, BaseThreadInitThunk()+18 byte(s)
0023:770B9EF2 (0x00536932 0x7EFDE000 0x00000000 0x00000000) ntdll.dll, RtlInitializeExceptionChain()+99 byte(s)
0023:770B9EC5 (0x00536932 0x7EFDE000 0x00000000 0x78746341) ntdll.dll, RtlInitializeExceptionChain()+54 byte(s)

My game is fully 2D, isn't compiled with Direct3D 9 option.
Any idea what is the cause of this error?

Thanks!
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Crash when exit game
« Reply #1 on: January 15, 2012, 02:15:55 PM »

If you give me a download link, I can take a look at where exactly it crashes (I'm running Win7 64bit).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 116
    • View Profile
Re: Crash when exit game
« Reply #2 on: January 18, 2012, 12:42:50 PM »

Problem is solved reinstalling DirectX. Not recompiled the game, just reinstalled directX and it works.
Logged

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 116
    • View Profile
Re: Crash when exit game
« Reply #3 on: January 20, 2012, 07:13:46 PM »

Sorry, problem is not solved.

The game crashes when exits after start new game.
Also the game crash after load for second time a saved game.

Mnemonic I send you a private message with source and compiled game links.

Thanks.
Logged

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 116
    • View Profile
Re: Crash when exit game
« Reply #4 on: January 31, 2012, 10:09:45 AM »

Hi, we solved the problem, I will write here the solution for somebody that finds the same problem.

This is the solution (thanks Mnemonic), must to set InventoryObject to null before you unload the main character.

Code: WME Script
  1.                 actor1= Game.LoadActor("actors\actor1\actor1.actor");
  2.                 actor=actor1;
  3.                 Game.MainObject = actor;
  4.                 Game.InventoryObject=null; // ADD THIS
  5.                 Game.UnloadObject(actor1);
  6.                 if(actor1==null)
  7.                         actor1= Game.LoadActor("actors\actor2\actor2.actor");
  8.                 actor=actor1;
  9.  
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Crash when exit game
« Reply #5 on: January 31, 2012, 10:20:41 AM »

And I will add this is only necessary if you explicitly set the Game.InventoryObject to an actor. For most games the Game.InventoryObject is set to the Game itself (that's the default), and in that case the problem doesn't occur.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.023 seconds with 24 queries.