Duke4.net Forums: EDuke32 crash bug on loading saved games - Duke4.net Forums

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 crash bug on loading saved games

User is offline   Danukem 

  • Duke Plus Developer

#1

For a while now we've been getting scattered reports of out of memory errors when people try to load saved games. With the latest snapshot (r6978), this now happens in the Alien Armageddon mod from apparently any saved game, so it's easily reproduced. This crash was not happening to me with previous snapshots. Below I have included some log files generated when trying to load a saved game. This can be reproduced with versions 1.02 of AA and later (maybe earlier, too)

Download link to the mod:
Download link

I got these crashes using my current build. I suspected that the presence of the "loadmapstate" command in EVENT_ENTERLEVEL may have been relevant. However, I can remove that command and comment out the entire event and the crash still happens.


Spoiler


In that case I was using Polymer, but it crashes in Polymost too:

Spoiler


EDIT2: I tried removing the loadmapstate feature to see if that was related. Interestingly, it still crashes, but now it shows an "out of memory" error instead of just quitting silently:

Spoiler

3

User is offline   Danukem 

  • Duke Plus Developer

#2

An update of sorts. I tried using the debug version of r6978 and it produces more info when crashing. Again, this happens when saving a game, quitting out and then starting and immediately loading the just created saved game.


Quote

Incompatible file version. Expected 1.7.331.0.19392445, found 1.7.331.0.75f7c8a8
Load tile 2492: p0-m513-e0 tilefromtexture/3drealms.png... 14 ms
Load tile 2492: p0-m516-e0 tilefromtexture/3drealms.png... 14 ms
gltexinvalidateall()
gltexinvalidateall()
Incompatible file version. Expected 1.7.331.0.19392445, found 1.7.331.0.75f7c8a8
Incompatible file version. Expected 1.7.331.0.19392445, found 1.7.331.0.75f7c8a8
Load tile 2456: p0-m513-e0 tilefromtexture/menu3.bmp... 10 ms
Load tile 2456: p0-m516-e0 tilefromtexture/menu3.bmp... 11 ms
sv_loadsnapshot: snapshot size: 11957686 bytes.
ud: 0 ms
sws: 3 ms

Wrote eduke32.cfg
Wrote settings.cfg
polymost_glreset()
Incompatible file version. Expected 1.7.331.0.19392445, found 1.7.331.0.75f7c8a8

0

User is offline   TerminX 

  • el fundador

  #3

I'll be working on this one soon as it's something I've fucked up. :rolleyes:
0

User is offline   Danukem 

  • Duke Plus Developer

#4

 TerminX, on 15 September 2018 - 10:57 AM, said:

I'll be working on this one soon as it's something I've fucked up. :rolleyes:


Cool. I don't know if this helps, but I got this crash log from another user. Once again, from loading a saved game using the debug build of r6978:

Quote

Caught exception 0xC0000374 at 0x00007FFB3EF44D3B: A heap has been corrupted.


0x00007FFB3EF44D3B : C:\WINDOWS\SYSTEM32\ntdll.dll : RtlIsNonEmptyDirectoryReparsePointAllowed
0x00007FFB3EF4C806 : C:\WINDOWS\SYSTEM32\ntdll.dll : RtlpNtSetValueKey
0x00007FFB3EF4CAD1 : C:\WINDOWS\SYSTEM32\ntdll.dll : RtlpNtSetValueKey
0x00007FFB3EEE9A55 : C:\WINDOWS\SYSTEM32\ntdll.dll : RtlRaiseStatus
0x00007FFB3EEF693D : C:\WINDOWS\SYSTEM32\ntdll.dll : memset
0x00007FFB3EE5D14A : C:\WINDOWS\SYSTEM32\ntdll.dll : RtlReAllocateHeap
0x00007FFB3E809A27 : C:\WINDOWS\System32\msvcrt.dll : realloc
0x000000000043C811 : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/build/include/compat.h (1198) : in function (xrealloc)
0x00000000004AAB0B : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/duke3d/src/savegame.cpp (1920) : in function (sv_postprojectileload)
0x00000000004AB0E9 : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/duke3d/src/savegame.cpp (774) : in function (readspecdata)
0x00000000004AB470 : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/duke3d/src/savegame.cpp (2148) : in function (doloadplayer2)
0x00000000004ADC79 : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/duke3d/src/savegame.cpp (1645) : in function (sv_loadsnapshot)
0x00000000004AE2D3 : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/duke3d/src/savegame.cpp (411) : in function (G_LoadPlayer)
0x00000000004AE529 : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/duke3d/src/savegame.cpp (634) : in function (G_LoadPlayerMaybeMulti)
0x00000000004A31F4 : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/duke3d/src/menus.cpp (3552) : in function (Menu_Verify)
0x00000000004A39F7 : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/duke3d/src/menus.cpp (6485) : in function (Menu_RunInput)
0x00000000004A4167 : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/duke3d/src/menus.cpp (6844) : in function (M_DisplayMenus)
0x00000000004C642A : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/duke3d/src/screens.cpp (1357) : in function (G_DisplayRest)
0x000000000040D6C3 : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/duke3d/src/game.cpp (6807) : in function (app_main)
0x000000000056E862 : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/build/src/sdlayer.cpp (493) : in function (WinMain)
0x000000000056E249 : E:\Games\Alien Armageddon\eduke32.debug.exe : /var/synthesis/eduke32/source/build/src/mingw_main.cpp (96) : in function (main)
0x00000000004013F7 : E:\Games\Alien Armageddon\eduke32.debug.exe : /build/mingw-w64-crt/src/mingw-w64-v5.0.3/mingw-w64-crt/crt/crtexe.c (336) : in function (__tmainCRTStartup)
0x00000000004014FB : E:\Games\Alien Armageddon\eduke32.debug.exe : /build/mingw-w64-crt/src/mingw-w64-v5.0.3/mingw-w64-crt/crt/crtexe.c (186) : in function (WinMainCRTStartup)
0x00007FFB3C9C3034 : C:\WINDOWS\System32\KERNEL32.DLL : BaseThreadInitThunk
0x00007FFB3EEC1461 : C:\WINDOWS\SYSTEM32\ntdll.dll : RtlUserThreadStart
Sat Sep 15 20:42:33 2018
---------------

