Bug #939
closed
S3_1 : in client_unit_init_act_prob_cache() [../../client/climisc.c::1246]: assertion failed
Added by Alain BKR about 2 months ago.
Updated 4 days ago.
Description
very recent S3_1 from git
$ FC31-qt --version
Encodings: Data=UTF-8, Local=UTF-8, Internal=UTF-8
Freeciv version 3.1.2+ (bf5e640b4) gui-qt
1: in client_unit_init_act_prob_cache() [../../client/climisc.c::1246]: assertion 'punit->client.act_prob_cache == ((void*)0)' failed.
3: Backtrace:
3: 0: /Big/clang18/FC31/bin/FC31-qt(backtrace_print+0x30) [0x6217fb0b5c58]
3: 1: /Big/clang18/FC31/bin/FC31-qt(do_log+0xf9) [0x6217fb0d2c31]
3: 2: /Big/clang18/FC31/bin/FC31-qt(fc_assert_fail+0x96) [0x6217fb0d2fae]
3: 3: /Big/clang18/FC31/bin/FC31-qt(popup_action_selection+0x331b) [0x6217fa9d81b3]
3: 4: /Big/clang18/FC31/bin/FC31-qt(client_handle_packet+0x8e1) [0x6217fa83f549]
3: 5: /Big/clang18/FC31/bin/FC31-qt(client_packet_input+0x51) [0x6217fa75ba79]
3: 6: /Big/clang18/FC31/bin/FC31-qt(input_from_server+0x7c) [0x6217fa76b2c4]
3: 7: /Big/clang18/FC31/bin/FC31-qt(ZN9fc_client12server_inputEi+0xdb) [0x6217faa3170b]
3: 8: /Big/clang18/FC31/bin/FC31-qt(_ZN9QtPrivate11FunctorCallINS_11IndexesListIJLi0EEEENS_4ListIJ17QSocketDescriptorEEEvM9fc_clientFviEE4callES8_PS6_PPv+0xd8) [0x6217faa47c10]
3: 9: /lib/x86_64-linux-gnu/libQt5Core.so.5(+0x312e16) [0x77c886d12e16]
3: 10: /lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN15QSocketNotifier9activatedE17QSocketDescriptorNS_4TypeENS_14QPrivateSignalE+0x5d) [0x77c886d1654d]
3: 11: /lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN15QSocketNotifier5eventEP6QEvent+0x7b) [0x77c886d16dcb]
3: 12: /lib/x86_64-linux-gnu/libQt5Widgets.so.5(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x85) [0x77c88636bd45]
3: 13: /lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent+0x128) [0x77c886cd8118]
3: 14: /lib/x86_64-linux-gnu/libQt5Core.so.5(+0x335e9d) [0x77c886d35e9d]
3: 15: /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5d5b5) [0x77c884d145b5]
3: 16: /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0xbc717) [0x77c884d73717]
3: 17: /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x33) [0x77c884d13a53]
3: 18: /lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x69) [0x77c886d35279]
3: 19: /lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x13b) [0x77c886cd6a7b]
3: 20: /lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN16QCoreApplication4execEv+0x98) [0x77c886cdf3e8]
3: 21: /Big/clang18/FC31/bin/FC31-qt(_ZN9fc_client7fc_mainEP12QApplication+0x1b1) [0x6217faa2e2f1]
3: 22: /Big/clang18/FC31/bin/FC31-qt(_Z11qtg_ui_mainiPPc+0x576) [0x6217fa75430e]
3: 23: /Big/clang18/FC31/bin/FC31-qt(client_main+0x1c49) [0x6217fa75b3d1]
3: 24: /lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca) [0x77c885a2a1ca]
3: 25: /lib/x86_64-linux-gnu/libc.so.6(_libc_start_main+0x8b) [0x77c885a2a28b]
3: 26: /Big/clang18/FC31/bin/FC31-qt(_start+0x25) [0x6217fa726e35]
1: SVP, rapportez ce bogue à https://redmine.freeciv.org/projects/freeciv
Files
This likely has happened when you have chosen some specific action from the action selection list for the unit. Do you have any idea what the action might have been?
I have the same bug with client-gtk3.22
spy From yax mutal, near enemy Popo city (it should be the second or 3rd activated unit in the saved game)
- study city
- incite a revolt (which is not possible as it has a tribunal)
then i have the error just by drag-n-clicking on the city to open the chooser (study/sabotage/poison/revolt....)
The backtrace with gtk3.22 client
: in client_unit_init_act_prob_cache() [../../client/climisc.c::1246]: assertion 'punit->client.act_prob_cache == ((void*)0)' failed.
3: Backtrace:
3: 0: /Big/clang-18/FC31/bin/FC31clang-18-gtk3.22(__interceptor_backtrace+0x4a) [0x62f40bec815a]
3: 1: /Big/clang-18/FC31/bin/FC31clang-18-gtk3.22(backtrace_print+0x115) [0x62f40c7a52bd]
3: 2: /Big/clang-18/FC31/bin/FC31clang-18-gtk3.22(do_log+0x249) [0x62f40c7c9ca1]
3: 3: /Big/clang-18/FC31/bin/FC31clang-18-gtk3.22(fc_assert_fail+0x184) [0x62f40c7ca1ec]
3: 4: /Big/clang-18/FC31/bin/FC31clang-18-gtk3.22(popup_action_selection+0x1a3d) [0x62f40c171735]
3: 5: /Big/clang-18/FC31/bin/FC31clang-18-gtk3.22(client_handle_packet+0xce5) [0x62f40c090e4d]
3: 6: /Big/clang-18/FC31/bin/FC31clang-18-gtk3.22(client_packet_input+0x41) [0x62f40bf69129]
3: 7: /Big/clang-18/FC31/bin/FC31clang-18-gtk3.22(input_from_server+0x141) [0x62f40bf7e249]
3: 8: /Big/clang-18/FC31/bin/FC31clang-18-gtk3.22(+0x712b95) [0x62f40bf62b95]
3: 9: /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5d48e) [0x707c0d8f348e]
3: 10: /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0xbc717) [0x707c0d952717]
3: 11: /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_loop_run+0x127) [0x707c0d8f3f77]
3: 12: /lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_main+0x85) [0x707c0dffeb45]
3: 13: /Big/clang-18/FC31/bin/FC31clang-18-gtk3.22(ui_main+0x39a7) [0x62f40bf61c7f]
3: 14: /Big/clang-18/FC31/bin/FC31clang-18-gtk3.22(client_main+0x2207) [0x62f40bf6861f]
3: 15: /lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca) [0x707c0d62a1ca]
3: 16: /lib/x86_64-linux-gnu/libc.so.6(_libc_start_main+0x8b) [0x707c0d62a28b]
3: 17: /Big/clang-18/FC31/bin/FC31clang-18-gtk3.22(_start+0x25) [0x62f40be83845]
1: Please report this message at https://redmine.freeciv.org/projects/freeciv
compiled with llvm18
export CFLAGS='-g -O2 -fsanitize=undefined -fsanitize=address -Wno-cast-align -Wno-string-plus-int'
export CXXFLAGS='-std=gnu++17 -g -O2 -fsanitize=undefined -fsanitize=address -Wno-cast-align -Wno-string-plus-int'
export LDFLAGS='-fsanitize=undefined -fsanitize=address -Wno-cast-align -Wno-string-plus-int'
../autogen.sh --enable-gitrev --enable-debug=yes --enable-client=gtk3.22,qt --with-qtver=qt6 --enable-mapimg=auto
i have runtime error messages
../../common/packets_gen.c:2966:10: runtime error: call to function send_packet_player_ready_100 through pointer to incorrect function type 'int (*)(struct connection *, const void *)'
/Big/Games/FC/freeciv/build_clang-18/common/../../common/packets_gen.c:2884: note: send_packet_player_ready_100 defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../common/packets_gen.c:2966:10
../../utility/genlist.c:176:33: runtime error: call to function text_tag_copy through pointer to incorrect function type 'void *(*)(const void *)'
/Big/Games/FC/freeciv/build_clang-18/common/../../common/featured_text.c:664: note: text_tag_copy defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../utility/genlist.c:176:33
../../common/packets_gen.c:44343:10: runtime error: call to function send_packet_unit_server_side_agent_set_100 through pointer to incorrect function type 'int (*)(struct connection *, const void *)'
/Big/Games/FC/freeciv/build_clang-18/common/../../common/packets_gen.c:44071: note: send_packet_unit_server_side_agent_set_100 defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../common/packets_gen.c:44343:10
../../common/packets_gen.c:43965:10: runtime error: call to function send_packet_unit_orders_100 through pointer to incorrect function type 'int (*)(struct connection *, const void *)'
/Big/Games/FC/freeciv/build_clang-18/common/../../common/packets_gen.c:43338: note: send_packet_unit_orders_100 defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../common/packets_gen.c:43965:10
../../common/packets_gen.c:48099:10: runtime error: call to function send_packet_unit_change_activity_100 through pointer to incorrect function type 'int (*)(struct connection *, const void *)'
/Big/Games/FC/freeciv/build_clang-18/common/../../common/packets_gen.c:47780: note: send_packet_unit_change_activity_100 defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../common/packets_gen.c:48099:10
../../common/packets_gen.c:46742:10: runtime error: call to function send_packet_unit_get_actions_100 through pointer to incorrect function type 'int (*)(struct connection *, const void *)'
/Big/Games/FC/freeciv/build_clang-18/common/../../common/packets_gen.c:46339: note: send_packet_unit_get_actions_100 defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../common/packets_gen.c:46742:10
../../common/packets_gen.c:45606:10: runtime error: call to function send_packet_unit_do_action_100 through pointer to incorrect function type 'int (*)(struct connection *, const void *)'
/Big/Games/FC/freeciv/build_clang-18/common/../../common/packets_gen.c:45193: note: send_packet_unit_do_action_100 defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../common/packets_gen.c:45606:10
../../common/packets_gen.c:43123:10: runtime error: call to function send_packet_unit_sscs_set_100 through pointer to incorrect function type 'int (*)(struct connection *, const void *)'
/Big/Games/FC/freeciv/build_clang-18/common/../../common/packets_gen.c:42804: note: send_packet_unit_sscs_set_100 defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../common/packets_gen.c:43123:10
../../common/packets_gen.c:44856:10: runtime error: call to function send_packet_unit_action_query_100 through pointer to incorrect function type 'int (*)(struct connection *, const void *)'
/Big/Games/FC/freeciv/build_clang-18/common/../../common/packets_gen.c:44490: note: send_packet_unit_action_query_100 defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../common/packets_gen.c:44856:10
- Status changed from In Review to Closed
Also available in: Atom
PDF