miki151 / keeperrl

Source code of KeeperRL
GNU General Public License v2.0
874 stars 111 forks source link

(alpha 29) (linux64) game crash after starting a game #1490

Closed ghost closed 2 years ago

ghost commented 4 years ago

Game is crashing at random after starting a new game.

Only message in console: longjmp causes uninitialized stack frame : ./keeper terminated

Running on latest linux mint with intel hardware and mesa driver.

Edit: deactivating online features in options fixes crashs

miki151 commented 4 years ago

Would you mind running it through gdb and sending me a stacktrace? Thank you.

ghost commented 4 years ago

Here is one that happened right after hitting enemy:

0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51

1 0x00007ffff59ae801 in __GI_abort () at abort.c:79

2 0x00007ffff59f7897 in __libc_message (action=action@entry=(do_abort | do_backtrace), fmt=fmt@entry=0x7ffff5b24988 " %s : %s terminated\n")

at ../sysdeps/posix/libc_fatal.c:181

3 0x00007ffff5aa2cff in __GI___fortify_fail_abort (need_backtrace=need_backtrace@entry=true,

msg=0x7ffff5b2493d <longjmp_msg> "longjmp causes uninitialized stack frame") at fortify_fail.c:33

4 0x00007ffff5aa2d21 in __GI___fortify_fail (msg=) at fortify_fail.c:44

5 0x00007ffff5aa2bbd in longjmp_chk () at ../sysdeps/unix/sysv/linux/x86_64/longjmp_chk.S:100

6 0x00007ffff5aa2b1b in __longjmp_chk (env=0x7ffff6b5fa00 , val=) at ../setjmp/longjmp.c:39

7 0x00007ffff6914a45 in ?? () from ./libcurl-gnutls.so.4

8

