Crash starting Legend of the Invincibles

Having trouble with the game? Report issues and get help here. Read this first!

Moderators: Forum Moderators, Developers

Forum rules
Before reporting issues in this section, you must read the following topic:
Battlecruiser_Venca
Posts: 196
Joined: June 3rd, 2009, 11:37 am
Contact:

Crash starting Legend of the Invincibles

Post by Battlecruiser_Venca » May 29th, 2016, 9:39 pm

Commit 1649930113480c0fdf8e1e949445d4c9a9022265 in 1.13.x makes wesnoth crash when starting LotI (and might crash other camapigns)

User avatar
Dugi
Posts: 4925
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » May 30th, 2016, 5:28 am

Battlecruiser_Venca wrote:Commit 1649930113480c0fdf8e1e949445d4c9a9022265 in 1.13.x makes wesnoth crash when starting LotI (and might crash other camapigns)
It does not even compile for me. It appears that something is screwed up in wesnoth's source.

Battlecruiser_Venca
Posts: 196
Joined: June 3rd, 2009, 11:37 am
Contact:

Re: Legend of the Invincibles

Post by Battlecruiser_Venca » May 30th, 2016, 7:43 am

Dugi wrote:
Battlecruiser_Venca wrote:Commit 1649930113480c0fdf8e1e949445d4c9a9022265 in 1.13.x makes wesnoth crash when starting LotI (and might crash other camapigns)
It does not even compile for me. It appears that something is screwed up in wesnoth's source.
Here's the log from git bisect. The skipped commits mean that wesnoth does not compile for me
Spoiler:

User avatar
Celtic_Minstrel
Developer
Posts: 1521
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Legend of the Invincibles

Post by Celtic_Minstrel » May 30th, 2016, 4:56 pm

Maybe you should consider opening a ticket at GNA with more details of the error message?
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

User avatar
Dugi
Posts: 4925
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Legend of the Invincibles

Post by Dugi » May 30th, 2016, 5:52 pm

This is what I am getting when I try to compile the latest source revision (or maybe not the latest, I downloaded it on Monday, 7 am) with scons:

Code: Select all

