bugBattle for Wesnoth - Bugs: bug #19624, Random crashes when launching the...

 
 
Show feedback again

bug #19624: Random crashes when launching the test scenario

Submitted by:  Anonymissimus <anonymissimus>
Submitted on:  Sat 07 Apr 2012 10:34:12 PM UTC  
 
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group:  None of the others
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: 1.11.0-svn@53845Operating System: win xp

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 22 Feb 2013 03:36:01 PM UTC, comment #5:

>I can't reproduce it :-( could you ping me on IRC to do an interactive debug session?

Are you referring to the valgrind log ? If no, then no, since we already did a long interactive debug session without results (you said you didn't learn much however) (it is in the log on one of the days).

Anonymissimus <anonymissimus>
Project Member
Sat 16 Feb 2013 08:26:11 PM UTC, comment #4:

I can't reproduce it :-( could you ping me on IRC to do an interactive debug session?

Mark de Wever <mordante>
Project Member
Fri 15 Feb 2013 11:34:25 PM UTC, comment #3:

I'm posting a portion of the valgrind log, which looks relatively valid and did only show up with the -03 cmake release build, not with an scons debug build, but is over my horizon. This also caused wesnoth to crash (see the assertion failure at the end).
I launched the thing with
valgrind --suppressions=utils/valgrind_memcheck_suppressions.supp ./wesnoth_cmake_release_debug -d -t --config-dir=/media/HDI3_SOURCE_NTFS/wesnoth/userdata/ 1>val_log.txt 2>val_err.txt

where wesnoth_cmake_release_debug was build with
cmake -DCXX_FLAGS_USER="-ggdb3 -O3"

trunk@r56322

I don't know whether it is actually related to this report.

THE LOG:

==20582== Conditional jump or move depends on uninitialised value(s)
==20582== at 0x82D5BB: unit_map::iterator_base<unit_map::standard_iter_types>::valid_exit() const (unit_map.hpp:263)
==20582== by 0xCDDF25: ZN5boost15foreach_detail_3endI8unit_mapN4mpl_5bool_ILb0EEEEENS0_8auto_anyINS0_16foreach_iteratorIT_T0_E4typeEEERKNS0_13auto_any_baseEPNS0_9type2typeIS8_S9_EEPS5.isra.1445.constprop.1466 (unit_map.hpp:150)
==20582== by 0xCDEFA7: _ZNK4unit9invisibleERK12map_locationb.constprop.1504 (unit.cpp:2950)
==20582== by 0xCDF38A: unit::is_visible_to_team(team const&, bool, gamemap const&) const (unit.cpp:2987)
==20582== by 0xCDF465: find_visible_unit(map_location const&, team const&, bool) (unit.cpp:3124)
==20582== by 0x84185F: _ZN7actions14shroud_clearer9clear_locER4teamRK12map_locationRK4unitS5_bRmS9_PNS_19move_unit_spectatorE.constprop.517 (vision.cpp:246)
==20582== by 0x842D3F: _ZN7actions14shroud_clearer10clear_unitERK12map_locationRK4unitR4teamPKSt3setIS1_St4lessIS1_ESaIS1_EEPmSG_PNS_19move_unit_spectatorEb.constprop.516 (vision.cpp:329)
==20582== by 0x843BAC: actions::clear_shroud(int, bool, bool) (vision.hpp:70)
==20582== by 0xC45C60: play_controller::init_gui() (play_controller.cpp:564)
==20582== by 0xC6189B: playsingle_controller::init_gui() (playsingle_controller.cpp:94)
==20582== by 0xC6382C: playsingle_controller::play_scenario(std::pair<config::const_child_iterator, config::const_child_iterator> const&, bool) (playsingle_controller.cpp:356)
==20582== by 0xC57AD7: play_game(display&, game_state&, config const&, io_type_t, bool) (playcampaign.cpp:235)
==20582==
==20582== Use of uninitialised value of size 8
==20582== at 0x82D5C1: unit_map::iterator_base<unit_map::standard_iter_types>::valid_exit() const (unit_map.hpp:264)
==20582== by 0xCDDF25: ZN5boost15foreach_detail_3endI8unit_mapN4mpl_5bool_ILb0EEEEENS0_8auto_anyINS0_16foreach_iteratorIT_T0_E4typeEEERKNS0_13auto_any_baseEPNS0_9type2typeIS8_S9_EEPS5.isra.1445.constprop.1466 (unit_map.hpp:150)
==20582== by 0xCDEFA7: _ZNK4unit9invisibleERK12map_locationb.constprop.1504 (unit.cpp:2950)
==20582== by 0xCDF38A: unit::is_visible_to_team(team const&, bool, gamemap const&) const (unit.cpp:2987)
==20582== by 0xCDF465: find_visible_unit(map_location const&, team const&, bool) (unit.cpp:3124)
==20582== by 0x84185F: _ZN7actions14shroud_clearer9clear_locER4teamRK12map_locationRK4unitS5_bRmS9_PNS_19move_unit_spectatorE.constprop.517 (vision.cpp:246)
==20582== by 0x842D3F: _ZN7actions14shroud_clearer10clear_unitERK12map_locationRK4unitR4teamPKSt3setIS1_St4lessIS1_ESaIS1_EEPmSG_PNS_19move_unit_spectatorEb.constprop.516 (vision.cpp:329)
==20582== by 0x843BAC: actions::clear_shroud(int, bool, bool) (vision.hpp:70)
==20582== by 0xC45C60: play_controller::init_gui() (play_controller.cpp:564)
==20582== by 0xC6189B: playsingle_controller::init_gui() (playsingle_controller.cpp:94)
==20582== by 0xC6382C: playsingle_controller::play_scenario(std::pair<config::const_child_iterator, config::const_child_iterator> const&, bool) (playsingle_controller.cpp:356)
==20582== by 0xC57AD7: play_game(display&, game_state&, config const&, io_type_t, bool) (playcampaign.cpp:235)
==20582==
==20582== Conditional jump or move depends on uninitialised value(s)
==20582== at 0x82D5C5: unit_map::iterator_base<unit_map::standard_iter_types>::valid_exit() const (unit_map.hpp:264)
==20582== by 0xCDDF25: ZN5boost15foreach_detail_3endI8unit_mapN4mpl_5bool_ILb0EEEEENS0_8auto_anyINS0_16foreach_iteratorIT_T0_E4typeEEERKNS0_13auto_any_baseEPNS0_9type2typeIS8_S9_EEPS5.isra.1445.constprop.1466 (unit_map.hpp:150)
==20582== by 0xCDEFA7: _ZNK4unit9invisibleERK12map_locationb.constprop.1504 (unit.cpp:2950)
==20582== by 0xCDF38A: unit::is_visible_to_team(team const&, bool, gamemap const&) const (unit.cpp:2987)
==20582== by 0xCDF465: find_visible_unit(map_location const&, team const&, bool) (unit.cpp:3124)
==20582== by 0x84185F: _ZN7actions14shroud_clearer9clear_locER4teamRK12map_locationRK4unitS5_bRmS9_PNS_19move_unit_spectatorE.constprop.517 (vision.cpp:246)
==20582== by 0x842D3F: _ZN7actions14shroud_clearer10clear_unitERK12map_locationRK4unitR4teamPKSt3setIS1_St4lessIS1_ESaIS1_EEPmSG_PNS_19move_unit_spectatorEb.constprop.516 (vision.cpp:329)
==20582== by 0x843BAC: actions::clear_shroud(int, bool, bool) (vision.hpp:70)
==20582== by 0xC45C60: play_controller::init_gui() (play_controller.cpp:564)
==20582== by 0xC6189B: playsingle_controller::init_gui() (playsingle_controller.cpp:94)
==20582== by 0xC6382C: playsingle_controller::play_scenario(std::pair<config::const_child_iterator, config::const_child_iterator> const&, bool) (playsingle_controller.cpp:356)
==20582== by 0xC57AD7: play_game(display&, game_state&, config const&, io_type_t, bool) (playcampaign.cpp:235)
==20582==
==20582== Conditional jump or move depends on uninitialised value(s)
==20582== at 0x82D5CD: unit_map::iterator_base<unit_map::standard_iter_types>::valid_exit() const (unit_map.hpp:265)
==20582== by 0xCDDF25: ZN5boost15foreach_detail_3endI8unit_mapN4mpl_5bool_ILb0EEEEENS0_8auto_anyINS0_16foreach_iteratorIT_T0_E4typeEEERKNS0_13auto_any_baseEPNS0_9type2typeIS8_S9_EEPS5.isra.1445.constprop.1466 (unit_map.hpp:150)
==20582== by 0xCDEFA7: _ZNK4unit9invisibleERK12map_locationb.constprop.1504 (unit.cpp:2950)
==20582== by 0xCDF38A: unit::is_visible_to_team(team const&, bool, gamemap const&) const (unit.cpp:2987)
==20582== by 0xCDF465: find_visible_unit(map_location const&, team const&, bool) (unit.cpp:3124)
==20582== by 0x84185F: _ZN7actions14shroud_clearer9clear_locER4teamRK12map_locationRK4unitS5_bRmS9_PNS_19move_unit_spectatorE.constprop.517 (vision.cpp:246)
==20582== by 0x842D3F: _ZN7actions14shroud_clearer10clear_unitERK12map_locationRK4unitR4teamPKSt3setIS1_St4lessIS1_ESaIS1_EEPmSG_PNS_19move_unit_spectatorEb.constprop.516 (vision.cpp:329)
==20582== by 0x843BAC: actions::clear_shroud(int, bool, bool) (vision.hpp:70)
==20582== by 0xC45C60: play_controller::init_gui() (play_controller.cpp:564)
==20582== by 0xC6189B: playsingle_controller::init_gui() (playsingle_controller.cpp:94)
==20582== by 0xC6382C: playsingle_controller::play_scenario(std::pair<config::const_child_iterator, config::const_child_iterator> const&, bool) (playsingle_controller.cpp:356)
==20582== by 0xC57AD7: play_game(display&, game_state&, config const&, io_type_t, bool) (playcampaign.cpp:235)
==20582==
==20582== Use of uninitialised value of size 8
==20582== at 0x82D5CF: unit_map::iterator_base<unit_map::standard_iter_types>::valid_exit() const (unit_map.hpp:266)
==20582== by 0xCDDF25: ZN5boost15foreach_detail_3endI8unit_mapN4mpl_5bool_ILb0EEEEENS0_8auto_anyINS0_16foreach_iteratorIT_T0_E4typeEEERKNS0_13auto_any_baseEPNS0_9type2typeIS8_S9_EEPS5.isra.1445.constprop.1466 (unit_map.hpp:150)
==20582== by 0xCDEFA7: _ZNK4unit9invisibleERK12map_locationb.constprop.1504 (unit.cpp:2950)
==20582== by 0xCDF38A: unit::is_visible_to_team(team const&, bool, gamemap const&) const (unit.cpp:2987)
==20582== by 0xCDF465: find_visible_unit(map_location const&, team const&, bool) (unit.cpp:3124)
==20582== by 0x84185F: _ZN7actions14shroud_clearer9clear_locER4teamRK12map_locationRK4unitS5_bRmS9_PNS_19move_unit_spectatorE.constprop.517 (vision.cpp:246)
==20582== by 0x842D3F: _ZN7actions14shroud_clearer10clear_unitERK12map_locationRK4unitR4teamPKSt3setIS1_St4lessIS1_ESaIS1_EEPmSG_PNS_19move_unit_spectatorEb.constprop.516 (vision.cpp:329)
==20582== by 0x843BAC: actions::clear_shroud(int, bool, bool) (vision.hpp:70)
==20582== by 0xC45C60: play_controller::init_gui() (play_controller.cpp:564)
==20582== by 0xC6189B: playsingle_controller::init_gui() (playsingle_controller.cpp:94)
==20582== by 0xC6382C: playsingle_controller::play_scenario(std::pair<config::const_child_iterator, config::const_child_iterator> const&, bool) (playsingle_controller.cpp:356)
==20582== by 0xC57AD7: play_game(display&, game_state&, config const&, io_type_t, bool) (playcampaign.cpp:235)
==20582==
==20582== Conditional jump or move depends on uninitialised value(s)
==20582== at 0x82D5D6: unit_map::iterator_base<unit_map::standard_iter_types>::valid_exit() const (unit_map.hpp:266)
==20582== by 0xCDDF25: ZN5boost15foreach_detail_3endI8unit_mapN4mpl_5bool_ILb0EEEEENS0_8auto_anyINS0_16foreach_iteratorIT_T0_E4typeEEERKNS0_13auto_any_baseEPNS0_9type2typeIS8_S9_EEPS5.isra.1445.constprop.1466 (unit_map.hpp:150)
==20582== by 0xCDEFA7: _ZNK4unit9invisibleERK12map_locationb.constprop.1504 (unit.cpp:2950)
==20582== by 0xCDF38A: unit::is_visible_to_team(team const&, bool, gamemap const&) const (unit.cpp:2987)
==20582== by 0xCDF465: find_visible_unit(map_location const&, team const&, bool) (unit.cpp:3124)
==20582== by 0x84185F: _ZN7actions14shroud_clearer9clear_locER4teamRK12map_locationRK4unitS5_bRmS9_PNS_19move_unit_spectatorE.constprop.517 (vision.cpp:246)
==20582== by 0x842D3F: _ZN7actions14shroud_clearer10clear_unitERK12map_locationRK4unitR4teamPKSt3setIS1_St4lessIS1_ESaIS1_EEPmSG_PNS_19move_unit_spectatorEb.constprop.516 (vision.cpp:329)
==20582== by 0x843BAC: actions::clear_shroud(int, bool, bool) (vision.hpp:70)
==20582== by 0xC45C60: play_controller::init_gui() (play_controller.cpp:564)
==20582== by 0xC6189B: playsingle_controller::init_gui() (playsingle_controller.cpp:94)
==20582== by 0xC6382C: playsingle_controller::play_scenario(std::pair<config::const_child_iterator, config::const_child_iterator> const&, bool) (playsingle_controller.cpp:356)
==20582== by 0xC57AD7: play_game(display&, game_state&, config const&, io_type_t, bool) (playcampaign.cpp:235)
==20582==
==20582== Use of uninitialised value of size 8
==20582== at 0x82D5D8: unit_map::iterator_base<unit_map::standard_iter_types>::valid_exit() const (unit_map.hpp:267)
==20582== by 0xCDDF25: ZN5boost15foreach_detail_3endI8unit_mapN4mpl_5bool_ILb0EEEEENS0_8auto_anyINS0_16foreach_iteratorIT_T0_E4typeEEERKNS0_13auto_any_baseEPNS0_9type2typeIS8_S9_EEPS5.isra.1445.constprop.1466 (unit_map.hpp:150)
==20582== by 0xCDEFA7: _ZNK4unit9invisibleERK12map_locationb.constprop.1504 (unit.cpp:2950)
==20582== by 0xCDF38A: unit::is_visible_to_team(team const&, bool, gamemap const&) const (unit.cpp:2987)
==20582== by 0xCDF465: find_visible_unit(map_location const&, team const&, bool) (unit.cpp:3124)
==20582== by 0x84185F: _ZN7actions14shroud_clearer9clear_locER4teamRK12map_locationRK4unitS5_bRmS9_PNS_19move_unit_spectatorE.constprop.517 (vision.cpp:246)
==20582== by 0x842D3F: _ZN7actions14shroud_clearer10clear_unitERK12map_locationRK4unitR4teamPKSt3setIS1_St4lessIS1_ESaIS1_EEPmSG_PNS_19move_unit_spectatorEb.constprop.516 (vision.cpp:329)
==20582== by 0x843BAC: actions::clear_shroud(int, bool, bool) (vision.hpp:70)
==20582== by 0xC45C60: play_controller::init_gui() (play_controller.cpp:564)
==20582== by 0xC6189B: playsingle_controller::init_gui() (playsingle_controller.cpp:94)
==20582== by 0xC6382C: playsingle_controller::play_scenario(std::pair<config::const_child_iterator, config::const_child_iterator> const&, bool) (playsingle_controller.cpp:356)
==20582== by 0xC57AD7: play_game(display&, game_state&, config const&, io_type_t, bool) (playcampaign.cpp:235)
==20582==
wesnoth_cmake_release_debug: /media/HDI3_SOURCE_NTFS/wesnoth/src/actions/../unit_map.hpp:267: void unit_map::iterator_base<iter_types>::valid_exit() const [with iter_types = unit_map::standard_iter_types]: Assertion `i_->ref_count > 0' failed.

Anonymissimus <anonymissimus>
Project Member
Mon 11 Feb 2013 04:04:02 PM UTC, comment #2:

The mentioned date is just the most important one, it is correct. The discussion was on at least 2 days.

The thing I wanted me or someone else to do here is valgrinding such a build. I'd volunteer to do it if you tell me how to build with cmake/Linux with both debug info and -O3 (supposedly the key condition), which is probably a oneliner for you.

I no longer have the hardware setup under which I (sometimes) "reproduced" this and don't expect something to come out of it, nor did I notice it recently, but also didn't try to trigger it.

Anonymissimus <anonymissimus>
Project Member
Sun 10 Feb 2013 10:18:27 AM UTC, comment #1:

Does the problem still exist?

(Note the irclogs are from the 7th of April, not the 8th.)

Mark de Wever <mordante>
Project Member
Sat 07 Apr 2012 10:34:12 PM UTC, original submission:

reproduce: launch ./wesnoth -d -t
Should segfault at the end of the "loading phase".
Attached file gdb.txt contains the error message, backtrace with debugging info and disassembler output.
Bug seems "very hard to reproduce"; I get this only sometimes and it seems only with the MinGw binary and only with the release built (which I added the option to have debugging info to). Other build options are (the last three are defines):

[21:49] anonymissimus mordante: -O3 -Wall -mthreads
[21:49] anonymissimus -march=native
[21:49] anonymissimus -fexceptions
[21:49] anonymissimus -fdiagnostics-show-option
[21:49] anonymissimus -fopenmp
[21:49] anonymissimus -Wno-strict-aliasing
[21:49] anonymissimus -Wno-missing-braces
[21:49] anonymissimus HAVE_PYTHON
[21:49] anonymissimus USE_GZIP
[21:49] anonymissimus _WIN32_WINDOWS

compiler: g++ (tdm-1) 4.5.2

I couldn't yet reproduce this with MSVC or with the normal debug build (which has no -O whatever).
IRC talk related to this is on #wesnoth-dev 08.04.2012, ~18 - ~22 o'clock.

Anonymissimus <anonymissimus>
Project Member

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #15533:  gdb.txt added by anonymissimus (36kB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mordante (Posted a comment)
  • -unavailable- added by anonymissimus (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 07 Apr 2012 10:34:12 PM UTCanonymissimusAttached File-=>Added gdb.txt, #15533
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup