Hard crash using ScreenView in Ripple In (Mac/Android native and in editor)

0 votes
asked Jun 30, 2016 in Critical bug by Peter Williams
I'm experiencing a hard crash both in the Editor and on my Android device when using ScreenView in Ripple in mode.  In the editor, I have to initiate about 10 or so transitions before it crashes bringing down the editor so I have to restart Unity.  On my android device, I just have to make 1-2 transitions before the crash happens.  It's very reproducible.  If I change the transition type to slide in, and no other changes, the crash goes away.  I'm on 1.1.4 of MaterialUI and 5.3.5 for Unity Pro.

I can privately share my project with you if that helps.
commented Jun 30, 2016 by Peter Williams
I found I was doing something that was accelerating the issue.  I was calling a ScreeView Transition from an Awake which seem to throw off the  m_ScreensTransitioning count so that the if clause in  OnScreenEndTransition for if  (m_ScreensTransitioning <= 0) was never happening.  The use case here was I had a MaterialScreen I showed for an on boarding experience but if the user already completed it I would take them to the main landing MaterialScreen instead.  I changed my Awake logic to instead of Transition to set the currentScreen of the screen view and now the counts in OnScreenEndTransition seem to make more sense and the if  (m_ScreensTransitioning <= 0) case gets fired.

Trouble is the crash still happens regardless but now I have to make a bunch more transitions before the crash happens.  Maybe 10-20 transitions before I see a crash.  So comment out the if block in OnScreenEndTransition and you might be able to reproduce the crash faster.

Its not a .Net thing, it seems internal to the Unity runtime.  I setup a developer build for android and I get this call stack:

06-30 10:13:48.421 12317 12334 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0xa0041 in tid 12334 (UnityMain)
06-30 10:13:48.481  3172  3172 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-30 10:13:48.481  3172  3172 F DEBUG   : Build fingerprint: 'samsung/nobleltedv/noblelte:6.0.1/MMB29K/N920IDVU2BPD3:user/release-keys'
06-30 10:13:48.481  3172  3172 F DEBUG   : Revision: '9'
06-30 10:13:48.481  3172  3172 F DEBUG   : ABI: 'arm'
06-30 10:13:48.481  3172  3172 F DEBUG   : pid: 12317, tid: 12334, name: UnityMain  >>> com.LotaData.SanLeandroApp <<<
06-30 10:13:48.481  3172  3172 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xa0041
06-30 10:13:48.521  3172  3172 F DEBUG   :     r0 000a000a  r1 00000035  r2 ce908de0  r3 ce908d80
06-30 10:13:48.521  3172  3172 F DEBUG   :     r4 000a000a  r5 ce908de0  r6 d065c1e8  r7 0017dc6c
06-30 10:13:48.521  3172  3172 F DEBUG   :     r8 c4653600  r9 ffffeee8  sl 3b9aca00  fp ee73a020
06-30 10:13:48.521  3172  3172 F DEBUG   :     ip eedff1b8  sp eedff2d0  lr df5baf98  pc deed36c0  cpsr 20000010
06-30 10:13:48.531  3172  3172 F DEBUG   :
06-30 10:13:48.531  3172  3172 F DEBUG   : backtrace:
06-30 10:13:48.531  3172  3172 F DEBUG   :     #00 pc 000fe6c0  /data/app/com.LotaData.SanLeandroApp-1/lib/arm/libunity.so (Unity::GameObject::IsActive() const+8)
06-30 10:13:48.531  3172  3172 F DEBUG   :     #01 pc 007e5f94  /data/app/com.LotaData.SanLeandroApp-1/lib/arm/libunity.so (UI::CanvasRenderer::SyncDirtyElements()+40)
06-30 10:13:48.531  3172  3172 F DEBUG   :     #02 pc 007ec008  /data/app/com.LotaData.SanLeandroApp-1/lib/arm/libunity.so (UI::CanvasManager::UpdateDirtyRenderers(UI::Canvas*)+196)
06-30 10:13:48.531  3172  3172 F DEBUG   :     #03 pc 007ebd80  /data/app/com.LotaData.SanLeandroApp-1/lib/arm/libunity.so (UI::Canvas::UpdateBatches(bool)+108)
06-30 10:13:48.531  3172  3172 F DEBUG   :     #04 pc 007eddcc  /data/app/com.LotaData.SanLeandroApp-1/lib/arm/libunity.so (UI::CanvasManager::WillRenderCanvases()+64)
06-30 10:13:48.531  3172  3172 F DEBUG   :     #05 pc 003af624  /data/app/com.LotaData.SanLeandroApp-1/lib/arm/libunity.so (PlayerLoop(bool, bool, IHookEvent*)+3324)
06-30 10:13:48.531  3172  3172 F DEBUG   :     #06 pc 0052670c  /data/app/com.LotaData.SanLeandroApp-1/lib/arm/libunity.so (UnityPlayerLoop()+880)
06-30 10:13:48.531  3172  3172 F DEBUG   :     #07 pc 0052c154  /data/app/com.LotaData.SanLeandroApp-1/lib/arm/libunity.so (nativeRender(_JNIEnv*, _jobject*)+264)
06-30 10:13:48.531  3172  3172 F DEBUG   :     #08 pc 00031239  /data/app/com.LotaData.SanLeandroApp-1/oat/arm/base.odex (offset 0x24000) (boolean com.unity3d.player.UnityPlayer.nativeRender()+76)
06-30 10:13:48.531  3172  3172 F DEBUG   :     #09 pc 0002eb47  /data/app/com.LotaData.SanLeandroApp-1/oat/arm/base.odex (offset 0x24000) (boolean com.unity3d.player.UnityPlayer.a(com.unity3d.player.UnityPlayer)+50)
06-30 10:13:48.531  3172  3172 F DEBUG   :     #10 pc 0002c289  /data/app/com.LotaData.SanLeandroApp-1/oat/arm/base.odex (offset 0x24000) (void com.unity3d.player.UnityPlayer$b.run()+532)
06-30 10:13:48.531  3172  3172 F DEBUG   :     #11 pc 000e64a1  /system/lib/libart.so (art_quick_invoke_stub_internal+64)
06-30 10:13:48.531  3172  3172 F DEBUG   :     #12 pc 00403665  /system/lib/libart.so (art_quick_invoke_stub+188)
06-30 10:13:48.531  3172  3172 F DEBUG   :     #13 pc 00102774  [stack:12334]

 

