Author Topic: Crash issue with NGUI and Firebase Analytics  (Read 2509 times)

Tashkent

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Crash issue with NGUI and Firebase Analytics
« on: January 12, 2017, 02:47:09 AM »
Hello,

I found a crash issue while using NGUI.

When I use Unity’s SetActive function (NGUI Image, Enable or Disable) and Firebase Analytics together, the app crashes. For reference, the crash issue only seems to occur on devices with Android OS v5.0 or more.
Also, the issue didn’t occur when I used UGUI, it only occurred when I used NGUI.

Here are the details about my project (NGUI scene).
When the “Login” button is clicked once, the following function runs automatically every 3 seconds as I programmed it for easy testing.
1)   NGUI Sprite Image Enable or Disable using the Unity SetActive() function
2)   Firebase Analytics process
I tested it and found that the crash occurs when it runs 10~100 times. The crash occurs when Firebase Analytics runs. You can see the crash log below.

E/NativeCrashListener(875): Exception dealing with report
E/NativeCrashListener(875): android.system.ErrnoException: read failed: EAGAIN (Try again)
E/NativeCrashListener(875):    at libcore.io.Posix.readBytes(Native Method)
E/NativeCrashListener(875):    at libcore.io.Posix.read(Posix.java:147)
E/NativeCrashListener(875):    at libcore.io.BlockGuardOs.read(BlockGuardOs.java:230)
E/NativeCrashListener(875):    at android.system.Os.read(Os.java:364)
E/NativeCrashListener(875):    at com.android.server.am.NativeCrashListener.consumeNativeCrashData(NativeCrashListener.java:240)
E/NativeCrashListener(875):    at com.android.server.am.NativeCrashListener.run(NativeCrashListener.java:138)

Here are the details about the UGUI scene.
When the “Login” button is clicked once, the following function runs automatically every 3 seconds as I programmed it for easy testing.
1)   UGUI Sprite Image Enable or Disable using the Unity SetActive() function
2)   Firebase Analytics process
I tested it and found that the app didn’t crash.

So after testing the two sample scenes, I found that the issue occurred when I used NGUI, but not when I used UGUI.

Here are my specs:
*Unity 3D engine: 5.4.4 f1
*NGUI Version: 3.11.1
*Firebase Analytics Unity SDK: 1.0.1
*Test Device: Galaxy Tab, Galaxy S6 Edge, Galaxy Note 4

Holy Manfred

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 8
  • Posts: 71
    • View Profile
Re: Crash issue with NGUI and Firebase Analytics
« Reply #1 on: January 12, 2017, 10:21:42 AM »
Just a shot in the dark, but have you tried using
  1. NGUITools.SetActive(gameObject)
instead of Unity's
  1. gameObject.SetActive()
?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Crash issue with NGUI and Firebase Analytics
« Reply #2 on: January 13, 2017, 10:22:18 PM »
All crash reports should be submitted directly to Unity. There is no mention of NGUI in that stack trace, so there is literally nothing for me to look at in there.