Cataclysm-dda: Segfault while try to Read

Created on 19 Sep 2020  Â·  3Comments  Â·  Source: CleverRaven/Cataclysm-DDA

Describe the bug


With the latest experimental 11015, it sometimes causes a segfault when I'm trying to Read or Use. It only happened in MacOS, and works fine in the latest experimental Android build (it is somehow below the Mac build)

Steps To Reproduce

  1. Add arcana mod(but I think that JSON only mod isn't the cause)
  2. Load this save
  3. Press "R"

Expected behavior

No segfault

Versions and configuration

  • OS: Mac 10.15.6
  • Game Version: 0.E 11015 : 0.E-6052-gfacb03d
  • Graphics version: Tiles
  • Ingame language: Chinese (Simplified)
  • Mods loaded: arcana and some core mods

Additional context

cdda-arcana-mod-master.zip

Folder inside Library/Application Support/Cataclysm/save

阿加德.zip

Screen Shot 2020-09-19 at 8 21 06 PM

Longer version:
https://pastebin.com/GKtXCRZe

The program has crashed.
See the log file for a stack trace.
CRASH LOG FILE: /Users/linonetwo/Library/Application Support/Cataclysm/config/crash.log
VERSION: 0.E-6052-gfacb03d
TYPE: Signal
MESSAGE: SIGSEGV: Segmentation fault
STACK TRACE:

    0   cataclysm-tiles                     0x000000010bee5cd6 _Z21debug_write_backtraceRNSt3__113basic_ostreamIcNS_11char_traitsIcEEEE + 38
    1   cataclysm-tiles                     0x000000010be4a593 _Z9log_crashPKcS0_ + 2083
    2   cataclysm-tiles                     0x000000010be49b9a _Z14signal_handleri + 154
    3   libsystem_platform.dylib            0x00007fff6ee365fd _sigtramp + 29
    4   CoreFoundation                      0x00007fff34b75612 __CFStringDecodeByteStream3 + 1787
    5   cataclysm-tiles                     0x000000010e849b1c _ZNK20localized_comparatorclERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_ + 636
    6   cataclysm-tiles                     0x000000010e849840 _ZNK11translation13translated_ltERKS_ + 80
    7   cataclysm-tiles                     0x000000010ca344de _ZNK13item_categoryltERKS_ + 110
    8   cataclysm-tiles                     0x000000010c860c43 _ZZN16inventory_column9add_entryERK15inventory_entryENK3$_9clES2_ + 147
    9   cataclysm-tiles                     0x000000010c8226b3 _ZN16inventory_column9add_entryERK15inventory_entry + 1747
    10  cataclysm-tiles                     0x000000010c82ebce _ZN18inventory_selector9add_entryER16inventory_columnONSt3__16vectorI13item_locationNS2_9allocatorIS4_EEEEPK13item_category + 462
    11  cataclysm-tiles                     0x000000010c82fa13 _ZN18inventory_selector9add_itemsER16inventory_columnRKNSt3__18functionIF13item_locationP4itemEEERKNS2_6vectorINS2_4listIS6_NS2_9allocatorIS6_EEEENSD_ISF_EEEEPK13item_category + 2515
    12  cataclysm-tiles                     0x000000010c831f27 _ZN18inventory_selector13add_map_itemsERK8tripoint + 471
    13  cataclysm-tiles                     0x000000010c83342d _ZN18inventory_selector16add_nearby_itemsEi + 813
    14  cataclysm-tiles                     0x000000010c521278 _ZL12inv_internalR9CharacterRK25inventory_selector_presetRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEiSC_SC_ + 1096
    15  cataclysm-tiles                     0x000000010c52798b _ZN10game_menus3inv4readER6player + 827
    16  cataclysm-tiles                     0x000000010c607a90 _ZL4readv + 48
    17  cataclysm-tiles                     0x000000010c5f6fa9 _ZN4game13handle_actionEv + 15161
    18  cataclysm-tiles                     0x000000010c3a61f2 _ZN4game7do_turnEv + 3442
    19  cataclysm-tiles                     0x000000010d05bb64 main + 7828

    Attempting to repeat stack trace using debug symbols…
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
    backtrace: Could not extract binary name from line
<Crash / Freeze> macOS Translation [C++]

Most helpful comment

I can confirm that the game will crash on MacOS if you select the zh_CN (Chinese (Simplified)) locale and try to sort the categories (press R or a). I will create a PR with a fix now.

All 3 comments

I cannot reproduce on Linux. Given that this is appearing to be an issue with our translated sorting, which is implemented differently for different platforms, I'm going to notify @jbytheway, and the crash can probably only be reproduced on OSX.

...and I'm going to pass the buck to @akirashirosawa who implemented the OSX sorting in #40100.

I can confirm that the game will crash on MacOS if you select the zh_CN (Chinese (Simplified)) locale and try to sort the categories (press R or a). I will create a PR with a fix now.

Was this page helpful?
0 / 5 - 0 ratings