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

Crash after trying to move spilled dried water #33962

Closed
l29ah opened this issue Sep 11, 2019 · 2 comments · Fixed by #37776
Closed

Crash after trying to move spilled dried water #33962

l29ah opened this issue Sep 11, 2019 · 2 comments · Fixed by #37776
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes. Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones Items / Item Actions / Item Qualities Items and how they work and interact
Milestone

Comments

@l29ah
Copy link
Contributor

l29ah commented Sep 11, 2019

Describe the bug

VERSION: 0.D-7542-ga5d33f6e61-dirty
TYPE: Signal
MESSAGE: SIGABRT: Abnormal termination
STACK TRACE:

	cataclysm(_Z21debug_write_backtraceRSo+0x33) [0x557c003a766e]
	cataclysm(+0x1803da8) [0x557c00377da8]
	cataclysm(+0x1803fb4) [0x557c00377fb4]
	/lib64/libc.so.6(+0x396b0) [0x7feb865bf6b0]
	/lib64/libc.so.6(gsignal+0x10b) [0x7feb865bf5eb]
	/lib64/libc.so.6(abort+0x123) [0x7feb865a8539]
	/lib64/libc.so.6(+0x22411) [0x7feb865a8411]
	/lib64/libc.so.6(+0x30c92) [0x7feb865b6c92]
	cataclysm(_ZN18advanced_inventory13query_chargesE12aim_locationRK21advanced_inv_listitemRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERi+0x1b3) [0x557c000875b3]
	cataclysm(_ZN18advanced_inventory7displayEv+0x1f34) [0x557c00083dc4]
	cataclysm(_Z12advanced_invv+0x39) [0x557c00088b3f]
	cataclysm(_ZN4game13handle_actionEv+0x126a) [0x557c00604506]
	cataclysm(_ZN4game7do_turnEv+0x86f) [0x557c00519611]
	cataclysm(main+0x111e) [0x557c009a6b24]
	/lib64/libc.so.6(__libc_start_main+0xeb) [0x7feb865a9ecb]
	cataclysm(_start+0x2a) [0x557bfff758ca]

	Attempting to repeat stack trace using debug symbols...
	debug_write_backtrace(std::ostream&)
	.../src/debug.cpp:620
	log_crash
	.../src/crash.cpp:263
	signal_handler
	.../src/crash.cpp:292
	killpg
	??:?
	gsignal
	??:?
	abort
	??:?
	??
	??:0
	__assert_fail
	??:?
	advanced_inventory::query_charges(aim_location, advanced_inv_listitem const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&)
	.../src/advanced_inv.cpp:2163
	advanced_inventory::display()
	.../src/advanced_inv.cpp:1668 (discriminator 1)
	advanced_inv()
	.../src/advanced_inv.cpp:2451
	game::handle_action()
	.../src/handle_action.cpp:1780
	game::do_turn()
	.../src/game.cpp:1450
	main
	.../src/main.cpp:688
	__libc_start_main
	??:?
	_start
	??:?

Steps To Reproduce

Steps to reproduce the behavior:

  1. Spill some water on the floor.
  2. Put a brazier there.
  3. Light it.
  4. Observe it spending all your fuel reserve rapidly.
  5. Try to move the zero volume of water from the brazier tile using AIM.
  6. Enjoy the crash.
@Night-Pryanik Night-Pryanik added <Crash / Freeze> Fatal bug that results in hangs or crashes. Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones Items / Item Actions / Item Qualities Items and how they work and interact labels Sep 11, 2019
@l29ah
Copy link
Contributor Author

l29ah commented Jan 19, 2020

Observed a similar crash when tried to pick up a frozen soup via AIM:

VERSION: 0.D-11430-g66807feaf6-dirty
TYPE: Signal
MESSAGE: SIGABRT: Abnormal termination
STACK TRACE:

    cataclysm(_Z21debug_write_backtraceRSo+0x3a) [0x55e05f42a05a]
    cataclysm(+0x7ef6db) [0x55e05f40f6db]
    cataclysm(+0x7efb28) [0x55e05f40fb28]
    /lib64/libc.so.6(+0x3a7e0) [0x7f53c98d47e0]
    /lib64/libc.so.6(gsignal+0x10b) [0x7f53c98d471b]
    /lib64/libc.so.6(abort+0x127) [0x7f53c98bc55d]
    /lib64/libc.so.6(+0x22431) [0x7f53c98bc431]
    /lib64/libc.so.6(+0x31da2) [0x7f53c98cbda2]
    cataclysm(_ZN18advanced_inventory13query_chargesE12aim_locationRK21advanced_inv_listitemRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERi+0xbea) [0x55e05f1efa7a]
    cataclysm(_ZN18advanced_inventory7displayEv+0x11f3) [0x55e05f1fcc23]
    cataclysm(_Z19create_advanced_invv+0x3b) [0x55e05f1fe46b]
    cataclysm(_ZNK13activity_type12call_do_turnEP15player_activityP6player+0x6e) [0x55e05f1e22ae]
    cataclysm(_ZN15player_activity7do_turnER6player+0xd2) [0x55e05fd50e32]
    cataclysm(_ZN4game16process_activityEv+0xc3) [0x55e05f543a83]
    cataclysm(_ZN4game7do_turnEv+0x1c7) [0x55e05f58a757]
    cataclysm(main+0xcf1) [0x55e05f0db6c1]
    /lib64/libc.so.6(__libc_start_main+0xeb) [0x7f53c98bde3b]
    cataclysm(_start+0x2a) [0x55e05f1612fa]

    Attempting to repeat stack trace using debug symbols…
    debug_write_backtrace(std::ostream&)
    …/src/debug.cpp:761
    std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider::_Alloc_hider(char*, std::allocator<char> const&)
    /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/g++-v8/bits/basic_string.h:146
    std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::allocator<char> const&)
    /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/g++-v8/bits/basic_string.h:430
    std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const
    /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/g++-v8/sstream:169
    std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::str() const
    /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/g++-v8/sstream:639
    log_crash
    …/src/crash.cpp:81
    signal_handler
    …/src/crash.cpp:115
    killpg
    ??:?
    gsignal
    ??:?
    abort
    ??:?
    ??
    ??:0
    __assert_fail
    ??:?
    advanced_inventory::query_charges(aim_location, advanced_inv_listitem const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&)
    …/src/advanced_inv.cpp:1633 (discriminator 1)
    advanced_inventory::display()
    …/src/advanced_inv.cpp:1227 (discriminator 1)
    create_advanced_inv()
    …/src/advanced_inv.cpp:68
    activity_type::call_do_turn(player_activity*, player*) const
    …/src/activity_type.cpp:113
    player_activity::do_turn(player&)
    …/src/player_activity.cpp:165
    game::process_activity()
    …/src/game.cpp:1632
    game::process_activity()
    …/src/game.cpp:1621
    game::all_npcs()
    …/src/game.cpp:11838
    game::do_turn()
    …/src/game.cpp:1420
    main
    …/src/main.cpp:688
    __libc_start_main
    ??:?
    _start
    ??:?

@ghost
Copy link

ghost commented Feb 6, 2020

still looking into this, but the brazier is a red herring.

Drop a liquid on the ground, open AIM, if you press m to move one, it correctly states "you cant pick up a liquid" , but if you press , to move all, it "moves" the liquid ( but nothing appears on the other side ) and the liquid left in that pane now has 0 weight, 0 volume and 0 charges, pressing m on it now causes the crash.

The bug is solely in the AIM code, probably not checking if its a liquid before it does move all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes. Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Inventory / AIM / Zones Inventory, Advanced Inventory Management or Zones Items / Item Actions / Item Qualities Items and how they work and interact
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants