widelands / widelands

Widelands is a free, open source real-time strategy game with singleplayer campaigns and a multiplayer mode. The game was inspired by Settlers II™ (© Bluebyte) but has significantly more variety and depth to it.
https://www.widelands.org/
GNU General Public License v2.0
2.01k stars 158 forks source link

Window::center_to_parent() -> zero page #3325

Closed bunnybot closed 5 years ago

bunnybot commented 5 years ago

I was debugging smuggelers when I had to leave. Version: bzr8820[bug-1751440-smugglers-desync-single-coroutine] Host was on Windows-10 , 1st client on Windos, 2nd client on OSX, 3d client on OSX.

For some reason OSX Computer froe, and was coldstarted by my son.

When tryinf to restart the game I got some strange messages, I assume the savegame was broken?

[NetClient]: Trying to connect to 192.168.254.23:7396 ... success. [Client] SETTING_MAP 'Smugglers' 'save/wl_autosave_netclient2_00.wgf' ... ┏━ Running Lua for tribes: ┃ Ships: 275ms ┃ Wares: 277ms ┃ Immovables: 255ms ┃ Workers: 8957ms ┃ Warehouses: 141ms found "on ": parameters = "failure fail" read handling method for result 1: 0, parameters = "", reached_end = 1 found "on ": parameters = "failure fail" read handling method for result 1: 0, parameters = "", reached_end = 1 found "on ": parameters = "failure fail" read handling method for result 1: 0, parameters = "", reached_end = 1 found "on ": parameters = "failure fail" read handling method for result 1: 0, parameters = "", reached_end = 1 ┃ Productionsites: 1522ms ┃ Trainingsites: 90ms ┃ Militarysites: 155ms ┃ Partially finished buildings: 4ms ┃ Tribe infos: 89ms ┗━ took: 11765ms ... Reading Map Objects ... WidelandsMapLoader::load_map_complete() for 'Smugglers' took 158ms GameLoader::load() took 14274ms FATAL ERROR - game crashed. Attempting emergency save. [Client]: disconnect(CLIENT_CRASHED, ) [NetClient] Closing network socket connected to 192.168.254.23:7396. AddressSanitizer:DEADLYSIGNAL

==1176==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000074 (pc 0x00010af74301 bp 0x7ffee5e4c3d0 sp 0x7ffee5e4c340 T0) ==1176==The signal is caused by a READ memory access. ==1176==Hint: address points to the zero page.

0 0x10af74300 in UI::Panel::get_inner_w() const panel.cc:386

#1 0x10b046c63 in UI::Window::center_to_parent() window.cc:229
#2 0x10af3b8ea in UI::WLMessageBox::WLMessageBox(UI::Panel*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, UI::WLMessageBox::MBoxType, UI::Align) messagebox.cc:98
#3 0x10af3c70c in UI::WLMessageBox::WLMessageBox(UI::Panel*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, UI::WLMessageBox::MBoxType, UI::Align) messagebox.cc:34
#4 0x10ac3b389 in GameClient::disconnect(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool) gameclient.cc:942
#5 0x10ac3f0ae in GameClient::run() gameclient.cc:223
#6 0x109de4af1 in WLApplication::mainmenu_multiplayer() wlapplication.cc:1256
#7 0x109dcac05 in WLApplication::mainmenu() wlapplication.cc:1080
#8 0x109dc66f5 in WLApplication::run() wlapplication.cc:449

I assume the dialog to inform me about the disconnected called a Null-Ptr.


Imported from Launchpad using lp2gh.

bunnybot commented 5 years ago

(by klaus-halfmann)

bunnybot commented 5 years ago

(by klaus-halfmann)

bunnybot commented 5 years ago

(by klaus-halfmann)

bunnybot commented 5 years ago

(by klaus-halfmann) Played one of the savegames with OSX as Host, kaputtnik playing 3d and 4th client on Linux, had no such Issues. Looks like I must spend a debugger-session.

bunnybot commented 5 years ago

(by gunchleoc) Possible duplicate: https://bugs.launchpad.net/widelands/+bug/1794339

bunnybot commented 5 years ago

(by klaus-halfmann) Argh that savegame is not compatible with trunk:

map objects: [/Users/klaus/develop/widelands-repo/trunk/src/logic/map_objects/immovable.cc:769] immovable type: tribes do not define immovable type "resi_gold1"

maybe this is the reason for these logs?

found "on ": parameters = "failure fail" read handling method for result 1: 0, parameters = "", reached_end = 1 found "on ": parameters = "failure fail" read handling method for result 1: 0, parameters = "", reached_end = 1 found "on ": parameters = "failure fail" read handling method for result 1: 0, parameters = "", reached_end = 1 found "on ": parameters = "failure fail" read handling method for result 1: 0, parameters = "", reached_end = 1

OTOH perhaps the network game wanted to report this, but failed as of some other bug.

bunnybot commented 5 years ago

(by klaus-halfmann) Duplicate of #1794339 will use this bug as main target now