Dmengine black screen and crash (DEF-2074) (SOLVED)

I have an issue with dmengine.
On my xiaomi redmi note 2 dmengine do not start at all. When I try to start app itā€™s show me black sreen and app crash after few seconds.
Bug reproduce only on dmengine 1.2.84 and 1.2.83,
With game build and 1.2.82 - all fine.

dmengine really cool thing, will be great if you can help me with this bug.

logcat info:

D/libc-netbsd(20778): getaddrinfo: localhost get result from proxy >>
F/libc (20778): ā€¦/src/dlib/socket.cpp:42: uint32_t* dmSocket::IPv4(dmSocket::Address*): assertion ā€œaddress->m_family == DOMAIN_IPV4ā€ failed
F/libc (20778): Fatal signal 6 (SIGABRT), code -6 in tid 20803 (Thread-1335)
D/AEE/AED ( 263): $===AEE===AEE===AEE===$
D/AEE/AED ( 263): p 0 poll events 1 revents 0
D/AEE/AED ( 263): not know revents:0
D/AEE/AED ( 263): p 1 poll events 1 revents 0
D/AEE/AED ( 263): not know revents:0
D/AEE/AED ( 263): p 2 poll events 1 revents 1
D/AEE/AED ( 263): aed_main_fork_worker: generator 0xab9df7f0, worker 0xffb58b88, recv_fd 0
D/AEE/AED ( 263): p 3 poll events 1 revents 0
D/AEE/AED ( 263): not know revents:0
D/AEE/AED ( 263): p 4 poll events 1 revents 0
D/AEE/AED ( 263): not know revents:0
D/AEE/AED ( 263): p 5 poll events 0 revents 0
D/AEE/AED ( 263): not know revents:0
I/DEBUG (20811): handle_request(0)
I/DEBUG (20811): check process 20778 name:defold.dmengine
I/DEBUG (20811): tid 20803 abort msg address is:0xf0bfc000, si_code is:-6 (request from 20778:10180)
I/DEBUG (20811): BOOM: pid=20778 uid=10180 gid=10180 tid=20803
I/DEBUG (20811): [OnPurpose Redunant in void preset_info(aed_report_record*, int, int)] pid: 20778, tid: 20803, name: Thread-1335 >>> com.defold.dmengine <<<
I/DEBUG (20811): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG (20811): Build fingerprint: 'Xiaomi/hermes/hermes:5.0.2/LRX22G/6.4.28:user/release-keysā€™
I/DEBUG (20811): Revision: '0ā€™
I/DEBUG (20811): ABI: 'armā€™
I/DEBUG (20811): pid: 20778, tid: 20803, name: Thread-1335 >>> com.defold.dmengine <<<
I/DEBUG (20811): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
I/DEBUG (20811): Abort message: 'ā€¦/src/dlib/socket.cpp:42: uint32_t* dmSocket::IPv4(dmSocket::Address*): assertion ā€œaddress->m_family == DOMAIN_IPV4ā€ failedā€™
I/DEBUG (20811): r0 00000000 r1 00005143 r2 00000006 r3 00000000
I/DEBUG (20811): r4 e4f83dd8 r5 00000006 r6 00000000 r7 0000010c
I/DEBUG (20811): r8 e4f83a30 r9 e4f831bc sl e4f831cc fp 00000002
I/DEBUG (20811): ip 00005143 sp e4f83118 lr f77404df pc f7765d04 cpsr 600f0010
I/DEBUG (20811):
I/DEBUG (20811): backtrace:
I/DEBUG (20811): #00 pc 0003bd04 /system/lib/libc.so (tgkill+12)
I/DEBUG (20811): #01 pc 000164db /system/lib/libc.so (pthread_kill+66)
I/DEBUG (20811): #02 pc 000170a7 /system/lib/libc.so (raise+10)
I/DEBUG (20811): #03 pc 00013997 /system/lib/libc.so (__libc_android_abort+34)
I/DEBUG (20811): #04 pc 000120c8 /system/lib/libc.so (abort+4)
I/DEBUG (20811): #05 pc 00014b93 /system/lib/libc.so (__libc_fatal+16)
I/DEBUG (20811): #06 pc 00013a21 /system/lib/libc.so (__assert2+20)
I/DEBUG (20811): #07 pc 001c5084 /data/app/com.defold.dmengine-2/lib/arm/libdmengine.so (dmSocket::IPv4(dmSocket::Address*)+48)
I/DEBUG (20811): #08 pc 001c5980 /data/app/com.defold.dmengine-2/lib/arm/libdmengine.so (dmSocket::GetLocalAddress(dmSocket::Address*)+208)
I/DEBUG (20811): #09 pc 00091a68 /data/app/com.defold.dmengine-2/lib/arm/libdmengine.so (dmEngineService::EngineService::Init(unsigned short)+216)
I/DEBUG (20811): #10 pc 00091de4 /data/app/com.defold.dmengine-2/lib/arm/libdmengine.so (dmEngineService::New(unsigned short)+40)
I/DEBUG (20811): #11 pc 000914b4 /data/app/com.defold.dmengine-2/lib/arm/libdmengine.so (dmEngine::Launch(int, char**, void ()(dmEngine::Engine, void*), void ()(dmEngine::Engine, void*), void*)+268)
I/DEBUG (20811): #12 pc 0008ab48 /data/app/com.defold.dmengine-2/lib/arm/libdmengine.so (main+104)
I/DEBUG (20811): #13 pc 00219d2c /data/app/com.defold.dmengine-2/lib/arm/libdmengine.so (_glfwPreMain+236)
I/DEBUG (20811): #14 pc 0021a548 /data/app/com.defold.dmengine-2/lib/arm/libdmengine.so (android_app_entry+176)
I/DEBUG (20811): #15 pc 00015c5b /system/lib/libc.so (__pthread_start(void*)+30)
I/DEBUG (20811): #16 pc 00013ceb /system/lib/libc.so (__start_thread+6)

