Author Topic: Crash occurs in kitkat (under opengl 2.0)  (Read 41606 times)

karlkang

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Crash occurs in kitkat (under opengl 2.0)
« on: March 03, 2014, 07:08:05 PM »
Hi there

At first I am shocked with excellent performance of latest version of NGUI. Really thanks for ur efforts for enhancing software.
But it seems that there is slight problem in the lastest version of ngui, under circumstances of kikat os and opengl 2.0,
crashes occur.   
(when i use opengl 3.0, crash doesn't occur. It works perfectly.  But most of phones doesn't support opengl 3.0. it's not compatible)
Followings are the conditions of problem

API : opengl 2.0
version of ngui : 3.5.3
OS : kitkat (4.4.2)
Phones : LG G2, Samsung Galaxy Note3, Galaxy S4 lte-a

any solution does exist? or plan to update?

Thanks for answering the questions in advance!!
« Last Edit: March 03, 2014, 09:59:11 PM by karlkang »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #1 on: March 03, 2014, 10:10:43 PM »
I would need a lot more details than this to go on. What's the crash, where, how to reproduce it, etc. However generally anything related to stability is a bug that should go to Unity, not NGUI.

Russel

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #2 on: March 06, 2014, 05:35:15 AM »
Here is the same question on Unity Answers:

http://answers.unity3d.com/questions/655219/crash-on-opengl-es-30-device.html

Crash-log (NGUI 3.5.1):

java.lang.Error: FATAL EXCEPTION [UnityMain]
Unity version : 4.3.4f1
Device model : samsung GT-I9505
Device fingerprint: samsung/jfltexx/jflte:4.4.2/KOT49H/I9505XXUFNB8:user/release-keys

Caused by: java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 7e007000
Build fingerprint: 'samsung/jfltexx/jflte:4.4.2/KOT49H/I9505XXUFNB8:user/release-keys'
Revision: '11'
pid: 31218, tid: 31235, name: UnityMain >>> com.bla.bla <<<
r0 7e007000 r1 7dd32050 r2 000006c0 r3 435c0000
r4 000006c0 r5 7896c994 r6 7e007000 r7 7dd32010
r8 000006c0 r9 00000001 sl 7dd32280 fp 00000001
ip 00000010 sp 7896c910 lr 00000280 pc 4013525c cpsr 0000000b

at libc.__memcpy_base(__memcpy_base:227)
at libGLESv2_adreno.rb_memcpy(rb_memcpy:282)
at libGLESv2_adreno.rb_vbo_cache_buffer(rb_vbo_cache_buffer:320)
at libGLESv2_adreno.cache_vbo_attrib(cache_vbo_attrib:298)
at libGLESv2_adreno.0004962d(Native Method)
at libGLESv2_adreno.core_glDrawElementsInstancedXXX(core_glDrawElementsInstancedXXX:140)
at libGLESv2_adreno.core_glDrawElements(core_glDrawElements:10)
at libGLESv2_adreno.glDrawElements(glDrawElements:28)
at libunity.0035a918(Native Method)
at libunity.0035cca0(Native Method)
at libunity.0033d438(Native Method)
at libunity.002257d4(Native Method)
at libunity.0022583c(Native Method)
at libunity.001f2478(Native Method)
at libunity.000dc690(Native Method)
at libunity.000e1480(Native Method)
at libunity.000e6e2c(Native Method)
at libunity.000f07c8(Native Method)
at libunity.0010d584(Native Method)
at libunity.001128a8(Native Method)
at libunity.0027a290(Native Method)
at libunity.0028486c(Native Method)
at libunity.003a208c(Native Method)
at libunity.003a21e8(Native Method)
at libdvm.dvmPlatformInvoke(dvmPlatformInvoke:112)
at libdvm.dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)(dvmCallJNIMethod:398)
at libdvm.0002a060(Native Method)
at libdvm.dvmMterpStd(Thread*)(dvmMterpStd:76)
at libdvm.dvmInterpret(Thread*, Method const*, JValue*)(dvmInterpret:184)
at libdvm.dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)(dvmCallMethodV:336)
at libdvm.dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)(dvmCallMethod:20)
at libdvm.00058b6b(Native Method)


« Last Edit: March 06, 2014, 05:46:51 AM by Russel »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #3 on: March 06, 2014, 11:18:06 AM »
Do you have multi-threaded rendering enabled?

Russel

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #4 on: March 06, 2014, 11:22:26 AM »
No

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #5 on: March 06, 2014, 11:25:55 AM »
So when does the crash occur? When you start? When you play? On exit? The more details the better.

