Android crash (dmDNS::ares_addrinfo_callback) (SOLVED)

Our game is used Defold 1.2.159 and keep crashing on Android.

Crashdump:

  #00  pc 000000000039cdb8  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (dmDNS::ares_addrinfo_callback(void*, int, int, ares_addrinfo*)+12)
  #01  pc 000000000044adb4  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (end_hquery+36)
  #02  pc 000000000044b6f8  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (host_callback+804)
  #03  pc 0000000000449e18  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (qcallback+164)
  #04  pc 00000000004456d8  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (ares_destroy+72)
  #05  pc 000000000039cfb0  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (dmDNS::DeleteChannel(dmDNS::Channel*)+20)
  #06  pc 0000000000351874  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (dmHttpService::Delete(dmHttpService::HttpService*)+200)
  #07  pc 0000000000340724  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (dmScript::HttpFinalize(dmScript::Context*)+44)
  #08  pc 0000000000338788  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (dmScript::Finalize(dmScript::Context*)+56)
  #09  pc 00000000000dcda0  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (dmEngine::Delete(dmEngine::Engine*)+208)
  #10  pc 00000000000dcfcc  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (_ZN8dmEngineL7InitRunEPN15dmEngineService13EngineServiceEiPPcPFvPNS_6EngineEPvES9_S7_+228)
  #11  pc 00000000000dd060  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (_ZN8dmEngine6LaunchEiPPcPFvPNS_6EngineEPvES6_S4_+100)
  #12  pc 00000000000d985c  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (engine_main(int, char**)+128)
  #13  pc 00000000000d97a4  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (main+24)
  #14  pc 00000000003fd0cc  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (_glfwPreMain+224)
  #15  pc 00000000000d97cc  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (android_main+20)
  #16  pc 00000000003fd92c  /data/app/com.MelsoftGames.FamilyIslandFarm-iJXxVEg1AvMHix9D0ny5og==/lib/arm64/libFamilyIsland.so (android_app_entry+180)
  #17  pc 0000000000084df8  /system/lib64/libc.so (__pthread_start(void*)+208)
  #18  pc 0000000000023ac4  /system/lib64/libc.so (__start_thread+68)

Other version of crashdump:

  #00  pc 00000000002e2738  /data/app/com.MelsoftGames.FamilyIslandFarm-1/lib/arm/libFamilyIsland.so (_ZN5dmDNSL22ares_addrinfo_callbackEPviiP13ares_addrinfo+24)
  #01  pc 0000000000386238  /data/app/com.MelsoftGames.FamilyIslandFarm-1/lib/arm/libFamilyIsland.so (host_callback+108)

And one more:

  #00  pc 000000000039cdb8  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (_ZN5dmDNSL22ares_addrinfo_callbackEPviiP13ares_addrinfo+12)
  #01  pc 000000000044adb4  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (end_hquery+36)
  #02  pc 000000000044b6f8  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (host_callback+804)
  #03  pc 0000000000449e18  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (qcallback+164)
  #04  pc 00000000004456d8  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (ares_destroy+72)
  #05  pc 000000000039cfb0  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (_ZN5dmDNS13DeleteChannelEPNS_7ChannelE+20)
  #06  pc 0000000000351874  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (_ZN13dmHttpService6DeleteEPNS_11HttpServiceE+200)
  #07  pc 0000000000340724  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (_ZN8dmScriptL12HttpFinalizeEPNS_7ContextE+44)
  #08  pc 0000000000338788  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (_ZN8dmScript8FinalizeEPNS_7ContextE+56)
  #09  pc 00000000000dcda0  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (_ZN8dmEngine6DeleteEPNS_6EngineE+208)
  #10  pc 00000000000dcfcc  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (_ZN8dmEngineL7InitRunEPN15dmEngineService13EngineServiceEiPPcPFvPNS_6EngineEPvES9_S7_+228)
  #11  pc 00000000000dd060  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (_ZN8dmEngine6LaunchEiPPcPFvPNS_6EngineEPvES6_S4_+100)
  #12  pc 00000000000d985c  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (_Z11engine_mainiPPc+128)
  #13  pc 00000000000d97a4  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (main+24)
  #14  pc 00000000003fd0cc  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (_glfwPreMain+224)
  #15  pc 00000000000d97cc  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (android_main+20)
  #16  pc 00000000003fd92c  /data/app/com.MelsoftGames.FamilyIslandFarm-2/lib/arm64/libFamilyIsland.so (android_app_entry+180)
  #17  pc 00000000000686ac  /system/lib64/libc.so (_ZL15__pthread_startPv+196)
  #18  pc 000000000001dfb0  /system/lib64/libc.so (__start_thread+16)

Can you fix it?

1 Like

Can you reproduce it?

I don’t have stable steps to reproduce.

It looks like it happens when the engine is being shut down, perhaps while an HTTP request is in progress. @Mathias_Westerdahl any input?

1 Like

I think that crash is occurred after ‘reboot’ message if any http connection is active. We often use http. And we use ‘reboot’ message in special cases.

1 Like

Ah, thanks, that might be a lead.

I think (hope) that this has already been fixed in 1.2.160 coming out today. But for the sake of it, let’s look at what we have at the moment:

  • Could you provide me with your .so file that’s causing the issue? You can share it with me at jhonny.goransson@king.com or at our slack
  • Have you noticed the same behaviour on other platforms than Android?

Meanwhile I’m gonna see if I can fiddle with rebooting during http requests and see if there’s any issues there. I’m hopeful that it’s been fixed already but you never know…

3 Likes

Solved in 1.2.161

2 Likes

Crash rate is decreased from ~1% to 0.02% after fix. Thank you!

5 Likes

This is very good to hear! Thank you for getting back to us and confirming that it is fixed!

4 Likes