Some IPV4->IPV6 issue? @jakob.pogulis, what do you think?

Yes, seems as if weā€™re trying to retrieve the IPv4 address from something that isnā€™t an IPv4 socket (if I remember lineno correctly). Would need to reproduce the error and debug to find a solution, canā€™t think of anything right now Iā€™m afraid.

3 Likes

This means that I will have to work without dmrengine? :cry:

dmengine is the actual Defold game engine. You can download the different versions from d.defold.com. There are debug, release and headless versions available for all supported platforms. If you put dmengine.exe or similar in the root of your project and run it it will look for a game.project file and try to launch whatever built assets there is in the build folder. Are you saying that you are only seeing this issue when running from the command line? If so, which version of dmengine are you using?

I told only about bug on my phone with dmengine.apk version of 1.2.83 and 1.2.84 downloaded from d.defold.com

dmengine.apk 1.2.82 - works fine, but I canā€™t use it for debug because version of engine what I use is 1.2.84

dmengine_release - launching without black screen bug, but I canā€™t see my device in targets (as I told 1.2.82 and earlier - all fine and I can see device)

Ah, sorry, I should have re-read the whole post before answeringā€¦ Ok, so Jakob probably needs to take a look at this when heā€™s back from vacation.

1 Like

Maybe Jakob already return to work?
Will be great if somebody can help me with this issue

Yes he is. @jakob.pogulis?

Hello @AGulev!

Iā€™m sorry for the delayed response. I do have an idea about what could be causing this, but it would be great if you could help me with some additional information.

  1. Does you device have IPv6 support enabled
  2. If yes, could you disable IPv6 and see if it behaves differently?
  3. And if you are comfortable with the shell, could you please check the list of available interfaces using adb shell and then adb ip addr show and give me the information about the loopback interface ā€œloā€.
2 Likes

@jakob.pogulis thank you!!!

  1. yes.
  2. :smiley: when I turned off ipv6 - all working fine!
  3. info:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever

1 Like

Thank you @AGulev for the information provided and the assistance verifying the problem. Could you please do me another favour and check whether or not a game that is bundled for release works when IPv6 is enabled?

This seems to be an issue that occurs whenever an Android device has an IPv6 address associated with itā€™s local interface, but should only occur when the Simple Service Discovery Protocol (SSDP) is sending announcements. Since this does not occur on a release build it should only be a problem during development, though itā€™s a critical one.

Iā€™ve added this as a critical bug with issue number DEF-2074.

1 Like

Bundled for release game works fine.
And this problem only with dmengine

2 Likes

Thanks for your help, Iā€™ll push for this issue to be included in the next sprint.

1 Like

I checked again with 1.2.90 itā€™s solved

3 Likes