Russel

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #6 on: March 06, 2014, 11:54:08 AM »
Many of our user report this bug with Samsung Galaxy S4 and Samsung Galaxy Note3. The crash occurs after few seconds (30s maybe after Start).

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #7 on: March 06, 2014, 11:58:55 AM »
Then it sounds like this: http://forum.unity3d.com/threads/213331-Android-Black-Screen

It's a bug in Unity 4.3 and the fix seems to be making your app use a 32 bit buffer.

Russel

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #8 on: March 07, 2014, 04:15:03 AM »
32 bit buffer setting was not helpful.

Russel

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #9 on: March 07, 2014, 05:44:41 AM »
Backtrace

03-07 10:37:55.592: I/DEBUG(267): backtrace:
03-07 10:37:55.592: I/DEBUG(267):     #00  pc 0002225c  /system/lib/libc.so (__memcpy_base+227)
03-07 10:37:55.592: I/DEBUG(267):     #01  pc 00071107  /system/vendor/lib/egl/libGLESv2_adreno.so (rb_memcpy+282)
03-07 10:37:55.592: I/DEBUG(267):     #02  pc 0007d4a1  /system/vendor/lib/egl/libGLESv2_adreno.so (rb_vbo_cache_buffer+320)
03-07 10:37:55.592: I/DEBUG(267):     #03  pc 000465a7  /system/vendor/lib/egl/libGLESv2_adreno.so (cache_vbo_attrib+298)
03-07 10:37:55.592: I/DEBUG(267):     #04  pc 0004962d  /system/vendor/lib/egl/libGLESv2_adreno.so
03-07 10:37:55.592: I/DEBUG(267):     #05  pc 00049da5  /system/vendor/lib/egl/libGLESv2_adreno.so (core_glDrawElementsInstancedXXX+140)
03-07 10:37:55.592: I/DEBUG(267):     #06  pc 00049fd7  /system/vendor/lib/egl/libGLESv2_adreno.so (core_glDrawElements+10)
03-07 10:37:55.592: I/DEBUG(267):     #07  pc 00039767  /system/vendor/lib/egl/libGLESv2_adreno.so (glDrawElements+28)
03-07 10:37:55.592: I/DEBUG(267):     #08  pc 003cdbb4  /data/app-lib/com.bla.bla/libunity.so (GLES2VBO::DrawInternal(int, int, ChannelAssigns const&, void*, unsigned int, GfxPrimitiveType, unsigned int, unsigned int, unsigned int)+400)
03-07 10:37:55.592: I/DEBUG(267):     #09  pc 003ce754  /data/app-lib/com.bla.bla/libunity.so (GLES2VBO::DrawVBO(ChannelAssigns const&, unsigned int, unsigned int, GfxPrimitiveType, unsigned int, unsigned int)+132)
03-07 10:37:55.592: I/DEBUG(267):     #10  pc 003b68d8  /data/app-lib/com.bla.bla/libunity.so (ThreadedVBO::DrawVBO(ChannelAssigns const&, unsigned int, unsigned int, GfxPrimitiveType, unsigned int, unsigned int)+508)
03-07 10:37:55.592: I/DEBUG(267):     #11  pc 001f47b0  /data/app-lib/com.bla.bla/libunity.so (DrawUtil::DrawVBOMeshRaw(VBO&, Mesh&, ChannelAssigns const&, int, unsigned int)+104)
03-07 10:37:55.592: I/DEBUG(267):     #12  pc 001f4824  /data/app-lib/com.bla.bla/libunity.so (DrawUtil::DrawMeshRaw(ChannelAssigns const&, Mesh&, int)+60)
03-07 10:37:55.592: I/DEBUG(267):     #13  pc 0015ec34  /data/app-lib/com.bla.bla/libunity.so (MeshRenderer::Render(int, ChannelAssigns const&)+92)
03-07 10:37:55.592: I/DEBUG(267):     #14  pc 001e4ae0  /data/app-lib/com.bla.bla/libunity.so (BatchRenderer::Flush()+116)
03-07 10:37:55.592: I/DEBUG(267):     #15  pc 000eba48  /data/app-lib/com.bla.bla/libunity.so (ForwardShaderRenderLoop::PerformRendering(ActiveLight const*, RenderTexture*, ShadowCullData const&, bool, bool, bool)+1964)
03-07 10:37:55.592: I/DEBUG(267):     #16  pc 000ed0f8  /data/app-lib/com.bla.bla/libunity.so (DoForwardShaderRenderLoop(RenderLoopContext&, dynamic_array<RenderObjectData, 4u, (MemLabelIdentifier)53>&, bool, bool, RenderTexture*, ActiveLights&, bool, bool)+3624)
03-07 10:37:55.592: I/DEBUG(267):     #17  pc 000f7500  /data/app-lib/com.bla.bla/libunity.so (DoRenderLoop(RenderLoop&, RenderingPath, CullResults&, bool)+1436)
03-07 10:37:55.592: I/DEBUG(267):     #18  pc 000fc3dc  /data/app-lib/com.bla.bla/libunity.so (Camera::DoRender(CullResults&, void (*)(Camera&, RenderLoop&, CullResults&), int)+284)
03-07 10:37:55.592: I/DEBUG(267):     #19  pc 00103854  /data/app-lib/com.bla.bla/libunity.so (Camera::Render(CullResults&, int)+260)
03-07 10:37:55.592: I/DEBUG(267):     #20  pc 001284d4  /data/app-lib/com.bla.bla/libunity.so (RenderManager::RenderCameras()+240)
03-07 10:37:55.592: I/DEBUG(267):     #21  pc 00288490  /data/app-lib/com.bla.bla/libunity.so (PlayerRender(bool)+144)
03-07 10:37:55.592: I/DEBUG(267):     #22  pc 002890b0  /data/app-lib/com.bla.bla/libunity.so (PlayerLoop(bool, bool, IHookEvent*)+2596)
03-07 10:37:55.592: I/DEBUG(267):     #23  pc 003ff820  /data/app-lib/com.bla.bla/libunity.so (UnityPlayerLoop()+712)
03-07 10:37:55.592: I/DEBUG(267):     #24  pc 004043e0  /data/app-lib/com.bla.bla/libunity.so (nativeRender(_JNIEnv*, _jobject*)+80)
03-07 10:37:55.592: I/DEBUG(267):     #25  pc 00020bcc  /system/lib/libdvm.so (dvmPlatformInvoke+112)
03-07 10:37:55.592: I/DEBUG(267):     #26  pc 00051927  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
03-07 10:37:55.592: I/DEBUG(267):     #27  pc 0002a060  /system/lib/libdvm.so
03-07 10:37:55.592: I/DEBUG(267):     #28  pc 00031510  /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)
03-07 10:37:55.592: I/DEBUG(267):     #29  pc 0002eba8  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
03-07 10:37:55.592: I/DEBUG(267):     #30  pc 00063e75  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+336)
03-07 10:37:55.592: I/DEBUG(267):     #31  pc 00063e99  /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #10 on: March 07, 2014, 07:53:52 AM »
Please submit a bug to Unity so they can look into this. None of this is in NGUI's code, so I have nothing to look into here. The stack trace points to adreno-based rendering inside Unity.

