DanielT / NitroHack

A fork of NetHack 3.4.3
nitrohack.org
21 stars 2 forks source link

libnitrohack/src/muse.c:527: use_defensive: Assertion `m.has_defense == 0 || otmp != ((void *)0)' failed. #10

Closed tung closed 12 years ago

tung commented 12 years ago

I got this error and crash while playing (locally), and get it when trying to load it:

libnitrohack/src/muse.c:527: use_defensive: Assertion `m.has_defense == 0 || otmp != ((void *)0)' failed.

Here's the save: http://dl.dropbox.com/u/6290295/1328171363_tungtn.nhgame

Running the current master (commit 0f8563a4e3a602957d8ec9137c6b88b91457ab56).

DanielT commented 12 years ago

Right. I can't believe that never happened to me while testing the commit that added the assertion... Upon examination it is clearly wrong.

The assertion is removed with commit d07ea400344e7a61b00c9ed37f3ad2ac0212b3e1.

Note that several commits between 0f8563a4e3a602957d8ec9137c6b88b91457ab56 and this one break saves - I'm still fixing bugs in the save format (who knows, maybe I have found them all now?) - so you may want to cherry-pick the fix or just remove the 2 assert() lines from muse.c by hand.