More autosave files would help debugging

Bug #1407948 reported by Teppo Mäenpää
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Wishlist
Unassigned

Bug Description

Background:

Widelands suddenly crashed (segfault). Attempting to load the autosave file leads to immediate crash after starting.

If there would be older autosave files available, I might be able to find the primary cause. Would it be an improvement if Widelands would autosave to wl_autosave_0 till wl_autosave_n in round-robin manner.

...

About the crash. In case somebody would be interested:

The backtrace I get after attempting to load the faulty autosave file, written about two minutes before the primary crash is:

#0 0x0000000000c0d232 in Widelands::Player::player_number (this=0x0) at ../src/logic/player.h:112
#1 0x0000000000ffb737 in DefaultAI::DefaultAI(Widelands::Game&, unsigned char, unsigned char)::{lambda(Widelands::NoteImmovable const&)#2}::operator()(Widelands::NoteImmovable const&) const ()
    at ../src/ai/defaultai.cc:126
#2 0x000000000100a096 in std::_Function_handler<void(const Widelands::NoteImmovable&), DefaultAI::DefaultAI(Widelands::Game&, Widelands::PlayerNumber, uint8_t)::<lambda(const Widelands::NoteImmovable&)> >::_M_invoke(const std::_Any_data &, const Widelands::NoteImmovable &) (__functor=..., __args#0=...) at /usr/include/c++/4.7/functional:1926
#3 0x0000000000cac449 in std::function<void (Widelands::NoteImmovable const&)>::operator()(Widelands::NoteImmovable const&) const (this=0x7fffe3e36ee8, __args#0=...) at /usr/include/c++/4.7/functional:2311
#4 0x0000000000ca9d99 in Notifications::NotificationsManager::publish<Widelands::NoteImmovable> (this=0x19d56c0, message=...) at ../src/notifications/notifications_impl.h:75
#5 0x0000000000ca8349 in Notifications::publish<Widelands::NoteImmovable> (message=...) at ../src/notifications/notifications.h:51
#6 0x0000000000ca55b6 in Widelands::PlayerImmovable::cleanup (this=0x7fffd83d8690, egbase=...) at ../src/logic/immovable.cc:1413
#7 0x0000000000d79e2e in Widelands::Building::cleanup (this=0x7fffd83d8690, egbase=...) at ../src/logic/building.cc:441
#8 0x0000000000cfd06c in Widelands::ProductionSite::cleanup (this=0x7fffd83d8690, egbase=...) at ../src/logic/productionsite.cc:426
#9 0x0000000000cb1b0f in Widelands::MapObject::remove (this=0x7fffd83d8690, egbase=...) at ../src/logic/instances.cc:369
#10 0x0000000000cb1075 in Widelands::ObjectManager::cleanup (this=0x7fffffff9d48, egbase=...) at ../src/logic/instances.cc:161
#11 0x0000000000bbcb41 in Widelands::EditorGameBase::cleanup_objects (this=0x7fffffff9d20) at ../src/logic/editor_game_base.h:180
#12 0x0000000000c878fe in Widelands::EditorGameBase::cleanup_for_load (this=0x7fffffff9d20) at ../src/logic/editor_game_base.cc:498
#13 0x0000000000c96427 in Widelands::Game::cleanup_for_load (this=0x7fffffff9d20) at ../src/logic/game.cc:637
#14 0x0000000000d08e9d in Widelands::ReplayWriter::ReplayWriter (this=0x7fffe35f41c0, game=..., filename=...) at ../src/logic/replay.cc:242
#15 0x0000000000c95ee4 in Widelands::Game::run (this=0x7fffffff9d20, loader_ui=0x7fffe04ec6b0, start_game_type=Widelands::Game::Loaded, script_to_run=..., replay=false) at ../src/logic/game.cc:541
#16 0x0000000000dc14e1 in NetHost::run (this=0x7fffffffb120, autorun=false) at ../src/network/nethost.cc:908
#17 0x0000000000b976a6 in WLApplication::mainmenu_multiplayer (this=0x19dda00) at ../src/wlapplication.cc:1245
#18 0x0000000000b96b80 in WLApplication::mainmenu (this=0x19dda00) at ../src/wlapplication.cc:1064
#19 0x0000000000b93223 in WLApplication::run (this=0x19dda00

Related branches

Revision history for this message
TiborB (tiborb95) wrote :

two points:
1. more autosave files are good idea. At least two - current one would be copied to 'old' and new one created.
2. however widelands cannot load network game at all - this is a bug already reported - so for this specific case it would be of no use :(

Revision history for this message
SirVer (sirver) wrote :

I think having more autosave files would be great.

Changed in widelands:
status: New → Confirmed
importance: Undecided → Wishlist
Tino (tino79)
Changed in widelands:
assignee: nobody → Tino (tino79)
status: Confirmed → In Progress
Revision history for this message
SirVer (sirver) wrote :

Merged in r 7353.

Changed in widelands:
status: In Progress → Fix Committed
milestone: none → build19-rc1
Tino (tino79)
Changed in widelands:
assignee: Tino (tino79) → nobody
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.