FORUM ARCHIVED

[Linux 64-bit] Game crashes with failed assertion

Discussion in 'Bugs' started by perost, Oct 12, 2011.

  1. perost

    perost Member

    Hi!

    I'm playing with the Linux 64-bit client, and experience crashes due to a failed assertion:
    Code:
    Dredmor-amd64: /home/nvining/dredmor/monster.cpp:2231: virtual void Monster::TeleportTo(int, int, Level*, BOOL): Assertion `0 && "moved onto player square"' failed.
    
    I can't reproduce this realiably, but it happens when fighting monsters. I'm only on level two so far, but the game has crashed 3-4 times already, so it happens a bit too frequently to be comfortable.
     
  2. Derakon

    Derakon Member

    Any time you try to assert 0 && something, you're going to run into trouble...
     
  3. perost

    perost Member

    Unless you put the assert in a code section that should never be reached to make sure you never get there. Using assert(false && "some message") is actually not that uncommon.

    I can add that this bug makes it annoying to clear out zoos. I still haven't found any way of reproducing the bug, it just seems to happen once in a while when you're next to a monster. Clearing a zoo means that it's quite probable that the game will crash sometime, so you need to slow save (i.e. save & quit and then load) now and then to avoid having to do the zoo all over again.
     
  4. Derakon

    Derakon Member

    Hm, at a random guess, perhaps it happens if the monster forgets the player exists (due to sneakiness) and tries to walk onto the player's tile? You could see if it happens more often if you turn invisible and just stand around, or if you play as a high-level mage (who, thanks to high Savviness, tends to have high Sneakiness too).
     
  5. perost

    perost Member

    Ok, I've played a bit more now, and I think I'm starting to see a pattern. It seems as though the assertion only triggers when I'm standing before an open door, such as when I've just opened a door. Enemies just behind the door then steps forward into the tiles where the door used to be, but sometimes they seem to go too far. I once had a diggle that appeared just behind me when I opened a door, so presumably they might sometimes try to teleport onto the same tile as I'm standing on. The assertion also triggers when I'm just standing around an open door and getting attacked, so it's doesn't happen only when I've just opened the door. If I destroy the door by kicking it down I seem to be safe though, so my guess is that there's something weird going on with how monsters interact with doors. I'm also playing as a heavy armor-wearing warrior, so I don't think sneakiness has anything to do with it since my sneakiness is zero.
     
  6. Nicholas

    Nicholas Technology Director Staff Member

    Let me put up some new binaries for you.
     
  7. catpants

    catpants Member

    I'm able to reproduce this on an amd64 system pretty consistently by fighting in front of open (but not broken) doorways as perost described. I have not been able to reproduce on a 32-bit system.
     
  8. Just ran into this bug or the first time. Exactly the situation as described by Perost, standing in front of an open door and attacking an enemy. Terminal output was this:
    Code:
    Player kills monster, gains 10 XP
    total xp: 10
    Dredmor-amd64: /home/nvining/dredmor/monster.cpp:2231: virtual void Monster::TeleportTo(int, int, Level*, BOOL): Assertion `0 && "moved onto player square"' failed.
    attempting to damage object: attempting to damage object: attempting to damage object: Aborted
    
    OS is Ubuntu 11.04, 64-bit. Please let me know if you need more information, happy to help.