Defold engine crashed on macOS


Weird thing about it is this?

50 PM

33 PM (2.5 KB)

I think the crash is related to gameanalytics not having a key set yet on macOS. Including crash dump anyway if it’s useful. Going to test properly setting up GA soon. I tested removing GA and it didn’t insta crash on launch on macOS.


@mts even with setting up the keys properly the game engine still insta crashes on macOS when GA is included.

INFO:DLIB: Log server started on port 49862
INFO:ENGINE: Engine service started on port 49863
INFO:ENGINE: Defold Engine 1.2.118 (0faa10d)
INFO:ENGINE: Loading data from: build/default
INFO:GameAnalytics: Registered gameanalytics Lua extension

INFO:GameAnalytics: GameAnalytics fully initialized!
INFO:ENGINE: Initialised sound device 'default'

INFO:DLIB: SSDP: Started on address
INFO:CRASH: Successfully wrote Crashdump to file: 

I tested building the GA example and it doesn’t insta crash. Only crashing in this project… it only has options set in game.project not currently using any GA in any way within the game scripts.


The same error. If I am including GA into my projets, it is insta crash.
HTML5 version ok, cant build android with GA
Tested on version 1.2.0 and 1.1.7


@mts are you testing GA on macOS?


@Pkeod sorry for the late reply I am not able to reproduce the crash. Could you maybe provide a test project where it is producible in?


@Insality I am able to build fine for Android in 1.2.0 what build error do you get?


When I print the callstack from the _crash file, it seems to be related to HTTP and SSL:

0   dmengine                            0x000000010ff5af8a _ZN7dmCrash7OnCrashEi + 74
1   libsystem_platform.dylib            0x00007fff5c031f5a _sigtramp + 26
2   ???                                 0x0000000000000000 0x0 + 0
3   dmengine                            0x000000010fc2c703 SHA256_Update + 147
4   dmengine                            0x000000010fea542a send_packet + 218
5   dmengine                            0x000000010fea75d4 do_client_connect + 596
6   dmengine                            0x000000010fea7364 ssl_client_new + 116
7   dmengine                            0x000000010feabda8 _ZN16dmConnectionPool4DialEPNS_14ConnectionPoolEPKctbiPjPN8dmSocket6ResultE + 1768
8   dmengine                            0x000000010feb2c8f _ZN12dmHttpClient8Response7ConnectEPKctbi + 159
9   dmengine                            0x000000010feb364a _ZN12dmHttpClientL9DoRequestEPNS_6ClientEPKcS3_ + 282
10  dmengine                            0x000000010feb339e _ZN12dmHttpClient3GetEPNS_6ClientEPKc + 398
11  dmengine                            0x000000010fe0145d _ZN13dmHttpService13HandleRequestEPNS_6WorkerEPKN9dmMessage3URLEPN9dmHttpDDF11HttpRequestE + 621
12  dmengine                            0x000000010fe0169f _ZN13dmHttpService8DispatchEPN9dmMessage7MessageEPv + 63
13  dmengine                            0x000000010fecf839 _ZN9dmMessage16InternalDispatchEyPFvPNS_7MessageEPvES2_b + 409
14  dmengine                            0x000000010fe0186f _ZN13dmHttpService4LoopEPv + 63
15  dmengine                            0x000000010fedf67c _ZN8dmThreadL16ThreadStartProxyEPv + 28
16  libsystem_pthread.dylib             0x00007fff5c03b6c1 _pthread_body + 340
17  libsystem_pthread.dylib             0x00007fff5c03b56d _pthread_body + 0
18  libsystem_pthread.dylib             0x00007fff5c03ac5d thread_start + 13

I wonder if it’s bad data to the http request, or possibly related to some how mismatching symbols of the SSL library?


ok thanks, so what could be the reason it is working fine on my machine when i am testing it?


Not sure. I’d expect it to behave badly most of the time if it was a weird linkage. I noticed that the libcrypto.a contains SHA256_Update (as does our engine), but as I said I’d expect it to break more often if that was the issue.

@Pkeod, are you using any other extensions?


i have recompiled the ssl library and renamed those symbols conflicting with the Defold ones (not the most ideal solution but it seems to work) so i think it should be called SHA256_Update_2 in our ssl lib


I just downloaded your libcrypto.a:

$ nm ~/Downloads/libcrypto.a | grep SHA256_Update
00000000000001e0 T _SHA256_Update
                 U _SHA256_Update

That said, I do have a task pending where I will rename our most common culprits as well, to help avoid these hacks :slight_smile:


hmm ok i will make a new version to fix this then


i have uploaded a new version now which should rename the symbol in libcrypto.a for osx, hope this fixes the crash bug now for osx builds