1

User is offline   TerminX 

  • el fundador

  #5

That helps in that it confirms the problem is exactly what I thought it would be, yes. Thanks.
0

User is offline   ViDi 

#6

I tried to run debug build of r6975 but it doesn't even work. I tried to run Atomic Edition.
Attached Image: 1.jpg
Attached Image: 2.jpg

This post has been edited by ViDi: 15 September 2018 - 12:14 PM

0

User is offline   ViDi 

#7

I've restored it from the recycle bin and tried again but now it works.

Attached File(s)


0

User is offline   Danukem 

  • Duke Plus Developer

#8

Reports I have received on Mod DB confirm that the bug affects versions earlier than v6978. It goes back to at least r6969. Apparently, though, it happens to some users and not others, and which specific versions don't work can vary from user to user. So it seems to be partially system dependent.
0

User is online   Mark 

#9

Oops, wrong thread, I'm an idiot...deleted

This post has been edited by Mark: 24 September 2018 - 04:33 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#10

Any progress on this? People are still complaining. I will have to start packaging an older exe from before the bug was introduced.
0

User is offline   TerminX 

  • el fundador

  #11

I just pushed a fix for it, please test it when the binary is done building and let me know if it's sufficient.
1

User is offline   Danukem 

  • Duke Plus Developer

#12

 TerminX, on 27 September 2018 - 08:28 PM, said:

I just pushed a fix for it, please test it when the binary is done building and let me know if it's sufficient.


Unfortunately, that did not do the trick. Here is the error I get when I save a game at the start of the AA episode in my current version, then quit, restart eduke32 and attempt to load the saved game:

Quote

rsd: spec=blK:scri, idx=7, mem=000000001094A080
(compressed): read 23, expected 16384!
sv_loadsnapshot: doloadplayer2() returned -5.
Loading save game file "save0001.esv" failed (code 5), cannot recover.

1

User is offline   TerminX 

  • el fundador

  #13

Committed another attempt at fixing the issue. Let me know if this is any better.
0

User is offline   Forge 

  • Speaker of the Outhouse

#14

Loading a save with eduke32_win64_20180928-6988 crashes on my comp.
Also seems to be something wrong with the railgun - the round 'tracer' seems off, or not present with the scope - and it's not firing projectiles. It only makes the firing noise, but doesn't produce a bullet.

pop-up:
Loading save game file 'save0000.esv' failed (code 5), cannot recover.

log file:
rsd: spec=blK:swsp, idx=29, mem=00000000011DBE00
(compressed): read -1, expected 16384!
read: Bad file descriptor
sv_loadsnapshot: doloadplayer2() returned -4.
Loading save game file "save0000.esv" failed (code 5), cannot recover.
0

User is offline   Danukem 

  • Duke Plus Developer

#15

So far r6988 works fine for me. I only tried one simple save and reload, though, at the start of the AA episode. Also, no problems with the railgun. EDIT: tried again in a different episode, got to the second level, saved and reloaded -- still no crash.

@Forge -- what happens when you create a save right at the beginning of the episide, then quit and reload that save?

This post has been edited by Trooper Dan: 28 September 2018 - 08:52 PM

0

User is offline   Forge 

  • Speaker of the Outhouse

