Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault while attempting to reload a Minigun #20682

Closed
kevingranade opened this issue Mar 26, 2017 · 3 comments
Closed

Segfault while attempting to reload a Minigun #20682

kevingranade opened this issue Mar 26, 2017 · 3 comments

Comments

@kevingranade
Copy link
Member

Spawned new character, wished for a minigun, wished for a bunch of .308 ammo, wished for a .308 ammo belt.
Wielded Minigun
Hit reload, selected minigun belt
Segfault (backtrace):
#0 0x0000000000426819 in item::item (this=0x23da7a0) at src/item.h:121
#1 0x000000000042688b in __gnu_cxx::new_allocator<std::__cxx1998::_List_node >::construct<item, item const&> (__p=, this=) at /usr/include/c++/6.2.1/ext/new_allocator.h:120
#2 std::allocator_traits<std::allocator<std::__cxx1998::_List_node > >::construct<item, item const&> (__p=, __a=...) at /usr/include/c++/6.2.1/bits/alloc_traits.h:455
#3 std::__cxx1998::__cxx11::list<item, std::allocator >::_M_create_node<item const&> (this=0x5f06f40) at /usr/include/c++/6.2.1/bits/stl_list.h:571
#4 std::__cxx1998::__cxx11::list<item, std::allocator >::_M_insert<item const&> (__position=..., this=0x5f06f40) at /usr/include/c++/6.2.1/bits/stl_list.h:1770
#5 std::__cxx1998::__cxx11::list<item, std::allocator >::emplace_back<item const&> (this=0x5f06f40) at /usr/include/c++/6.2.1/bits/stl_list.h:1108
#6 std::__cxx1998::__cxx11::list<item, std::allocator >::_M_initialize_dispatch<std::__cxx1998::_List_const_iterator > (__last=..., __first=..., this=0x5f06f40) at /usr/include/c++/6.2.1/bits/stl_list.h:1699
#7 std::__cxx1998::__cxx11::list<item, std::allocator >::list (__x=..., this=0x5f06f40) at /usr/include/c++/6.2.1/bits/stl_list.h:651
#8 std::__debug::list<item, std::allocator >::list (this=0x5f06f28) at /usr/include/c++/6.2.1/debug/list:89
#9 item::item (this=0x5f06f00) at src/item.h:121
#10 0x000000000042688b in __gnu_cxx::new_allocator<std::__cxx1998::_List_node >::construct<item, item const&> (__p=, this=) at /usr/include/c++/6.2.1/ext/new_allocator.h:120
#11 std::allocator_traits<std::allocator<std::__cxx1998::_List_node > >::construct<item, item const&> (__p=, __a=...) at /usr/include/c++/6.2.1/bits/alloc_traits.h:455
#12 std::__cxx1998::__cxx11::list<item, std::allocator >::_M_create_node<item const&> (this=0x5f06590) at /usr/include/c++/6.2.1/bits/stl_list.h:571
#13 std::__cxx1998::__cxx11::list<item, std::allocator >::_M_insert<item const&> (__position=..., this=0x5f06590) at /usr/include/c++/6.2.1/bits/stl_list.h:1770
#14 std::__cxx1998::__cxx11::list<item, std::allocator >::emplace_back<item const&> (this=0x5f06590) at /usr/include/c++/6.2.1/bits/stl_list.h:1108
#15 std::__cxx1998::__cxx11::list<item, std::allocator >::_M_initialize_dispatch<std::__cxx1998::_List_const_iterator > (__last=..., __first=..., this=0x5f06590) at /usr/include/c++/6.2.1/bits/stl_list.h:1699
#16 std::__cxx1998::__cxx11::list<item, std::allocator >::list (__x=..., this=0x5f06590) at /usr/include/c++/6.2.1/bits/stl_list.h:651
#17 std::__debug::list<item, std::allocator >::list (this=0x5f06578) at /usr/include/c++/6.2.1/debug/list:89
#18 item::item (this=0x5f06550) at src/item.h:121
#19 0x00000000008baf63 in __gnu_cxx::new_allocator<std::__cxx1998::_List_node >::construct<item, item&> (__p=, this=) at /usr/include/c++/6.2.1/ext/new_allocator.h:120
#20 std::allocator_traits<std::allocator<std::__cxx1998::_List_node > >::construct<item, item&> (__p=, __a=...) at /usr/include/c++/6.2.1/bits/alloc_traits.h:455
#21 std::__cxx1998::__cxx11::list<item, std::allocator >::_M_create_node<item&> (this=0x21b4718) at /usr/include/c++/6.2.1/bits/stl_list.h:571
#22 std::__cxx1998::__cxx11::list<item, std::allocator >::_M_insert<item&> (__position=..., this=0x21b4718) at /usr/include/c++/6.2.1/bits/stl_list.h:1770
#23 std::__cxx1998::__cxx11::list<item, std::allocator >::emplace_back<item&> (this=0x21b4718) at /usr/include/c++/6.2.1/bits/stl_list.h:1108
#24 item::reload (this=this@entry=0x21b46d8, u=..., loc=..., qty=, qty@entry=1) at src/item.cpp:4754
#25 0x0000000000f954ac in activity_handlers::reload_finish (act=0x21b4de0, p=0x21b4160) at src/activity_handlers.cpp:1236
#26 0x0000000000f95a07 in std::_Function_handler<void (player_activity*, player*), void ()(player_activity, player*)>::_M_invoke(std::_Any_data const&, player_activity*&&, player*&&) (__functor=..., __args#0=, __args#1=) at /usr/include/c++/6.2.1/functional:1740
#27 0x000000000053fca5 in std::function<void (player_activity*, player*)>::operator()(player_activity*, player*) const (this=, __args#0=, __args#0@entry=0x21b4de0, __args#1=, __args#1@entry=0x21b4160) at /usr/include/c++/6.2.1/functional:2136
#28 0x000000000053be70 in activity_type::call_finish (this=, act=act@entry=0x21b4de0, p=p@entry=0x21b4160) at src/player_activity.cpp:102
#29 0x000000000053ef75 in player_activity::do_turn (this=this@entry=0x21b4de0, p=p@entry=0x21b4160) at src/player_activity.cpp:201
#30 0x000000000048b7b1 in game::process_activity (this=this@entry=0x215a000) at src/game.cpp:1660
#31 0x00000000004cb8dd in game::do_turn (this=0x215a000) at src/game.cpp:1452
#32 0x00000000009055b0 in main (argc=, argv=) at src/main.cpp:491

This is kind of weird, segfault on invoking a default constructor?

@codemime
Copy link
Contributor

Out of memory (unlikely, but who knows)? I couldn't reproduce the crash.

@Night-Pryanik
Copy link
Contributor

Couldn't either.

@kevingranade
Copy link
Member Author

Not specifically related to the minigun or anything, just dropped the ammo while reloading was in progress, which is a known issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants