CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.27k stars 4.12k forks source link

[Bug] Certain food item in minifridge causes game to crash #14381

Closed lauriwesterlund closed 8 years ago

lauriwesterlund commented 8 years ago

I encountered this bug in version 0.C-8042-g1cf8251. Updating to the latest experimental (0.C-8093-g0b042ff as of this writing) didn't solve it. Running ncurses on Ubuntu 14.04.

I have a save file here, in which the game will crash in roughly 10 minutes of ingame time if you stay in the area. This seems to be caused by an amoral aspic (cannibalism ftw!) in the minifridge of my nearby vehicle. Turning the minifridge off or removing that specific item from the fridge solves the issue.

Here's the save file: https://www.dropbox.com/s/6msy2wanfip5xdw/Ovilla_crash_save.zip?dl=0 Here's a screenshot: https://www.dropbox.com/s/xrz2t5unecdlrxa/Screenshot%20from%202015-12-11%2000%3A51%3A57.png?dl=0

Does the game print out a dumplog or something else that could be helpful for you? I suppose this is a pretty minor bug, if this is the only item that causes a crash like this.

lauriwesterlund commented 8 years ago

I turned on debug mode, and upon crashing it says: r: meat_tainted 510972,510984 421->425

chaosvolt commented 8 years ago

It would be a stretch of the imagination to call a crash bug minor. -_-

sparr commented 8 years ago

working on this

sparr commented 8 years ago

I'm stuck. Here's the backtrace:

#0  0x00007ffff6b87267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007ffff6b88eca in __GI_abort () at abort.c:89
#2  0x00007ffff74f2845 in __gnu_debug::_Error_formatter::_M_error() const () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x0000000000535244 in __gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<item>, std::__debug::list<item, std::allocator<item> > >::_Safe_iterator (this=0x55fe398, __x=...)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/debug/safe_iterator.h:164
#4  0x000000000072525c in item_reference::item_reference (this=0x55fe380) at src/active_item_cache.h:11
#5  0x00000000007251ff in std::__cxx1998::_List_node<item_reference>::_List_node<item_reference const&> (this=0x55fe370, __args=...)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_list.h:114
#6  0x00000000007251a6 in __gnu_cxx::new_allocator<std::__cxx1998::_List_node<item_reference> >::construct<std::__cxx1998::_List_node<item_reference>, item_reference const&> (
    this=0x7fffffffcf90, __p=0x55fe370, __args=...) at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/ext/new_allocator.h:120
#7  0x00000000007250b2 in std::__cxx1998::list<item_reference, std::allocator<item_reference> >::_M_create_node<item_reference const&> (this=0x7fffffffcf90, __args=...)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_list.h:514
#8  0x0000000000724fe4 in std::__cxx1998::list<item_reference, std::allocator<item_reference> >::_M_insert<item_reference const&> (this=0x7fffffffcf90, __position=..., __args=...)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_list.h:1688
#9  0x0000000001033c75 in std::__cxx1998::list<item_reference, std::allocator<item_reference> >::push_back (this=0x7fffffffcf90, __x=...)
    at /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_list.h:1029
#10 0x000000000103333c in active_item_cache::get (this=0x560aaf8) at src/active_item_cache.cpp:43
#11 0x0000000000c6992c in map::process_items_in_vehicle<bool (*)(item_stack&, __gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<item>, std::__debug::list<item, std::allocator<item> > >&, tripoint const&, std::string)> (this=0x1d47ce0, cur_veh=0x560a720, current_submap=0x55f3fe0, 
    processor=0xc49560 <process_map_items(item_stack&, __gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<item>, std::__debug::list<item, std::allocator<item> > >&, tripoint const&, std::string)>, signal="") at src/map.cpp:4823
#12 0x0000000000c681e9 in map::process_items_in_vehicles<bool (*)(item_stack&, __gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<item>, std::__debug::list<item, std::allocator<item> > >&, tripoint const&, std::string)> (this=0x1d47ce0, current_submap=0x55f3fe0, 
    processor=0xc49560 <process_map_items(item_stack&, __gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<item>, std::__debug::list<item, std::allocator<item> > >&, tripoint const&, std::string)>, signal="") at src/map.cpp:4810
#13 0x0000000000c6225d in map::process_items<bool (*)(item_stack&, __gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<item>, std::__debug::list<item, std::allocator<item> > >&, tripoint const&, std::string)> (this=0x1d47ce0, active=true, 
    processor=0xc49560 <process_map_items(item_stack&, __gnu_debug::_Safe_iterator<std::__cxx1998::_List_iterator<item>, std::__debug::list<item, std::allocator<item> > >&, tripoint const&, std::string)>, signal="") at src/map.cpp:4762
#14 0x0000000000c49529 in map::process_active_items (this=0x1d47ce0) at src/map.cpp:4744
#15 0x0000000000cf654e in game::do_turn (this=0x1d368d0) at src/game.cpp:1383
#16 0x0000000000ddd54f in main (argc=0, argv=0x7fffffffdff0) at src/main.cpp:434

I tried following the code through active_item_cache::get() and got stumped.

illi-kun commented 8 years ago

Is it still happens? I'm not able to reproduce this using the latest experimental build (on Windows, in case it matters).

lauriwesterlund commented 8 years ago

Odd, me neither (on Ubuntu). I guess it got fixed.

chaosvolt commented 8 years ago

Would've been nice to know what caused the bug, since some PR presumably fixed this unintentionally. Or someone found the cause and PR'd a fix without linking back here or otherwise letting us know, but that's unlikely. o3o