#16

 Trooper Dan, on 28 September 2018 - 08:49 PM, said:

@Forge -- what happens when you create a save right at the beginning of the episide, then quit and reload that save?

it loads with no problem

edit: what I seem to be getting is a crash while trying to save - then re-starting eduke32.exe & trying to load a save will crash the game
edit2: i can start a new game, over-write the 'bad' save & it works fine

edit 3: i can run around all day & make as many saves and loads as I want - until I fire a weapon - then any save after that crashes the game
edit 4: same problem as edit 3, in any episode
edit 5: I can play through an entire map in an episode - once i get to the next map - if I save before firing a weapon, the save file is good.(even though I fired multiple weapons in the first map), but if I fire a weapon at the beginning the second map then save- the save crashes the game.
edit 6: I can repeat this with vanilla duke using the same snapshot - firing the pistol in vanilla doesn't seem to do anything, but firing the rpg does corrupt the ability to save (randomly, but save enough times & it will do it) - Also don't know if this means anything, but it's in the vanilla log:
g_errorLineNum: 556, g_tw: 4

This post has been edited by Forge: 28 September 2018 - 09:31 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#17

 Forge, on 28 September 2018 - 08:57 PM, said:

edit 6: I can repeat this with vanilla duke using the same snapshot - firing the pistol in vanilla doesn't seem to do anything, but firing the rpg does corrupt the ability to save (randomly, but save enough times & it will do it) - Also don't know if this means anything, but it's in the vanilla log:
g_errorLineNum: 556, g_tw: 4


That's good to hear. It means that it's not caused by something bizarre I'm doing in my CONs and it should make this easier to replicate for TerminX.

EDIT: Also, I can now verify this. After firing non-hitscan weapons, there is a chance of save becoming corrupt. It took me a few tries but it happens here as well. I got the same code 5 error when trying to load the saved game, preceding by a g_errorLineNum when the the game was saved before quitting. The line identified is completely random it seems.

This post has been edited by Trooper Dan: 28 September 2018 - 09:57 PM

0

User is offline   Ninety-Six 

#18

Out of curiosity, does it make a difference if the projectile still exists/still flying versus hitting its mark/despawning?
0

User is offline   Danukem 

  • Duke Plus Developer

#19

 Ninety-Six, on 28 September 2018 - 11:11 PM, said:

Out of curiosity, does it make a difference if the projectile still exists/still flying versus hitting its mark/despawning?


No.
0

User is offline   Danukem 

  • Duke Plus Developer

#20

 Forge, on 28 September 2018 - 08:57 PM, said:

edit 6: I can repeat this with vanilla duke using the same snapshot - firing the pistol in vanilla doesn't seem to do anything, but firing the rpg does corrupt the ability to save (randomly, but save enough times & it will do it) - Also don't know if this means anything, but it's in the vanilla log:
g_errorLineNum: 556, g_tw: 4


Bumping this to reiterate that the latest posted snapshot 6988 does crash when saving/loading saves even in the vanilla game. It's reproducible but somewhat random (see Forge's quote).
0

User is offline   TerminX 

  • el fundador

  #21

Bumping this to reiterate that I'm still working on this, and promise not to leave savegames broken forever. :rolleyes:
1

User is offline   TerminX 

  • el fundador

  #22

r6989
1

User is offline   Forge 

  • Speaker of the Outhouse

#23

eduke32_win64_20181002-6989

After multiple saves, quits, and loads, I experienced no crashes.

This post has been edited by Forge: 02 October 2018 - 05:18 PM

0

User is online   Mark 

#24

And its all because TX "reiterated" in his previous post. Yes, I like that word.
1

User is offline   TerminX 

  • el fundador

  #25

Don't even look at the commit. I'm ashamed. :rolleyes:
1

User is online   Mark 

#26

I wasn't going to look but now I have to. :rolleyes:
0

User is offline   Forge 

  • Speaker of the Outhouse

#27

 Mark, on 02 October 2018 - 07:25 PM, said:

I wasn't going to look but now I have to. :rolleyes:

my log is full of multiple loads
0

User is offline   Danukem 

  • Duke Plus Developer

#28

Saved games are still getting corrupted as of r7067. I have sent TerminX a PM with a link to content that can reproduce the issue. It seems that compiled script is randomly corrupted, resulting in various possible issues, including custom projectile not spawning, "too many sprites spawned" errors, the player always having a cursectnum of -1, and other stuff.
0

User is offline   Forge 

  • Speaker of the Outhouse

#29

r7136 has resolved all the issues that were openly discussed / I was aware of

thanx Tx

This post has been edited by Forge: 27 October 2018 - 07:38 PM

1

User is offline   TerminX 

  • el fundador

  #30

No problem. Our hard work on glorious Ion Maiden benefits all! :rolleyes:
0

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options