Closed thesourcehim closed 6 years ago
I'll see if I can reproduce this one. Could be tricky, though. From the look of it, the game is crashing when trying to save a unit (enemy), so it's possible the enemy was dying or dead when this happened. They shouldn't be in the linked list any longer, though.
I can't reproduce the crash with the latest commit in develop (atomically save). Looks like it helped. Update: no, sorry, still crashes sometimes.
Just in case, here's call stack with latest development commit
No symbol table info available.
len = 37395936
copy = 0x23a9d70 ""
item = 0x23a9de0
u = 0x30788e0
entitiesJSON = 0x29cfc70
entityJSON = 0x23a9c20
root = 0x29cf2c0
filename = 0x2c39c60 "/home/thesource/.local/share/blobwarsAttrition/0/outpost5.json.tmp"
out = 0x2439c00 ""
src = 0x2397200 "outpost5"
dest = 0xc <error: Cannot access memory at address 0xc>
No locals.
No locals.
No locals.
then = 201402
nextSecond = 201485
frames = 55
Thanks for the trace. I can see what's going on, but I'm not sure why it's happening.
If you're still experiencing the crashes (looks like it's happening in Outpost 5), can you send me your save file? I'll take a look and see what I can find out.
I have a hunch this might be due to Teeka being saved, when he's not supposed to be. I've updated the develop branch, but there may be an issue with the save file (that could be fixed by editing).
With that commit I could not reproduce the crash for now, I'll test more. During testing I encountered another problem: one time when I pressed quit from mission, Bob disappeared, but mission never ended. Enemies continued to respawn from time to time, no buttons worked, not even escape to call menu. I could not reproduce this however, seems to be very rare.
The mission not ending is possibly linked to a save delay mechanism that avoids saving the mission if something is in the process of dying or teleporting (or an MIA is in the middle of their rescue animation).
Do you know which level you were on when this happened? I've not experienced it myself and the code suggestions that it shouldn't block saving for more than a few seconds.
One of the Beach front levels, don't remember which one, sorry.
I suspect it might've been something like a laser trap keep an enemy alive by constantly bouncing them about. I've made some changes to develop to prevent that from happening.
I tested more and could not reproduce the crash, I guess it's fixed. You were right about the trap, I just witnessed it happening on beach front 3 just to the right and down from the start, enemy was bouncing from the laser, but after your commit it collapsed after few bounces.
Game crashes randomly after endgame when I enter and then exit any mission
0 0x00007ffff69c29a6 in __strlen_sse2 () from /lib64/libc.so.6
No symbol table info available.
1 0x000000000041a496 in cJSON_strdup (str=0x0) at src/json/cJSON.c:63
2 0x000000000041d63a in cJSON_CreateString (string=0x0) at src/json/cJSON.c:1276
3 0x000000000042d78a in save (root=0x3088a90) at src/entities/unit.c:322
4 0x000000000043279d in saveEntities (root=0x30c90e0) at src/world/worldSaver.c:145
5 0x00000000004323d0 in saveWorld () at src/world/worldSaver.c:55
6 0x0000000000423932 in initPostMission () at src/hub/postMission.c:79
No locals.
7 0x0000000000430b6c in doWorldComplete () at src/world/world.c:535
No locals.
8 0x0000000000430216 in logic () at src/world/world.c:178
No locals.
9 0x000000000041fbe3 in main (argc=1, argv=0x7fffffffda78) at src/main.c:58