build/release/libwesnoth_extras.a(lua_gui2.o): In function `lua_gui2::show_message_dialog(lua_State*, CVideo&)':
lua_gui2.cpp:(.text+0x1f32): undefined reference to `gui2::tlegacy_menu_item::tlegacy_menu_item(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
build/release/libwesnoth_extras.a(formula.o): In function `game_logic::formula::formula(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, game_logic::function_symbol_table*)':
formula.cpp:(.text+0xbae9): undefined reference to `formula_tokenizer::get_token(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >)'
build/release/libwesnoth_extras.a(campaign_difficulty.o): In function `gui2::tcampaign_difficulty::tcampaign_difficulty(config const&)':
campaign_difficulty.cpp:(.text+0x4c2): undefined reference to `gui2::tlegacy_menu_item::tlegacy_menu_item(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
build/release/libwesnoth_extras.a(multiplayer_lobby.o): In function `mp::gamebrowser::populate_game_item_campaign_or_scenario_info(mp::gamebrowser::game_item&, config const&, config const&, bool&)':
multiplayer_lobby.cpp:(.text+0x6d99): undefined reference to `gui2::tlegacy_menu_item::tlegacy_menu_item(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
Undefined reference is an error I really hate, it's always something highly arcane broken in the installation script.

Battlecruiser_Venca
Posts: 196
Joined: June 3rd, 2009, 11:37 am
Contact:

Re: Legend of the Invincibles

Post by Battlecruiser_Venca » May 30th, 2016, 7:09 pm

I always compiled with Cmake

User avatar
Celtic_Minstrel
Developer
Posts: 1521
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Legend of the Invincibles

Post by Celtic_Minstrel » May 31st, 2016, 2:57 am

Well, that's certainly a weird error. I know which files those first two undefined symbols come from, and there's no way they'd be missing from the scons build, so you could be right about it being something highly arcane broken in the installation script. (I suppose there's the possibility of fixing it by moving the file references from one list to another in src/SConscript. The files in question should be src/gui/auxiliary/old_markup.cpp and src/formula/tokenizer.cpp. I'm not quite sure about the other undefined symbols, but it's probably easy to figure out what files they're defined in.) Since the symbols reference C++ standard library classes, there's also the possibility that you're attempting to link against an incompatible C++ standard library. I'm not sure how likely this is though (probably not very).

As for Venca, are you getting the same errors or something different?
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

Battlecruiser_Venca
Posts: 196
Joined: June 3rd, 2009, 11:37 am
Contact:

Re: Legend of the Invincibles

Post by Battlecruiser_Venca » May 31st, 2016, 8:55 am

I just tested scons for you:

Code: Select all

etags -l c++ || (ctags --tag-relative=yes -f src/tags)
etags: no input files specified.
	Try `etags --help' for a complete list of options.
ctags: No files specified. Try "ctags --help".
scons: *** [TAGS] Error 1
scons: building terminated because of errors.
Cmake builds normally

BTW the crash with LotI since the mentioned commit leaves this in terminal:

Code: Select all

wesnoth: /usr/include/boost/smart_ptr/shared_ptr.hpp:693: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = name_generator; typename boost::detail::sp_member_access<T>::type = name_generator*]: Assertion `px != 0' failed.
Neúspěšně ukončen (SIGABRT)


User avatar
shadowm
Site Administrator
Posts: 6573
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Legend of the Invincibles

Post by shadowm » May 31st, 2016, 9:00 am

Battlecruiser_Venca wrote:I just tested scons for you:

Code: Select all

etags -l c++ || (ctags --tag-relative=yes -f src/tags)
etags: no input files specified.
	Try `etags --help' for a complete list of options.
ctags: No files specified. Try "ctags --help".
scons: *** [TAGS] Error 1
scons: building terminated because of errors.
Looks like you tried to build the TAGS (ctags) target, which is not essential and has nothing to do with building the game executable. Try running scons wesnoth wesnothd instead.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.

User avatar
Dugi
Posts: 4925
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Crash starting Legend of the Invincibles

Post by Dugi » May 31st, 2016, 9:39 am

Latest version, as of Tuesday 11 am, still produces linker errors. I am not trying to compile anything unusual.

Code: Select all

scons wesnoth wesnothd -j4

Code: Select all

g++ -o wesnoth -pthread build/release/wesnoth.o build/release/libwesnoth_extras.a build/release/lua/liblua.a build/release/libwesnoth_core.a build/release/libwesnoth.a build/release/libwesnoth_sdl.a build/release/libwesnoth_extras.a build/release/lua/liblua.a -L/usr/lib -lm -lSDL2_net -lboost_iostreams -lboost_random -lboost_system -lboost_filesystem -lboost_locale -lSDL2 -lSDL2_ttf -lSDL2_mixer -lSDL2_image -lvorbisfile -lpthread -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo -lfontconfig -lfreetype -lboost_program_options -lboost_thread -lboost_regex -lX11 -ldbus-1 -lfribidi -lpng -lhistory
build/release/libwesnoth_extras.a(lua_gui2.o): In function `lua_gui2::show_message_dialog(lua_State*, CVideo&)':
lua_gui2.cpp:(.text+0x1f32): undefined reference to `gui2::tlegacy_menu_item::tlegacy_menu_item(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
build/release/libwesnoth_extras.a(formula.o): In function `game_logic::formula::formula(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, game_logic::function_symbol_table*)':
formula.cpp:(.text+0xbae9): undefined reference to `formula_tokenizer::get_token(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >)'
build/release/libwesnoth_extras.a(campaign_difficulty.o): In function `gui2::tcampaign_difficulty::tcampaign_difficulty(config const&)':
campaign_difficulty.cpp:(.text+0x4c2): undefined reference to `gui2::tlegacy_menu_item::tlegacy_menu_item(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
build/release/libwesnoth_extras.a(multiplayer_lobby.o): In function `mp::gamebrowser::populate_game_item_campaign_or_scenario_info(mp::gamebrowser::game_item&, config const&, config const&, bool&)':
multiplayer_lobby.cpp:(.text+0x6d99): undefined reference to `gui2::tlegacy_menu_item::tlegacy_menu_item(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
@Battlecruiser_Venca
The error looks like something with lua binding of the new name generator, which is not something that is used by LotI (yet). I suppose that all campaigns produce this error. It appears to be dereferencing a null pointer in an environment where this is checked (a debug build?).

Battlecruiser_Venca
Posts: 196
Joined: June 3rd, 2009, 11:37 am
Contact:

Re: Crash starting Legend of the Invincibles

Post by Battlecruiser_Venca » May 31st, 2016, 2:11 pm

It looks like LotI-specific crash, for example HttT doesn't crash.

BTW when building with:

Code: Select all

scons wesnoth wesnothd -j8
I got a successful build

User avatar
Dugi
Posts: 4925
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Crash starting Legend of the Invincibles

Post by Dugi » May 31st, 2016, 2:23 pm

Try to run it under gdb and when it crashes, write bt a few times into its input and paste the output here.

EDIT: I managed to compile it, forcing scons to restart from scratch without cache or .o files did the trick.

EDIT #2: I can't replicate your crash issue. Today's version does not crash on LotI for me. You'll have to debug it yourself or at least provide more exact information.

Battlecruiser_Venca
Posts: 196
Joined: June 3rd, 2009, 11:37 am
Contact:

Re: Crash starting Legend of the Invincibles

Post by Battlecruiser_Venca » May 31st, 2016, 4:21 pm

here you go

Code: Select all

wesnoth: /usr/include/boost/smart_ptr/shared_ptr.hpp:693: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = name_generator; typename boost::detail::sp_member_access<T>::type = name_generator*]: Assertion `px != 0' failed.

Thread 1 "wesnoth" received signal SIGABRT, Aborted.
0x00007ffff3c72418 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff3c72418 in raise () at /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff3c7401a in abort () at /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff3c6abd7 in  () at /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff3c6ac82 in  () at /lib/x86_64-linux-gnu/libc.so.6
#4  0x0000000002098b7d in boost::shared_ptr<name_generator>::operator->() const (this=0x2d71b00 <unit_race::null_race+192>)
    at /usr/include/boost/smart_ptr/shared_ptr.hpp:693
#5  0x00000000020987f9 in unit_race::generate_name[abi:cxx11](unit_race::GENDER) const (this=0x2d71a40 <unit_race::null_race>, gender=unit_race::MALE)
    at /home/venca/git/wesnoth/src/units/race.cpp:125
#6  0x000000000200c442 in unit::generate_name() (this=0x342b480)
    at /home/venca/git/wesnoth/src/units/unit.cpp:807
#7  0x0000000002009c16 in unit::unit(config const&, bool, vconfig const*, n_unit::id_manager*) (this=0x342b480, cfg=..., use_traits=true, vcfg=0x7fffffffa210, id_manager=0x7fffc950c7a8) at /home/venca/git/wesnoth/src/units/unit.cpp:594
#8  0x00000000018cb30f in unit_creator::add_unit(config const&, vconfig const*) (this=0x7fffffff9890, cfg=..., vcfg=0x7fffffffa210)
    at /home/venca/git/wesnoth/src/actions/unit_creator.cpp:168
#9  0x0000000001c52aa0 in game_events::wml_func_unit(game_events::queued_event const&, vconfig const&) (cfg=...)
    at /home/venca/git/wesnoth/src/game_events/action_wml.cpp:1151
#10 0x0000000001f619de in game_lua_kernel::cfun_wml_action(lua_State*) (this=
    0x7fffcf51efc0, L=0x7fffcea35fd8)
---Type <return> to continue, or q <return> to quit---
    at /home/venca/git/wesnoth/src/scripting/game_lua_kernel.cpp:5074
#11 0x0000000001f6700b in dispatch<&game_lua_kernel::cfun_wml_action>(lua_State*) (L=0x7fffcea35fd8)
    at /home/venca/git/wesnoth/src/scripting/game_lua_kernel.cpp:4471
#12 0x00000000021b8c34 in luaD_precall(lua_State*, lua_TValue*, int) (L=0x7fffcea35fd8, func=0x7fffce368da0, nresults=0)
    at /home/venca/git/wesnoth/src/lua/ldo.cpp:341
#13 0x00000000021cab56 in luaV_execute(lua_State*) (L=0x7fffcea35fd8)
    at /home/venca/git/wesnoth/src/lua/lvm.cpp:709
#14 0x00000000021b90aa in luaD_call(lua_State*, lua_TValue*, int, int) (L=0x7fffcea35fd8, func=0x7fffce368cc0, nResults=0, allowyield=0)
    at /home/venca/git/wesnoth/src/lua/ldo.cpp:424
#15 0x00000000021b4e85 in f_call(lua_State*, void*) (L=0x7fffcea35fd8, ud=0x7fffffffa810) at /home/venca/git/wesnoth/src/lua/lapi.cpp:917
#16 0x00000000021b80f7 in luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) (L=0x7fffcea35fd8, f=0x21b4e4e <f_call(lua_State*, void*)>, ud=0x7fffffffa810) at /home/venca/git/wesnoth/src/lua/ldo.cpp:153
#17 0x00000000021b981e in luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) (L=0x7fffcea35fd8, func=0x21b4e4e <f_call(lua_State*, void*)>, u=0x7fffffffa810, old_top=32, ef=16)
    at /home/venca/git/wesnoth/src/lua/ldo.cpp:625
#18 0x00000000021b4f60 in lua_pcallk(lua_State*, int, int, int, int, int (*)(lua_State*)) (L=0x7fffcea35fd8, nargs=1, nresults=0, errfunc=-3, ctx=0, k=0x0)
---Type <return> to continue, or q <return> to quit---
    at /home/venca/git/wesnoth/src/lua/lapi.cpp:943
#19 0x0000000001f740a5 in luaW_pcall(lua_State*, int, int, bool) (L=0x7fffcea35fd8, nArgs=1, nRets=0, allow_wml_error=true)
    at /home/venca/git/wesnoth/src/scripting/lua_api.cpp:72
#20 0x0000000001f61bb4 in game_lua_kernel::run_wml_action(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, vconfig const&, game_events::queued_event const&) (this=0x7fffcf51efc0, cmd="command", cfg=..., ev=...) at /home/venca/git/wesnoth/src/scripting/game_lua_kernel.cpp:5112
#21 0x0000000001c64813 in game_events::event_handler::handle_event(game_events::queued_event const&, boost::shared_ptr<game_events::event_handler>&, game_lua_kernel&) (this=0x7fffc1939b30, event_info=..., handler_p=..., lk=...)
    at /home/venca/git/wesnoth/src/game_events/handlers.cpp:132
#22 0x0000000001c729ba in game_events::t_pump::process_event(boost::shared_ptr<game_events::event_handler>&, game_events::queued_event const&) (this=0x7fffce365470, handler_p=..., ev=...)
    at /home/venca/git/wesnoth/src/game_events/pump.cpp:299
#23 0x0000000001c742a4 in game_events::t_pump::operator()() (this=0x7fffce365470) at /home/venca/git/wesnoth/src/game_events/pump.cpp:559
#24 0x0000000001c7391f in game_events::t_pump::fire(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, game_events::entity_location const&, game_events::entity_location const&, config const&) (this=0x7fffce365470, event="prestart", loc1=..., loc2=..., data=...)
    at /home/venca/git/wesnoth/src/game_events/pump.cpp:477
---Type <return> to continue, or q <return> to quit---
#25 0x0000000001eeaa19 in play_controller::fire_prestart() (this=
    0x7fffffffc1b0) at /home/venca/git/wesnoth/src/play_controller.cpp:380
#26 0x0000000001eefa0f in play_controller::start_game() (this=0x7fffffffc1b0)
    at /home/venca/git/wesnoth/src/play_controller.cpp:1096
#27 0x0000000001efae44 in playsingle_controller::play_scenario_init() (this=0x7fffffffc1b0) at /home/venca/git/wesnoth/src/playsingle_controller.cpp:140
#28 0x0000000001efb947 in playsingle_controller::play_scenario(config const&) (this=0x7fffffffc1b0, level=...)
    at /home/venca/git/wesnoth/src/playsingle_controller.cpp:241
#29 0x0000000001ef51c9 in campaign_controller::playsingle_scenario(end_level_data&) (this=0x7fffffffca50, end_level=...)
    at /home/venca/git/wesnoth/src/game_initialization/playcampaign.cpp:196
#30 0x0000000001ef570a in campaign_controller::play_game() (this=0x7fffffffca50) at /home/venca/git/wesnoth/src/game_initialization/playcampaign.cpp:283
#31 0x0000000001c831fa in game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) (this=0x2dc06e0, reload=game_launcher::NO_RELOAD_DATA)
    at /home/venca/git/wesnoth/src/game_launcher.cpp:1025
#32 0x00000000016780e0 in do_gameloop(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) (args=std::vector of length 1, capacity 1 = {...})
    at /home/venca/git/wesnoth/src/wesnoth.cpp:861
#33 0x0000000001678b99 in main(int, char**) (argc=1, argv=0x7fffffffddd8)

User avatar
Dugi
Posts: 4925
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Crash starting Legend of the Invincibles

Post by Dugi » May 31st, 2016, 4:48 pm

#5 blablabla this=0x2d71a40 <unit_race::null_race>
Any idea why is it creating a unit with no race? Are you trying to load some weird save file? Although this appears to be unrelated to LotI, it might be my fault anyway, I assumed that each unit must have a race.

Post Reply