Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Crash when pouring liquid into an MRE bag

Open morikal opened this issue 7 months ago • 1 comments

Describe the bug

Crash when pouring into an MRE bag. My guess is the bag can't expand to fit its container? The empty MRE bag is inside an MRE package.

Attach save file

Midway Park-trimmed.tar.gz

Steps to reproduce

  1. 'D'rop the wielded can of 6 tomatoes into the fridge one tile to the northwest.
  2. When prompted about spilling the contents, choose 'Yes' to remove its contents first
  3. Choose to pour it into a 'c'ontainer
  4. Choose one of the small MRE bags.
  5. Game crashes

Expected behavior

Game does not crash

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.26100.4061 (24H2)
  • Game Version: cdda-experimental-2025-05-22-1609 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], Mind Over Matter [mindovermatter] ]

Additional context

The program has crashed. See the log file for a stack trace. CRASH LOG FILE: ./config/crash.log VERSION: cdda-experimental-2025-04-19-1619 TYPE: Signal MESSAGE: SIGSEGV: Segmentation fault STACK TRACE:

#0 (dbghelp: debug_write_backtrace+0xb5@0,000,7FF,7B7,0A7,265[cataclysm-tiles.exe+0x597,265]), #1 (dbghelp: log_crash+0x36d@0,000,7FF,7B7,067,68D[cataclysm-tiles.exe+0x557,68d]), #2 (dbghelp: signal_handler+0x63@0,000,7FF,7B7,067,C33[cataclysm-tiles.exe+0x557,c33]), #3 (dbghelp: seh_filter_exe+0x178@0,000,7FF,7B8,7D3,794[cataclysm-tiles.exe+0x1,cc3,794]), #4 (dbghelp: __scrt_common_main_seh'::1'::filt$0+0x16@0,000,7FF,7B8,A39,B4D[cataclysm-tiles.exe+0x1,f29,b4d]), #5 (dbghelp: _C_specific_handler+0xa0@0,000,7FF,7B8,7A0,9D4[cataclysm-tiles.exe+0x1,c90,9d4]), #6 (dbghelp: _chkstk+0x9f@0,000,7FF,AAB,5E0,6FF[ntdll.dll+0x160,6ff]), #7 (dbghelp: RtlWow64GetCurrentCpuArea+0xa98@0,000,7FF,AAB,4BA,328[ntdll.dll+0x3a,328]), #8 (dbghelp: KiUserExceptionDispatcher+0x2e@0,000,7FF,AAB,5E0,03E[ntdll.dll+0x160,03e]), #9 (dbghelp: inventory_haul_selector::apply_selection+0x4c8@0,000,7FF,7B8,0DD,698[cataclysm-tiles.exe+0x1,5cd,698]), #10 (dbghelp: haul+0x1,dad@0,000,7FF,7B7,69B,A0D[cataclysm-tiles.exe+0xb8b,a0d]), #11 (dbghelp: game::do_regular_action+0x1,159@0,000,7FF,7B7,68E,539[cataclysm-tiles.exe+0xb7e,539]), #12 (dbghelp: game::handle_action+0xa15@0,000,7FF,7B7,698,455[cataclysm-tiles.exe+0xb88,455]), #13 (dbghelp: do_turn+0xd89@0,000,7FF,7B7,0AF,979[cataclysm-tiles.exe+0x59f,979]), #14 (dbghelp: WinMain+0xeb5@0,000,7FF,7B6,F2E,995[cataclysm-tiles.exe+0x41e,995]), #15 (dbghelp: __scrt_common_main_seh+0x106@0,000,7FF,7B8,79D,612[cataclysm-tiles.exe+0x1,c8d,612]), #16 (dbghelp: BaseThreadInitThunk+0x17@0,000,7FF,AA9,7CE,8D7[KERNEL32.DLL+0x2e,8d7]), #17 (dbghelp: RtlUserThreadStart+0x2c@0,000,7FF,AAB,531,4FC[ntdll.dll+0xb1,4fc]),

morikal avatar May 25 '25 23:05 morikal

Using OP's repro world, under my Windows debug build I don't get a crash but an infinite loop here: https://github.com/CleverRaven/Cataclysm-DDA/blob/8d698f8e30f278f11135610ad71b469e532a82b6/src/item_pocket.cpp#L812

item->charges is 2 at every turn.

Moreover, the destination container small MRE bag is inside a sealed MRE package.

alef avatar Jun 09 '25 17:06 alef