[gccsdk] wesnoth crash when an exception is thrown

alan buckley alan_baa at hotmail.com
Thu Sep 11 05:32:13 PDT 2008


wesnoth now builds and runs - thanks for the
previous fixes however it will now crash at the
end of a scenario.

It appears to be when it throws an exception.

The error details are:

Fatal signal received: Segmentation fault

Stack backtrace:

Running thread 0x7d7d14
  (  bbff00) pc:   61c7f8 lr:   61cd4c sp:   bbff04  __write_backtrace()
  (  bbffa0) pc:   61c8e0 lr:   61d7cc sp:   bbffa4  __unixlib_raise_signal()
  (  bbffb0) pc:   61d6d0 lr:   5f0d08 sp:   bb1bcc  __h_cback()

  Register dump at 00bbffb4:

    a1:   bb94a8 a2:        0 a3:  4a035c4 a4:        0
    v1:        0 v2:        0 v3:    4702f v4:    471a0
    v5:   668074 v6:        2 sl:   bad188 fp:   bb1c2c
    ip:        0 sp:   bb1bcc lr:   5f0d08 pc:   5fc1f8
    cpsr: 60000010

  005fc1e4 : ind_ : 5f646e69 : SWIPL   &646E69
  005fc1e8 : SetG : 47746553 : Undefined instruction
  005fc1ec : R... : 00000052 : ANDEQ   R0,R0,R2,ASR R0
  005fc1f0 : ...ÿ : ff000010 : Undefined instruction
  005fc1f4 : .1ç : e7903101 : LDR     R3,[R0,R1,LSL #2]
  005fc1f8 : . Č : e5832000 : STR     R2,[R3,#0]
  005fc1fc : .ð á : e1a0f00e : MOV     PC,R14
  005fc200 : _Unw : 776e555f : Undefined instruction
  005fc204 : ind_ : 5f646e69 : SWIPL   &646E69

  (  bb1c2c) pc:   5f0a98 lr:   5fdbf8 sp:   bb1c30  __gxx_personality_v0()
  (  bb92fc) pc:   5fdbb8 lr:   62af04 sp:   bb9300  ^_Unwind_RaiseException_Phase2()
  (  bb99ac) pc:   5fe2bc lr:   5f1138 sp:   bb99b0  _Unwind_RaiseException()
  (  bb99c4) pc:   5f10e8 lr:    47030 sp:   bb99c8  __cxa_throw()
  (  bb9ac8) pc:    46a78 lr:   1b4724 sp:   bb9acc  check_victory(unit_map&, std::vector>&, display&)()
  (  bba2cc) pc:   1b3908 lr:   1b4f74 sp:   bba2d0  events::mouse_handler::attack_enemy_(unit_map::iterator, unit_map::iterator)()
  (  bba2e4) pc:   1b4f64 lr:   1b5880 sp:   bba2e8  events::mouse_handler::attack_enemy(unit_map::iterator, unit_map::iterator)()
  (  bba454) pc:   1b5570 lr:   1b7278 sp:   bba458  events::mouse_handler::left_click(SDL_MouseButtonEvent const&, bool)()
  (  bba498) pc:   1b7028 lr:   234078 sp:   bba49c  events::mouse_handler::mouse_press(SDL_MouseButtonEvent const&, bool)()
  (  bba530) pc:   23401c lr:   3896e8 sp:   bba534  play_controller::handle_event(SDL_Event const&)()
  (  bba580) pc:   389598 lr:   233a4c sp:   bba584  events::pump()()
  (  bba5f8) pc:   233a30 lr:   242234 sp:   bba5fc  play_controller::play_slice()()
  (  bba624) pc:   2421d4 lr:   241aac sp:   bba628  playsingle_controller::play_human_turn()()
  (  bba64c) pc:   241a4c lr:   2424d4 sp:   bba650  playsingle_controller::play_side(unsigned int, bool)()
  (  bba7fc) pc:   242314 lr:   24446c sp:   bba800  playsingle_controller::play_turn(bool)()
  (  bbaf64) pc:   243d2c lr:   225dcc sp:   bbaf68  playsingle_controller::play_scenario(std::vector> const&, upload_log&, bool)()
  (  bbb42c) pc:   225c9c lr:   228ed8 sp:   bbb430  playsingle_scenario(game_data const&, config const&, config const*, display&, game_state&, std::vector> const&, upload_log&, bool)()
  (  bbe780) pc:   226d3c lr:   62af04 sp:   bbe784  play_game(display&, game_state&, config const&, game_data const&, upload_log&, io_type_t, bool)()
  (  bbe8b0) pc:     c804 lr:    1cc14 sp:   bbe8b4  (anonymous namespace)::game_controller::play_game((anonymous namespace)::game_controller::RELOAD_GAME_DATA)()
  (  bbefc4) pc:    1b560 lr:    1da5c sp:   bbefc8  play_game(int, char**)()
  (  bbeff4) pc:    1d9b4 lr:   62a9a8 sp:   bbeff8  main()


Thread 0x806830
  (  bbfee0) pc:   6145cc lr:   65f488 sp:   bbcee0  __pthread_yield_return()
  (  bbceec) pc:   61454c lr:   65f488 sp:   bbcef0  pthread_yield()
  (  bbcf40) pc:   65f418 lr:   634454 sp:   bbcf44  __dspwrite()
  (  bbcf64) pc:   634374 lr:   4c438c sp:   bbcf68  write()
  (  bbcf78) pc:   4c436c lr:   4b297c sp:   bbcf7c  ^DSP_PlayAudio()
  (  bbcfa4) pc:   4b28b8 lr:   4ba748 sp:   bbcfa8  SDL_RunAudio()
  (  bbcfc4) pc:   4ba70c lr:   4c5588 sp:   bbcfc8  SDL_RunThread()
  (  bbcfd4) pc:   4c557c lr:   6128d4 sp:   bbcfd8  ^RunThread()
  (  bbcfe4) pc:   6128bc lr:        0 sp:   bbcfe8  ^__pthread_create()


I've tried creating a simple program that throws an exception and
that works OK. I also test going several functions down before
throwing the exception.

Anybody have any clues on what is going wrong?

Regards,
Alan

_________________________________________________________________
Make a mini you and download it into Windows Live Messenger
http://clk.atdmt.com/UKM/go/111354029/direct/01/



More information about the gcc mailing list