crash in NetClient::is_connected()

Bug #1690649 reported by Klaus Halfmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

Whle cehcking #1690519 the computer got very slow and the network stack got confused.
after trying to join again I was able to redproduce this crash:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 widelands 0x000000010666510c NetClient::is_connected() const + 12 (netclient.cc:25)
1 widelands 0x000000010666529d NetClient::try_receive(RecvPacket*) + 61 (netclient.cc:37)
2 widelands 0x00000001065fa20c InternetGaming::handle_metaserver_communication() + 412 (internet_gaming.cc:273)
3 widelands 0x00000001065f9852 InternetGaming::login(std::__1::basic_string<char,

looks like this happens if you do an fast (CMD-Q) shutdown and the rejoin fast.
I also got a message about "Unknown player lost conection".

will try to debug this after more tests for #1690519

Tags: network

Related branches

Revision history for this message
GunChleoc (gunchleoc) wrote :

Did you test on r8353 or newer (after netcode refactoring), or on an older version?

Changed in widelands:
assignee: nobody → Notabilis (notabilis27)
milestone: none → build20-rc1
tags: added: network
Revision history for this message
Notabilis (notabilis27) wrote :

Good news first: I was able to kind of reproduce the bug. In my case it was with the message:

InternetGaming: logout(You are already logged in!)

I also encountered another bug while trying to reproduce yours, it might be related:

internet_gaming.cc:115: bool InternetGaming::login(const string&, const string&, bool, const string&, uint32_t): Assertion `state_ == OFFLINE' failed.

Bad news: It is after my branch was merged (based on matching line numbers). Okay, only bad for me. Since this does not seem to be critical I will look into it tomorrow.
For me (and most likely also for you), the NetClient pointer points to 0x0. Seems like the connection is reset when you are disconnected by the metaserver and the new connection isn't correctly established.

Changed in widelands:
status: New → Confirmed
Revision history for this message
GunChleoc (gunchleoc) wrote :

At least we caught it early, so we know which commit broke it ;)

Revision history for this message
Notabilis (notabilis27) wrote :

I think I found the bug already, but I won't prepare and test a branch today.

Revision history for this message
Notabilis (notabilis27) wrote :

I linked a branch which should fix the crash. The bug triggers most of the time when you are logged in to the metaserver with one widelands instance and tries to log in with a second one.

GunChleoc (gunchleoc)
Changed in widelands:
assignee: Notabilis (notabilis27) → nobody
status: Confirmed → Fix Committed
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
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.