Russel

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #11 on: March 24, 2014, 06:03:00 AM »
We suspect that is a NGUI Tween issue (UITweener). We try to narrow it down and build a small repro project.
« Last Edit: March 24, 2014, 06:23:29 AM by Russel »

tyomaa88

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #12 on: March 24, 2014, 08:16:56 AM »
Hi there. We are having the same issue here.

For our project we upgraded NGUI from 3.0.4 to 3.5.0 and started to experience this crash (w/ same stacktrace). We have not upgraded Unity - all of the last builds were made in 4.2.2 version of Unity, so it seems pretty logical for me that there might be a problem in NGUI =(

Crash is easily reproduced on Samsung Galaxy Note 3 (Qualcomm Snapdragon 800 / Adreno 330) but not on several other devices. Previous builds (on NGUI 3.0.4) never crashed on exact same device.

Aren, that would be really nice if you could dig a little bit more into this issue, this is a real problem for our game =(

Russel

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #13 on: March 24, 2014, 12:36:55 PM »
It seems this is not a Tween issue, but a Font / widget depth issue (maybe???). It is difficult to reproduce! This is definitely a NGUI Bug.

Russel

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: Crash occurs in kitkat (under opengl 2.0)
« Reply #14 on: March 25, 2014, 04:43:50 AM »
The Sony Xperia Z Ultra is a new device with this crash, because Android KitKat now rolling out to Sony Xperia Z Ultra.

Here are the the crash candidates (all Android-KitKat with OpenGL ES supported devices, but not the Nexus devices)
http://en.wikipedia.org/wiki/OpenGL_ES#OpenGL_ES_3.0_2

Downgraded to NGUI 3.0.8f4, not crash!
« Last Edit: March 25, 2014, 05:11:47 AM by Russel »