springlobby / springlobby

SpringLobby is a free cross-platform lobby client for the Spring RTS project
https://springlobby.springrts.com
GNU General Public License v2.0
81 stars 45 forks source link

springlobby 0.226 - mac os x crash #553

Closed jamerlan closed 9 years ago

jamerlan commented 9 years ago

crash when you try to join a battleroom

http://pastebin.com/bUWuQwYn

jamerlan commented 9 years ago

Probably this bug happens when you are trying to join a battleroom when you have no map

abma commented 9 years ago

relevant parts from stacktrace:

0 + 4519592515 BattleRoomTab::UpdateMapInfoSummary() + 1253 BattleRoomTab::UpdateBattleInfo(wxString const&) + 1025 BattleRoomTab::SetBattle(IBattle*) + 1325 Ui::OnJoinedBattle(IBattle&) + 64 ServerEvents::OnJoinedBattle(int, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) + 740 TASServer::ExecuteCommand(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, int) + 12554 TASServer::ExecuteCommand(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) + 2760 TASServer::OnDataReceived() + 704

abma commented 9 years ago

uncatched exception i guess:

https://github.com/springlobby/springlobby/blob/master/src/gui/hosting/battleroomtab.cpp#L501

abma commented 9 years ago

@Usaga:

we should not use exceptions imo. c++ compilers sadly doesn't detect uncatched exceptions at compile time :-|

abma commented 9 years ago

oh, i'm tired, sorry this exception should be catched, no clue why it crashes in this function. but still the usage of the exception in this function is weird. it is not needed.

abma commented 9 years ago

@jamerlan:

can you please test if the commit fixes the crash?

Usaga commented 9 years ago

I did not wrote that code nor modifed it, so do not know why it uses exceptions. It is really weird...

abma commented 9 years ago

https://github.com/springlobby/springlobby/commit/10a1bb65b5234f44095f89a1e9741461da0d5485

Usaga commented 9 years ago

Oh shi... Why I done this :-)

abma commented 9 years ago

no clue if my change fixed the crash, it shouldn't, but lets see...

JoshuaPettus commented 9 years ago

Here is a test version https://www.dropbox.com/s/6bnqxmwv5x4d9k2/SpringLobby-0.226-4-g7bebb06-OSX-10.10.dmg?dl=0 Seems to work for me. I didn't notice before as I always downloaded the map then tried to join the room :)

JoshuaPettus commented 9 years ago

He said it works :) https://springrts.com/phpbb/viewtopic.php?f=65&t=32970&start=40

abma commented 9 years ago

great, thanks!