9 0x00007ffff5a82bf9 in __GI___poll (fds=0x7fffffff9fe8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29

10 0x00007ffff220f747 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1

11 0x00007ffff221145a in xcb_wait_for_special_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1

12 0x00007fffd5d965eb in ?? () from /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0

13 0x00007fffd5d96738 in ?? () from /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0

14 0x00007fffd5d9790e in ?? () from /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0

15 0x00007fffd5d98889 in ?? () from /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0

16 0x00007fffcb835009 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so

17 0x00007fffcb835321 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so

18 0x00007fffcb830789 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so

19 0x0000000000a7c2cf in Renderer::drawAndClearBuffer() ()

20 0x0000000000605064 in WindowView::refreshScreen(bool) ()

21 0x000000000060cc01 in WindowView::refreshView() ()

22 0x0000000000c274b5 in Player::makeMove() ()

23 0x00000000009b375b in Creature::makeMove() ()

24 0x0000000000d957d1 in Model::update(double) ()

25 0x00000000006f8a2e in Game::update(double) ()

26 0x000000000058bb1b in MainLoop::playGame(OwnerPointer, bool, bool, bool, std::function<std::experimental::optional (Game*)>, std::chrono::duration<long, std::ratio<1l, 1000l> >, std::experimental::optional) ()

27 0x000000000059b851 in MainLoop::start(bool) ()

28 0x00000000008b6648 in keeperMain(po::parser&) ()

29 0x00000000008ad9a5 in main ()

Another one while downloading online scores after dying:

0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51

1 0x00007ffff59ae801 in __GI_abort () at abort.c:79

2 0x00007ffff59f7897 in __libc_message (action=action@entry=(do_abort | do_backtrace), fmt=fmt@entry=0x7ffff5b24988 " %s : %s terminated\n")

at ../sysdeps/posix/libc_fatal.c:181

3 0x00007ffff5aa2cff in __GI___fortify_fail_abort (need_backtrace=need_backtrace@entry=true,

msg=0x7ffff5b2493d <longjmp_msg> "longjmp causes uninitialized stack frame") at fortify_fail.c:33

4 0x00007ffff5aa2d21 in __GI___fortify_fail (msg=) at fortify_fail.c:44

5 0x00007ffff5aa2bbd in longjmp_chk () at ../sysdeps/unix/sysv/linux/x86_64/longjmp_chk.S:100

6 0x00007ffff5aa2b1b in __longjmp_chk (env=0x7ffff6b5fa00 , val=) at ../setjmp/longjmp.c:39

7 0x00007ffff6914a45 in ?? () from ./libcurl-gnutls.so.4

8

9 0x00007ffff6b71c60 in __GI___nanosleep (requested_time=0x7fffffff9468, remaining=0x0) at ../sysdeps/unix/sysv/linux/nanosleep.c:28

10 0x0000000000604bcd in WindowView::getSmallSplash(ProgressMeter const*, std::string const&, std::function<void ()>) ()

11 0x000000000061e418 in std::_Function_handler<void (), WindowView::displaySplash(ProgressMeter const*, std::string const&, std::function<void ()>)::$_12>::_M_invoke(std::_Any_data const&) ()

12 0x000000000060cb9c in WindowView::refreshView() ()

13 0x00000000006000c7 in View::doWithSplash(std::string const&, int, std::function<void (ProgressMeter&)>, std::function<void ()>) ()

14 0x000000000071528c in Highscores::downloadHighscores(View*) const ()

15 0x00000000007162d4 in Highscores::present(View*, std::experimental::optional) const ()

16 0x00000000006ff502 in Game::gameOver(Creature const*, int, std::string const&, int) ()

17 0x0000000000c2f273 in Player::onKilled(Creature const*) ()

18 0x00000000009badf1 in Creature::dieWithAttacker(Creature*, Creature::DropType) ()

19 0x0000000000996f97 in Body::takeDamage(Attack const&, Creature*, double) ()

20 0x00000000009bebe0 in Creature::takeDamage(Attack const&) ()

21 0x00000000009d3a90 in std::_Function_handler<void (Creature), Creature::attack(Creature, std::experimental::optional) const::$_20>::_M_invoke(std::_Any_data const&, Creature*) ()

22 0x0000000000f02a39 in CreatureAction::perform(Creature*) ()

23 0x0000000000b9f2a4 in MonsterAI::makeMove() ()

24 0x00000000009b375b in Creature::makeMove() ()

25 0x0000000000d957d1 in Model::update(double) ()

26 0x00000000006f8a2e in Game::update(double) ()

27 0x000000000058bb1b in MainLoop::playGame(OwnerPointer, bool, bool, bool, std::function<std::experimental::optional (Game*)>, std::chrono::duration<long, std::ratio<1l, 1000l> >, std::experimental::optional) ()

28 0x000000000059b851 in MainLoop::start(bool) ()

29 0x00000000008b6648 in keeperMain(po::parser&) ()

30 0x00000000008ad9a5 in main ()

miki151 commented 4 years ago

It's hard to say if these two are related. It could be due to some version mismatch with libraries. If not then the first one could be a driver bug, I've seen a lot of similar reports from Windows users.

You could try compiling the game yourself and see if it still crashes. Make sure to use the stable branch in git. ('git pull origin stable' before compiling). Let me know if you need help.

ghost commented 4 years ago

I'm having compiling issue with steam_api which I don't have on my system. I removed the STEAMWORKS = true line in Makefile but I still have this error: file_sharing.cpp:382:3: error: ‘steam’ does not name a type; did you mean ‘Item’? steam::ItemInfo info; ^~~~~ Item file_sharing.cpp: In member function ‘std::experimental::optional<vector<ModInfo> > FileSharing::getSteamMods()’: file_sharing.cpp:482:27: error: ‘struct SteamItemInfo’ has no member named ‘info’ auto& info = infos[n].info; ^~~~ file_sharing.cpp: In member function ‘std::experimental::optional<vector<FileSharing::SiteInfo> > FileSharing::getSteamSites()’: file_sharing.cpp:508:27: error: ‘struct SteamItemInfo’ has no member named ‘info’ auto& info = infos[n].info; ^~~~

miki151 commented 4 years ago

If you do 'git pull origin stable' again, this error should be fixed.

ghost commented 4 years ago

Ok, compiled the game successfully and it's not crashing.

miki151 commented 4 years ago

Thanks. It's most likely libraries then. I'll do some research. Thanks a lot for your help.