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

game crashed after closing the achievement pop-up message #64466

Closed
gettingusedto opened this issue Mar 22, 2023 · 27 comments · Fixed by #64996
Closed

game crashed after closing the achievement pop-up message #64466

gettingusedto opened this issue Mar 22, 2023 · 27 comments · Fixed by #64996
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes. Game: Achievements / Conducts / Scores Player goals and how they are tracked. Help Wanted Not particularly urgent or easy (see Good First Issue for this), but help is appreciated with this! (P1 - Critical) Highest priority (for ex. crash fixes) (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@gettingusedto
Copy link
Contributor

Describe the bug

When i was studying a spell from the spellbook i found, i got the achievement pop-up for learning a spell. Closing said pop-up crashed the game.

Attach save file

Nelson-trimmed.tar.gz

Steps to reproduce

  1. set pop-up window when achievement completed to either first or always in the options. In my case, i set it to "first".
  2. open the save attached.
  3. learn a spell from magiclysm's "A beginner's guide to magic" and learn a spell from it.
  4. After learning a spell, you got a popup window.
  5. Close it.
  6. Crash

Expected behavior

Not crashing.

Screenshots

No response

Versions and configuration

  • OS: Android
    • OS Version: Manufacturer: samsung; Model: SM-A710F; Release: 7.0; Incremental: A710FXXU2CRC2;
  • Game Version: c1158ca [32-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    No Fungal Growth [no_fungal_growth],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Magiclysm [magiclysm],
    Xedra Evolved [xedra_evolved],
    DinoMod [DinoMod]
    ]

Additional context

crash.log
debug.log

@gettingusedto gettingusedto added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Mar 22, 2023
@AcidAntOnAMinefield
Copy link

Can confirm as it happened with the first kill achievement as well.

https://ibb.co/GnGVWqG
Build: 9d3d406

@Setmaster
Copy link
Contributor

Setmaster commented Mar 22, 2023

Can also confirm.

The program has crashed.
See the log file for a stack trace.
CRASH LOG FILE: C:/Users/skipper/Documents/Catapult/dda/userdata/config/crash.log
VERSION: 9d3d406
TYPE: Signal
MESSAGE: SIGABRT: Abnormal termination
STACK TRACE:

#0
(dbghelp: debug_write_backtrace+0xb5@0,000,7FF,686,908,995[cataclysm-tiles.exe+0x6a8,995]),
#1
(dbghelp: log_crash+0x372@0,000,7FF,686,8CC,DA2[cataclysm-tiles.exe+0x66c,da2]),
#2
(dbghelp: signal_handler+0x57@0,000,7FF,686,8CD,1F7[cataclysm-tiles.exe+0x66d,1f7]),
#3
(dbghelp: raise+0x23e@0,000,7FF,687,D14,AC6[cataclysm-tiles.exe+0x1,ab4,ac6]),
#4
(dbghelp: abort+0x18@0,000,7FF,687,D03,87C[cataclysm-tiles.exe+0x1,aa3,87c]),
#5
(dbghelp: achievements_tracker::report_achievement+0x281@0,000,7FF,687,46E,D61[cataclysm-tiles.exe+0x1,20e,d61]),
#6
(dbghelp: achievement_tracker::set_requirement+0x1db@0,000,7FF,687,46F,76B[cataclysm-tiles.exe+0x1,20f,76b]),
#7
(dbghelp: stats_tracker::stat_value_changed+0x11e@0,000,7FF,686,F09,6BE[cataclysm-tiles.exe+0xca9,6be]),
#8
(dbghelp: stats_tracker::transformed_set_changed+0x11e@0,000,7FF,686,F09,A4E[cataclysm-tiles.exe+0xca9,a4e]),
#9
(dbghelp: stats_tracker::stat_value_changed+0x11e@0,000,7FF,686,F09,6BE[cataclysm-tiles.exe+0xca9,6be]),
#10
(dbghelp: watcher_set<event_multiset_watcher>::send_to_all<event_multiset_watcher,cata::event const & __ptr64,stats_tracker & __ptr64,cata::event const & __ptr64,stats_tracker & __ptr64>+0x8c@0,000,7FF,686,F07,19C[cataclysm-tiles.exe+0xca7,19c]),
#11
(dbghelp: stats_tracker::notify+0x164@0,000,7FF,686,F09,124[cataclysm-tiles.exe+0xca9,124]),
#12
(dbghelp: event_bus::send+0x2c@0,000,7FF,686,EB8,B1C[cataclysm-tiles.exe+0xc58,b1c]),
#13
(dbghelp: stats_tracker::deserialize+0x947@0,000,7FF,686,ACC,9E7[cataclysm-tiles.exe+0x86c,9e7]),
#14
(dbghelp: JsonValue::read<stats_tracker>+0x2d@0,000,7FF,687,445,8FD[cataclysm-tiles.exe+0x1,1e5,8fd]),
#15
(dbghelp: past_game_info::past_game_info+0x24e@0,000,7FF,687,697,84E[cataclysm-tiles.exe+0x1,437,84e]),
#16
(dbghelp: std::vector<past_game_info,std::allocator<past_game_info> >::_Emplace_reallocate+0x165@0,000,7FF,687,694,BF5[cataclysm-tiles.exe+0x1,434,bf5]),
#17
(dbghelp: past_games_info::ensure_loaded+0xb56@0,000,7FF,687,699,806[cataclysm-tiles.exe+0x1,439,806]),
#18
(dbghelp: get_past_games+0x10@0,000,7FF,687,699,F40[cataclysm-tiles.exe+0x1,439,f40]),
#19
(dbghelp: achievement_attained+0x31b@0,000,7FF,686,9A8,0EB[cataclysm-tiles.exe+0x748,0eb]),
#20
(dbghelp: achievements_tracker::report_achievement+0x16f@0,000,7FF,687,46E,C4F[cataclysm-tiles.exe+0x1,20e,c4f]),
#21
(dbghelp: achievement_tracker::set_requirement+0x1db@0,000,7FF,687,46F,76B[cataclysm-tiles.exe+0x1,20f,76b]),
#22
(dbghelp: stats_tracker::stat_value_changed+0x11e@0,000,7FF,686,F09,6BE[cataclysm-tiles.exe+0xca9,6be]),
#23
(dbghelp: watcher_set<event_multiset_watcher>::send_to_all<event_multiset_watcher,cata::event const & __ptr64,stats_tracker & __ptr64,cata::event const & __ptr64,stats_tracker & __ptr64>+0x8c@0,000,7FF,686,F07,19C[cataclysm-tiles.exe+0xca7,19c]),
#24
(dbghelp: event_transformation_impl::state::event_added+0xc5@0,000,7FF,687,AFE,B35[cataclysm-tiles.exe+0x1,89e,b35]),
#25
(dbghelp: watcher_set<event_multiset_watcher>::send_to_all<event_multiset_watcher,cata::event const & __ptr64,stats_tracker & __ptr64,cata::event const & __ptr64,stats_tracker & __ptr64>+0x8c@0,000,7FF,686,F07,19C[cataclysm-tiles.exe+0xca7,19c]),
#26
(dbghelp: stats_tracker::notify+0x164@0,000,7FF,686,F09,124[cataclysm-tiles.exe+0xca9,124]),
#27
(dbghelp: event_bus::send+0x2c@0,000,7FF,686,EB8,B1C[cataclysm-tiles.exe+0xc58,b1c]),
#28
(dbghelp: Character::wake_up+0x1d9@0,000,7FF,686,CA0,019[cataclysm-tiles.exe+0xa40,019]),
#29
(dbghelp: sounds::process_sound_markers+0x80b@0,000,7FF,686,D94,2BB[cataclysm-tiles.exe+0xb34,2bb]),
#30
(dbghelp: do_turn+0x988@0,000,7FF,686,910,A38[cataclysm-tiles.exe+0x6b0,a38]),
#31
(dbghelp: WinMain+0xae7@0,000,7FF,686,79A,2F7[cataclysm-tiles.exe+0x53a,2f7]),
#32
(dbghelp: __scrt_common_main_seh+0x106@0,000,7FF,687,CED,902[cataclysm-tiles.exe+0x1,a8d,902]),
#33
(dbghelp: BaseThreadInitThunk+0x14@0,000,7FF,FAA,9E7,614[KERNEL32.DLL+0x17,614]),
#34
(dbghelp: RtlUserThreadStart+0x21@0,000,7FF,FAB,A82,6A1[ntdll.dll+0x52,6a1]),

@anothersimulacrum anothersimulacrum added <Crash / Freeze> Fatal bug that results in hangs or crashes. (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Mar 22, 2023
@jowtro
Copy link

jowtro commented Mar 22, 2023

On cataclysm-tiles Linux is failing too, commit: 6c5f917

Error msg:

cataclysm-tiles: src/achievement.cpp:790: void achievements_tracker::report_achievement(const achievement*, achievement_completion): Assertion `!achievements_status_.count( a->id )' failed.

How to reproduce:
Crashes after the "First-day achievement"

@pjf
Copy link
Contributor

pjf commented Mar 23, 2023

Can confirm on the Thank Goodness It's Friday achievement, except crashes before the achievement shows.

Click to open backtrace
VERSION: 0.G-807-g8c8d064c38
TYPE: Signal
MESSAGE: SIGABRT: Abnormal termination
STACK TRACE:

    ./cataclysm-tiles(debug_write_backtrace(std::ostream&)+0x24) [0x14fc557]
    ./cataclysm-tiles() [0x14dd98c]
    ./cataclysm-tiles() [0x14dd67a]
    /lib/x86_64-linux-gnu/libc.so.6(+0x430c0) [0x7fe553f3e0c0]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb) [0x7fe553f3e03b]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b) [0x7fe553f1d859]
    /lib/x86_64-linux-gnu/libc.so.6(+0x22729) [0x7fe553f1d729]
    /lib/x86_64-linux-gnu/libc.so.6(+0x34006) [0x7fe553f2f006]
    ./cataclysm-tiles(achievements_tracker::report_achievement(achievement const*, achievement_completion)+0x105) [0x10fea33]
    ./cataclysm-tiles(achievement_tracker::set_requirement(requirement_watcher*, bool)+0xdf) [0x10fd363]
    ./cataclysm-tiles(stats_tracker::stat_value_changed(string_id<event_statistic> const&, cata_variant const&)+0x4e) [0x20d11c4]
    ./cataclysm-tiles(event_statistic_count::state::events_reset(event_multiset const&, stats_tracker&)+0x6d) [0x15f7e51]
    ./cataclysm-tiles(stats_tracker::transformed_set_changed(string_id<event_transformation> const&, event_multiset const&)+0x4e) [0x20d1164]
    ./cataclysm-tiles(event_transformation_impl::state::new_value(cata_variant const&, stats_tracker&)+0x52) [0x15f6362]
    ./cataclysm-tiles(stats_tracker::stat_value_changed(string_id<event_statistic> const&, cata_variant const&)+0x4e) [0x20d11c4]
    ./cataclysm-tiles(event_statistic_last_value::state::event_added(cata::event const&, stats_tracker&)+0x6a) [0x15fa574]
    ./cataclysm-tiles(stats_tracker::notify(cata::event const&)+0x6c) [0x20d1314]
    ./cataclysm-tiles(event_bus::send(cata::event const&) const+0x20) [0x15e29b6]
    ./cataclysm-tiles(stats_tracker::deserialize(JsonObject const&)+0x381) [0x2035dcd]
    ./cataclysm-tiles(decltype ((({parm#1}.deserialize)(*this)),(true)) JsonValue::read<stats_tracker>(stats_tracker&, bool) const+0x2c) [0x1ef40c4]

    Attempting to repeat stack trace using debug symbols…
    debug_write_backtrace(std::ostream&)
    ??:?
    log_crash(char const*, char const*)
    crash.cpp:?
    signal_handler(int)
    crash.cpp:?
    __restore_rt
    sigaction.c:?
    __GI_raise
    /build/glibc-sMfBJT/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51 (discriminator 3)
    __GI_abort
    /build/glibc-sMfBJT/glibc-2.31/stdlib/abort.c:81 (discriminator 34)
    get_sysdep_segment_value
    /build/glibc-sMfBJT/glibc-2.31/intl/loadmsgcat.c:509
    _nl_load_domain
    /build/glibc-sMfBJT/glibc-2.31/intl/loadmsgcat.c:970
    __GI___assert_fail
    :?
    achievements_tracker::report_achievement(achievement const*, achievement_completion)
    ??:?
    achievement_tracker::set_requirement(requirement_watcher*, bool)
    ??:?
    stats_tracker::stat_value_changed(string_id<event_statistic> const&, cata_variant const&)
    ??:?
    event_statistic_count::state::events_reset(event_multiset const&, stats_tracker&)
    ??:?
    stats_tracker::transformed_set_changed(string_id<event_transformation> const&, event_multiset const&)
    ??:?
    event_transformation_impl::state::new_value(cata_variant const&, stats_tracker&)
    ??:?
    stats_tracker::stat_value_changed(string_id<event_statistic> const&, cata_variant const&)
    ??:?
    event_statistic_last_value::state::event_added(cata::event const&, stats_tracker&)
    ??:?
    stats_tracker::notify(cata::event const&)
    ??:?
    event_bus::send(cata::event const&) const
    ??:?
    stats_tracker::deserialize(JsonObject const&)
    ??:?
    decltype ((({parm#1}.deserialize)(*this)),(true)) JsonValue::read<stats_tracker>(stats_tracker&, bool) const
    ??:?

Version is 4ad1388 on Linux, with local patches applied unrelated to achievements.

@pjf
Copy link
Contributor

pjf commented Mar 23, 2023

Given the SIGABRT, and __GI___assert_fail showing up in the debug crash log, I'm guessing it's one of these that's causing it, but I don't know why:

cata_assert( comp != achievement_completion::pending );
cata_assert( !achievements_status_.count( a->id ) );

@Terrorforge
Copy link
Contributor

Also having this issue, posted save and debug data etc. in #64499 if anyone wants to have a look.

Curiously, I didn't crash when I leveled Computers all the way to 10 and got that achievement.

@anothersimulacrum
Copy link
Member

I'm not getting it on Linux.

@Wyghab
Copy link
Contributor

Wyghab commented Mar 23, 2023

I'm getting this too, however I found a workaround: Open the achievement menu with ')' before gaining achievements. This will load the past game data in advance, and achievements will popup without crashing the game.

@Ivan-Shestakov
Copy link
Contributor

Getting this too. But in my case it's by "Thanks god its Friday" and my autosave is when the character is sleeping :(
built from sources on macos from 4ad1388

@NetSysFire
Copy link
Member

The ones that can reproduce: What OS are you running?

@anothersimulacrum
Copy link
Member

It's possible it's not an OS thing and simply I don't have much/anything in the way of past games here.

@Termineitor244
Copy link
Contributor

It happens to me too in the android (x64) build, with the achievement of waking up after one day (The first day of the rest of their unlives), I can also confirm that opening the achievements menu after loading the last save before the crash did gave me the achievement without any crashes.

@Scrivener07
Copy link
Contributor

The ones that can reproduce: What OS are you running?

Windows 10 64bit

@Ivan-Shestakov
Copy link
Contributor

macOS 12.6.1 (Intel chip)

@c0bnut c0bnut mentioned this issue Mar 24, 2023
@NetSysFire NetSysFire added the Game: Achievements / Conducts / Scores Player goals and how they are tracked. label Mar 24, 2023
@NetSysFire
Copy link
Member

It's possible it's not an OS thing and simply I don't have much/anything in the way of past games here.

True. But we can now say with confidence its not an OS thing.

@TurtsMcSquirts
Copy link

TurtsMcSquirts commented Mar 24, 2023

Also having this issue with the "Way of the Sword" achievement. The crash happens before the achievement pops up. Running on Windows 10.

The program has crashed.
See the log file for a stack trace.
CRASH LOG FILE: ./config/crash.log
VERSION: bfffbf2
TYPE: Signal
MESSAGE: SIGABRT: Abnormal termination
STACK TRACE:

#0
(dbghelp: debug_write_backtrace+0xb5@0,000,7FF,642,D68,B85[cataclysm-tiles.exe+0x6a8,b85]),
#1
(dbghelp: log_crash+0x372@0,000,7FF,642,D2C,F92[cataclysm-tiles.exe+0x66c,f92]),
#2
(dbghelp: signal_handler+0x57@0,000,7FF,642,D2D,3E7[cataclysm-tiles.exe+0x66d,3e7]),
#3
(dbghelp: raise+0x23e@0,000,7FF,644,175,1F6[cataclysm-tiles.exe+0x1,ab5,1f6]),
#4
(dbghelp: abort+0x18@0,000,7FF,644,163,FAC[cataclysm-tiles.exe+0x1,aa3,fac]),
#5
(dbghelp: achievements_tracker::report_achievement+0x281@0,000,7FF,643,8CF,091[cataclysm-tiles.exe+0x1,20f,091]),
#6
(dbghelp: achievement_tracker::set_requirement+0x1db@0,000,7FF,643,8CF,A9B[cataclysm-tiles.exe+0x1,20f,a9b]),
#7
(dbghelp: stats_tracker::stat_value_changed+0x11e@0,000,7FF,643,369,B8E[cataclysm-tiles.exe+0xca9,b8e]),
#8
(dbghelp: stats_tracker::transformed_set_changed+0x11e@0,000,7FF,643,369,F1E[cataclysm-tiles.exe+0xca9,f1e]),
#9
(dbghelp: stats_tracker::stat_value_changed+0x11e@0,000,7FF,643,369,B8E[cataclysm-tiles.exe+0xca9,b8e]),
#10
(dbghelp: watcher_set<event_multiset_watcher>::send_to_all<event_multiset_watcher,cata::event const & __ptr64,stats_tracker & __ptr64,cata::event const & __ptr64,stats_tracker & __ptr64>+0x8c@0,000,7FF,643,367,66C[cataclysm-tiles.exe+0xca7,66c]),
#11
(dbghelp: stats_tracker::notify+0x164@0,000,7FF,643,369,5F4[cataclysm-tiles.exe+0xca9,5f4]),
#12
(dbghelp: event_bus::send+0x2c@0,000,7FF,643,318,FEC[cataclysm-tiles.exe+0xc58,fec]),
#13
(dbghelp: stats_tracker::deserialize+0x947@0,000,7FF,642,F2C,BD7[cataclysm-tiles.exe+0x86c,bd7]),
#14
(dbghelp: JsonValue::read<stats_tracker>+0x2d@0,000,7FF,643,8A5,C2D[cataclysm-tiles.exe+0x1,1e5,c2d]),
#15
(dbghelp: past_game_info::past_game_info+0x24e@0,000,7FF,643,AF7,CFE[cataclysm-tiles.exe+0x1,437,cfe]),
#16
(dbghelp: std::vector<past_game_info,std::allocator<past_game_info> >::_Emplace_reallocate+0x165@0,000,7FF,643,AF5,0A5[cataclysm-tiles.exe+0x1,435,0a5]),
#17
(dbghelp: past_games_info::ensure_loaded+0xb56@0,000,7FF,643,AF9,CB6[cataclysm-tiles.exe+0x1,439,cb6]),
#18
(dbghelp: get_past_games+0x10@0,000,7FF,643,AFA,3F0[cataclysm-tiles.exe+0x1,43a,3f0]),
#19
(dbghelp: achievement_attained+0x31b@0,000,7FF,642,E08,2DB[cataclysm-tiles.exe+0x748,2db]),
#20
(dbghelp: achievements_tracker::report_achievement+0x16f@0,000,7FF,643,8CE,F7F[cataclysm-tiles.exe+0x1,20e,f7f]),
#21
(dbghelp: achievement_tracker::set_requirement+0x1db@0,000,7FF,643,8CF,A9B[cataclysm-tiles.exe+0x1,20f,a9b]),
#22
(dbghelp: stats_tracker::stat_value_changed+0x11e@0,000,7FF,643,369,B8E[cataclysm-tiles.exe+0xca9,b8e]),
#23
(dbghelp: watcher_set<event_multiset_watcher>::send_to_all<event_multiset_watcher,cata::event const & __ptr64,stats_tracker & __ptr64,cata::event const & __ptr64,stats_tracker & __ptr64>+0x8c@0,000,7FF,643,367,66C[cataclysm-tiles.exe+0xca7,66c]),
#24
(dbghelp: event_transformation_impl::state::event_added+0xc5@0,000,7FF,643,F5F,265[cataclysm-tiles.exe+0x1,89f,265]),
#25
(dbghelp: watcher_set<event_multiset_watcher>::send_to_all<event_multiset_watcher,cata::event const & __ptr64,stats_tracker & __ptr64,cata::event const & __ptr64,stats_tracker & __ptr64>+0x8c@0,000,7FF,643,367,66C[cataclysm-tiles.exe+0xca7,66c]),
#26
(dbghelp: stats_tracker::notify+0x164@0,000,7FF,643,369,5F4[cataclysm-tiles.exe+0xca9,5f4]),
#27
(dbghelp: event_bus::send+0x2c@0,000,7FF,643,318,FEC[cataclysm-tiles.exe+0xc58,fec]),
#28
(dbghelp: Character::practice+0x43e@0,000,7FF,643,0E7,67E[cataclysm-tiles.exe+0xa27,67e]),
#29
(dbghelp: melee_train+0x139@0,000,7FF,643,6FC,309[cataclysm-tiles.exe+0x1,03c,309]),
#30
(dbghelp: Character::melee_attack_abstract+0x2,f00@0,000,7FF,643,6F8,D00[cataclysm-tiles.exe+0x1,038,d00]),
#31
(dbghelp: Character::melee_attack+0x1ea@0,000,7FF,643,6F5,D6A[cataclysm-tiles.exe+0x1,035,d6a]),
#32
(dbghelp: Character::melee_attack+0x59@0,000,7FF,643,6F5,AD9[cataclysm-tiles.exe+0x1,035,ad9]),
#33
(dbghelp: avatar_action::move+0x1,2b3@0,000,7FF,643,9BE,D13[cataclysm-tiles.exe+0x1,2fe,d13]),
#34
(dbghelp: game::do_regular_action+0x774@0,000,7FF,643,336,5C4[cataclysm-tiles.exe+0xc76,5c4]),
#35
(dbghelp: game::handle_action+0x944@0,000,7FF,643,340,494[cataclysm-tiles.exe+0xc80,494]),
#36
(dbghelp: do_turn+0xe80@0,000,7FF,642,D71,120[cataclysm-tiles.exe+0x6b1,120]),
#37
(dbghelp: WinMain+0xae7@0,000,7FF,642,BFA,4E7[cataclysm-tiles.exe+0x53a,4e7]),
#38
(dbghelp: __scrt_common_main_seh+0x106@0,000,7FF,644,14E,032[cataclysm-tiles.exe+0x1,a8e,032]),
#39
(dbghelp: BaseThreadInitThunk+0x14@0,000,7FF,970,EC7,614[KERNEL32.DLL+0x17,614]),
#40
(dbghelp: RtlUserThreadStart+0x21@0,000,7FF,972,EC2,6A1[ntdll.dll+0x52,6a1]),

@kevingranade
Copy link
Member

This issue has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/game-continually-crashes-when-creature-dies/28632/2

@c0bnut
Copy link
Contributor

c0bnut commented Mar 24, 2023

The best workaround is to set "Popup window when achievement completed" to Never. This way it simply won't crash and you don't have to disable achievements or anticipate when the popup window will appear.

@Setmaster
Copy link
Contributor

Setmaster commented Mar 24, 2023

The best workaround is to set "Popup window when achievement completed" to Never. This way it simply won't crash and you don't have to disable achievements or anticipate when the popup window will appear.

Where is this option?

Edit: It's under Interface options, line 42.

@NetSysFire NetSysFire added the Help Wanted Not particularly urgent or easy (see Good First Issue for this), but help is appreciated with this! label Mar 25, 2023
@Uplinkedxd
Copy link

Uplinkedxd commented Mar 25, 2023

(https://github.com/CleverRaven/Cataclysm-DDA/files/11067598/crash.log)
Also receiving this issue on the latest build + a couple days back.
(removed the rest, I'm dumb.)

@anothersimulacrum
Copy link
Member

That keybind was just removed as a top-level keybind #64470

@Uplinkedxd
Copy link

That keybind was just removed as a top-level keybind #64470

Well, disregard, I'm dumb. lol

@NetSysFire
Copy link
Member

In order to avoid even more duplicates, I have pinned this one now.

@NetSysFire NetSysFire added the (P1 - Critical) Highest priority (for ex. crash fixes) label Mar 27, 2023
@andrei8l
Copy link
Contributor

andrei8l commented Mar 29, 2023

Introduced by 86a398f (#63488). The "migration" runs on stats from past games, in the middle of the achievement callback, and screws up the order of operations.

The achievement tracker code is pretty hard to follow, but this fixes the crash:

diff --git a/src/achievement.cpp b/src/achievement.cpp
index bbec6598f4..6229162f4a 100644
--- a/src/achievement.cpp
+++ b/src/achievement.cpp
@@ -798,12 +798,12 @@ void achievements_tracker::report_achievement( const achievement *a, achievement
         tracker_it->second.current_values()
     }
     );
+    trackers_.erase( tracker_it );
     if( comp == achievement_completion::completed ) {
         achievement_attained_callback_( a, is_enabled() );
     } else if( comp == achievement_completion::failed ) {
         achievement_failed_callback_( a, is_enabled() );
     }
-    trackers_.erase( tracker_it );
 }
 
 achievement_completion achievements_tracker::is_completed( const achievement_id &id ) const

(the required bits are copied just above that)

@Mister-Cultist
Copy link

confirm that, I thought it was just from the robot killing one.

@Devinil
Copy link

Devinil commented Mar 30, 2023

Its still happening, whats wrong with the achievements?

@kevingranade
Copy link
Member

This issue has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/crashes-while-getting-any-achievement/28668/2

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. Game: Achievements / Conducts / Scores Player goals and how they are tracked. Help Wanted Not particularly urgent or easy (see Good First Issue for this), but help is appreciated with this! (P1 - Critical) Highest priority (for ex. crash fixes) (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.