I sent in a Crash report to Unity for when it happens in the Unity editor.  A Unity tester confirmed they were able to reproduce the crash and forwarded it to internal unity devs so hopefully they will be able to fix it.

I suspect it has something to do with the "Ripple Mask" that gets left behind in the scene, sometimes when I pause debugging and try to click on it, it locks up the editor.  Is there any reason you leave the "Ripple Mask" behind after the transition completes?  I notice it stays there even in your sample scene.
commented Jul 1, 2016 by admin (31,720 points)
Hi there,

I can't seem to be able to reproduce this. Are you able to email me a copy of the scene?

~ Declan.
commented Jul 1, 2016 by Peter Williams
I'm pretty sure it's not a MaterialUI problem but a Unity problem.  The crash call stack comes from Unity internal libraries, and not anywhere in .net code you wrote.  If it is a problem with your ripple setup I'm not sure how to go about debugging it without access to Unity internals. I am not able to reproduce it in your "17 - Screens" example scene.  I just ran that scene for ~5 min spamming the transition scene button and it seems fine with it.  I think the problem shows itself with more complex screens.

I'll try to package up my project and email you a link so you can play with it if you want, I'll email you a link later today.

1 Answer

0 votes
answered Jul 13, 2016 by Peter Williams
selected Aug 22, 2016 by admin
 
Best answer
The MaterialUI guys emailed me back showing a call stack for the crash that was coming from a separate unity asset I was using "HyperText".  So in all likely hood, this is not a MaterialUI problem.  I wasn't seeing HyperText in my call stacks but it makes perfect sense to me in retrospect that it would be the culprit.

Thanks go to the MaterialUI guys in helping to track this down!
commented Mar 26, 2017 by quadchess (200 points)
I'm also experiencing this same hard crash.. Took me a while to track it down to the Ripple on the ScreenView since the crash is sporadic and gives no error message, but when I disable the Ripple Out and just have it on Fade In Fade Out, the crashing went away!  However, I really liked the Ripple effect and it would be nice to get it back reliably.

I'm not really using separate assets on this project, so it's more of a fresh implementation. It happens when I go back and forth switching screens a few times, sometimes 3 times, sometimes 8, then it closes application. It might be a speed thing where if I go faster it's more likely to happen while the rippling is still doing it's animation.

For the record, I'm using Unity v5.6.0f1 and have not tried to reproduce it in 5.4, so it might be that.. Seems like a simple scenario setup that I would imaging others would be having a problem with too. Hope to see this working in the next release, the ripple transition looked pretty cool, would love to put it back when stable.  Thanks.
Welcome to MaterialUI support! Ask us anything :)
...