Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   4.0.5 crash (http://angband.oook.cz/forum/showthread.php?t=8358)

bron April 20, 2017 01:44

4.0.5 crash
 
1 Attachment(s)
With any luck I've attached a save file that makes my copy of the game reliably crash. I'm running 4.0.5. I built it myself from source on my Linux box, but didn't make any source-code changes. My executable is configured with:
./configure --with-no-install --disable-x11 --prefix=`pwd`
i.e. "curses" only; no X stuff.

I've played with this version for a long time without problems. Today, my character went down a flight of stairs, and the program crashed. The panic save worked, producing the attached save file. I can start up the game using this file, but if I immediately exit (cntrl-X) without taking any action, the game crashes again.

It appears to be catching a signal right at the very last moment; deallocating memory prior to exiting. I didn't want to dig into the problem any deeper than that until/unless someone else can confirm (or deny) that this problem is real, rather than e.g. some quirk of my particular system and my particular build.

Let me know if I can provide any additional information.

Nick April 20, 2017 12:06

OK, it looks like that savefile is somehow inducing memory corruption. I found:
  • If I open it in gdb, I get exactly what you describe; memory error apparently part way through freeing the cave->squares.info arrays
  • If I open with valgrind, it gives memory errors on loading (specifically setting terrain features in the player's version of the cave), but then opens fine and gives no errors on closing

There have been crashes on current master (unless I fixed them - probably on PowerWyrm's instructions) with creating labyrinth levels. So my best guess is that whatever issue that was also caused a bad savefile to be written in the panic save.

That's not a very satisfactory answer, but I think it's about as well as I'm going to do for now.

bron April 20, 2017 18:55

Quote:

Originally Posted by Nick (Post 120170)
There have been crashes on current master (unless I fixed them - probably on PowerWyrm's instructions) with creating levels.

OK; thanks for looking. In the particular instance, the level I had just completed before descending was itself a labyrinth level, and new level that got created (and then crashed) is also a labyrinth level. Perhaps that has something to do with it ? In any event, it seems clear something bad happened since the new labyrinth level has all permanent walls, so I assume some sort of corruption.

I played through the level to see if maybe moving on would cleanse the badness, but (more or less as expected) it was the badness that spread instead and eventually I got a savefile that no longer works at all.

Unless I hear different, I'll just give up on this char and start a new one.

Pete Mack April 20, 2017 19:10

Bron--some labyrinths have permanent walls by design. But Nick is still probably right about the cause.


All times are GMT +1. The time now is 07:34.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.