Opened 10 years ago

Last modified 10 years ago

#2338 closed defect

Crash in FreeUPnPUrls on OS X 64-bit — at Version 10

Reported by: Petr Owned by:
Priority: Release Blocker Milestone: Alpha 17
Component: Core engine Keywords: patch
Cc: Patch:

Description (last modified by leper)

When I go to Multiplayer / Host game, 0AD will crash back to my desktop. This happens always. I am using Alpha 15 64bit, latest MAC OS X, MacBook Pro.

The crashing thread in both reports is thread 10 (the UPnP thread). The error is in both cases "pointer being freed was not allocated" in FreeUPnPUrls(), so we seem to have an incorrect pointer in the urls struct. (Possibly unrelated, but GetUPNPUrls() doesn't check for success of malloc)

Thread 10 Crashed:
0   libsystem_kernel.dylib          0x00007fff8dc6b866 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff94c7b35c pthread_kill + 92
2   libsystem_c.dylib               0x00007fff9008dbba abort + 125
3   libsystem_malloc.dylib          0x00007fff91a06093 free + 411
4   com.wildfiregames.0ad           0x000000010067b328 FreeUPNPUrls + 152
5   com.wildfiregames.0ad           0x0000000100018aba CNetServerWorker::SetupUPnP(void*) + 1438
6   libsystem_pthread.dylib         0x00007fff94c7a899 _pthread_body + 138
7   libsystem_pthread.dylib         0x00007fff94c7a72a _pthread_start + 137
8   libsystem_pthread.dylib         0x00007fff94c7efc9 thread_start + 13
Thread 10 Crashed:
0   libsystem_kernel.dylib          0x00007fff8dc6b866 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff94c7b35c pthread_kill + 92
2   libsystem_c.dylib               0x00007fff9008dbba abort + 125
3   libsystem_malloc.dylib          0x00007fff91a06093 free + 411
4   com.wildfiregames.0ad           0x000000010067b328 FreeUPNPUrls + 152
5   com.wildfiregames.0ad           0x0000000100018aba CNetServerWorker::SetupUPnP(void*) + 1438
6   libsystem_pthread.dylib         0x00007fff94c7a899 _pthread_body + 138
7   libsystem_pthread.dylib         0x00007fff94c7a72a _pthread_start + 137
8   libsystem_pthread.dylib         0x00007fff94c7efc9 thread_start + 13

Change History (14)

by Petr, 10 years ago

Attachment: error added

error log file

by Petr, 10 years ago

Attachment: errorHD4000 added

same situation, but on integrated graphic card, Intel HD 4000

comment:1 by Josh, 10 years ago

If I read those crashlogs correctly, the crash is occurring in the system after the GUI does a draw call. This appears to be an bug on Apple's side.

comment:2 by historic_bruno, 10 years ago

This only happens when hosting a game from the lobby? Can you try other code paths, like playing single player games, etc. to see if there is a similar crash? It doesn't seem related to the lobby at all. It's too bad how many problems 10.9 is causing :(

comment:3 by Petr, 10 years ago

I can host and play online with external ip, I can join and play via Lobby, but join only, when I try to host game, it crashes when I am selecting maps. Otherwise game is running very smoothly without any bugs.

comment:4 by Petr, 10 years ago

This problem is ONLY when I host game from Lobby

comment:5 by Petr, 10 years ago

any update on this?

comment:6 by Petr, 10 years ago

Just realized that I can not Host game even via my IP, not only Lobby

comment:7 by Josh, 10 years ago

Component: Multiplayer lobbyUI & Simulation
Keywords: Multiplayer Lobby removed

That's nice to know, so this is probably a UI engine bug.

comment:8 by Petr, 10 years ago

another update... I removed 64bit version and installed 32bit .... Lobby and Multiplayer are working good, no more crash, but there is no sound, only cracking noise :)

comment:9 by Josh, 10 years ago

Description: modified (diff)
Summary: Lobby Host game crash on MACCrash when hosting game on 64 bit MAC

Ah, great! Knowing that should help even more.

I've updated the title and description to be more relevant.

comment:10 by leper, 10 years ago

Component: UI & SimulationCore engine
Description: modified (diff)
Summary: Crash when hosting game on 64 bit MACCrash in FreeUPnPUrls on OS X 64-bit

Both crashes are because of a free of something that wasn't allocated in the UPnP thread. (FreeUPnPUrls())

Petrsharks: Could you try to host once more and attach the mainlog.html file from GameDataPaths?

by Petr, 10 years ago

Attachment: mainlog.html added

mainlog.html

by Petr, 10 years ago

Attachment: errorlog added

another error log from today, when I try to play multiplayer with AI opponent

Note: See TracTickets for help on using tickets.