Search Unity

4.3 Multithreaded rendering crashes when running on device

Discussion in 'Android' started by foobar, Nov 18, 2013.

  1. foobar

    foobar

    Joined:
    Jan 28, 2010
    Posts:
    90
    Hi,

    Wondering if anyone else is experiencing constant crashes when enabling multithreaded rendering in Unity 4.3 and running a build on their device.

    Thanks,
    Gordon
     
  2. PigJazz

    PigJazz

    Joined:
    Jul 11, 2013
    Posts:
    1
    Hey Gordon our team is experiencing the exact same problem. We were really excited about the multithreaded rendering and it's a bummer it doesn't seem to be working at the moment. Unfortunately I have no solutions but just wanted to second your complaint.
     
  3. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    426
    here too...
    turn it off and it works but it's not the solution...
    I#m still using 4.2.2
     
  4. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    635
    I enabled multithreaded rendering and my game doesn't crash on my Galaxy S4, however my NGUI interface flickers on and off and is stretched and distorted like crazy...

    Any ideas why this happens?
     
  5. cpasjuste

    cpasjuste

    Joined:
    Apr 2, 2012
    Posts:
    139
    Same here !
     
  6. Agent_007

    Agent_007

    Joined:
    Dec 18, 2011
    Posts:
    899
    Do you use latest NGUI version?
     
  7. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    635
    I haven't updated since 4.3 if that's what you mean. However I also had weird graphical glitches when I look at some of my models too, I would see these warped triangles flashing across entire screen, so I don't think it has anything to do with ngui specifically.
     
  8. Wom

    Wom

    Joined:
    Feb 7, 2013
    Posts:
    38
    I'm seeing similar glitches/crashes to everyone on this thread.
    I made this post because I thought the problem was OpenGL ES 2.0 vs 3.0: http://forum.unity3d.com/threads/21...ES-3-0-devices-when-built-with-Open-GL-ES-2-0

    After finding this thread though - it seems more likely to be multithreaded rendering. Tried it and it does indeed fix the problem (at least on my Nexus 5). Toggling between ES 2 and 3 fixed the problem too - but given everyone else's posts in this thread, I reckon this is more likely the issue.

    I also am a NGUI user - running Unity 4.3.1 f1 and NGUI 3.0.6 f6 (both are the latest released versions as of 2013-12-06).
    Though for the record, I've also seen Vectrosity have rendering issues with this too, so it's not just NGUI. Both of those assets introduce new cameras, maybe it's something to do with that.
     
    Last edited: Dec 6, 2013
  9. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,378
    guys, multi-threaded rendering is still a bit experimental feature. Please report bugs with repro projects (preferably smaller ones ;-)) so we can debug it
     
    GuillaumeZAHRA likes this.
  10. Wom

    Wom

    Joined:
    Feb 7, 2013
    Posts:
    38
    I've got no problems with bugs - stuff happens.

    But am I crazy, or is this feature automatically switched on by default when you upgrade to 4.3?
    Why would you default an experimental feature to on?

    If you want to include paying customers in your beta test team - ask first.
    Tracking this down has cost me a bunch of time I really could have used elsewhere.
     
    Last edited: Dec 7, 2013
  11. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,378
    ok, first of all i should have put experimental in quotes probably - i just meant that it is first release with it and the thing in itself is very complicated so it is expected to have some bugs
    As for switching on by default: i think this is a bug by itself. At some point MT rendering option was shared between multiple platforms so it was enabled by default. But then i fixed it so mobile platforms have separate path (and disabled by default). Though i honestly dont remember was it supposed to be in 4.3 or 4.3.1
     
  12. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,545
    It seems 4.3.3 is still flickering.
     
  13. radiantSil

    radiantSil

    Joined:
    May 30, 2013
    Posts:
    4
    yeah, It still happens in Unity 4.3.3.

    It seems to happen on OpenGL ES 2.0 target and enabled Multithreaded Rendering.
    I switched target to OpenGL ES 3.0, my project ran well on my Nexus7(2013).
     
    Last edited: Jan 21, 2014
  14. Mikie

    Mikie

    Joined:
    Dec 27, 2011
    Posts:
    367
    Just curious. Are you able to publish to a Droid 2 or any phones like it?
     
  15. Jason-King

    Jason-King

    Joined:
    Oct 28, 2010
    Posts:
    53
    Has anyone validated whether this is still occurring? Would love to be able to enable MT again. I was never able to get it to occur on my device, but others on my team were - I would like to avoid using them as guinea pigs if others can confirm.
     
  16. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    553
    It's still happening. Please submit bugs. This appears to be a very low priority feature to fix, but maybe more bug reports would move it along.
     
  17. Jason-King

    Jason-King

    Joined:
    Oct 28, 2010
    Posts:
    53
    I was still getting the issue with Unity build 4.3.4. Then I upgraded the Android OS from 4.3 to 4.4.2. At that point, the instance of MTR crashing that I was consistently able to reproduce ceased to be reproducible. Unfortunately requiring Android OS 4.4.2 is not an option.
     
  18. Driskard

    Driskard

    Joined:
    May 20, 2012
    Posts:
    8
    When multithreaded rendering is enabled our game crashes just after Unity splash screen (logcat: call opengl ES api with no current context) on Samsung Galaxy S3 MINI but works fine on Samsung Galaxy S3. When disabled, it doesn't crash anymore.
     
  19. Bas-Smit

    Bas-Smit

    Joined:
    Dec 23, 2012
    Posts:
    84
    Can anyone from Unity shed some light on this? We want to enable mtr for our game, but this and some other threads are scaring us a bit. Im particularly interested in the questions below, but any additional information would be highly appreciated.

    Any information on which devices, firmware, or combination thereof suffer from these issues?
    Any information on what triggers these problems and how to work around them?
    Are there fixes in recent or upcoming Unity versions?
     
  20. Agent_007

    Agent_007

    Joined:
    Dec 18, 2011
    Posts:
    899
    I would suggest that you wait for Unity 4.5 before doing that.
     
  21. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    I'm still having graphical artifacts with multithreaded rendering and ngui 3.4.9
    I can't upgrade NGUI to the latest version because my whole UI would go crazy and I would have to resize everything completely.
     
  22. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,378
    heads up: NGUI bugs with OpenGL ES2 multi-threaded rendering should be fixed in 4.5.2 Patch 3 (to be released soonish).
    Please try it out when it is available
     
  23. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    in the meantime, I upgraded Unity to 4.5.2f1 and NGUI to 3.6.8 (still crashing)
    will be waiting for the 4.5.2f3 version :D
     
  24. MaydayWorks

    MaydayWorks

    Joined:
    Aug 18, 2014
    Posts:
    6
    still crashing on gles 3.0 ready devices with multithread rendering when Froce ES 2.0 checked!
     
  25. MapuHoB

    MapuHoB

    Joined:
    Aug 17, 2014
    Posts:
    50
    anything new at this time? Is it better now? Unity 5.0.2
     
  26. Aram-Azhari

    Aram-Azhari

    Joined:
    Nov 18, 2009
    Posts:
    141
    I still get this crash on latest Unity 5 (5.2.2f1) with Galaxy S5 and with multithreaded turned on.
     
  27. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    473
    does ur app work properly without multithreaded on?
     
  28. Aram-Azhari

    Aram-Azhari

    Joined:
    Nov 18, 2009
    Posts:
    141
    Yes.
     
  29. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    473
    mm seems like specific device issue
     
  30. psykojello2

    psykojello2

    Joined:
    Jul 19, 2013
    Posts:
    37
    I'm on Unity 5.1.3. With multithreading on, it works on all devices except 2 Galaxy Note 4's with Android 5.0.1 (lollipop).

    It doesn't crash, but when trying to load a level asynchronously, my game gets stuck on the loading screen. The game continues in the background but is blocked by the loading screen which did not get the signal to hide.

    I'm checking for asyncOperation.IsDone which does not get set to false.
    I also check for onLevelLoaded () to see if the level was succesfully loaded. That doesn't work either.

    Again, this works on all other androids and ios devices. Just an issue on Galaxy Note 4 with Android 5.0.1 when multithreaded is on.
    Works fine with multithreaded off (just that the frame rate is slower)
     
  31. MinhDao

    MinhDao

    Joined:
    Oct 28, 2013
    Posts:
    155
    I heard that some device crash because enable multithreaded rendering. So, Is it stable to use? Or, It is still a experimental feature?
     
  32. Mehrdad995

    Mehrdad995

    Joined:
    Jul 17, 2013
    Posts:
    15
    how much does it differ in term of performance?
    does it worth the risk of enabling or I should keep it disabled?

    psykojello2
    are you using NGUI as well or not?
     
  33. zmeinaz

    zmeinaz

    Joined:
    Jul 3, 2012
    Posts:
    27
    I am using unity 5.3.1p1 and I see heavy graphical glitches in the UI on Android, especially when scrolling a masked scroll view. I am using unity UI and I only see this issue when building with multi threaded rendering enabled.

    From the posts above it seems like the graphics glitching went away in some version of unity.

    Is anyone else still experiencing this?
     
  34. psykojello2

    psykojello2

    Joined:
    Jul 19, 2013
    Posts:
    37
    No, I'm not using NGUI.

    I removed the async code - replaced it with just a simple scene load. It still breaks.

    The objects and UI from the first scene do not get unloaded, but the objects from the new scene get loaded and continue playing. Again this is only with Multithreaded on, on only the Galaxy Note 4 running 5.0.1.
     
    Mehrdad995 likes this.
  35. johnpine

    johnpine

    Joined:
    Sep 19, 2015
    Posts:
    26
    I hope this thread doesn't die yet. I am too having problems with multithreaded rendering on Android.
    Just updated to 5.3.5p2 and now the Unitys own UI is throwing this error to console when the GUI flickers:
    "[EGL] Failed to create protected window surface: EGL_BAD_ATTRIBUTE: An unrecognized attribute or attribute value was passed in the attribute list."
     
  36. ajon542

    ajon542

    Joined:
    Oct 22, 2013
    Posts:
    6
    I am currently using Unity 2017.2.0f2 and getting a segfault with the stacktrace pointing to UnityGfxDeviceW on two devices (that I know of) with multithreaded rendering enabled.
    Devices:
    • Amazon Firephone (SD4930UR)
    • Kindle Fire HDX 3rd Gen

    It is occurring with an empty project and scene. I tried disabling the setting through code using the PlayerSettings.MTRendering prior to calling the BuildPipeline.BuildPlayer method, but this did not seem to work. It only worked when I set this value through the editor and saved the project, which is less than ideal because I would like to control this setting during our automated builds.

    Right now, I am disabling the setting in the ProjectSettings.asset file (via command line script) prior to kicking off the automated builds for Amazon, which is also less than ideal.

    Code (CSharp):
    1. I/DEBUG   (  354): backtrace:
    2. I/DEBUG   (  354):     #00  pc 00022346  /system/lib/libc.so (__memcpy_base+249)
    3. I/DEBUG   (  354):     #01  pc 000698df  /system/vendor/lib/egl/libGLESv2_adreno.so (InitBufferObject+6)
    4. I/DEBUG   (  354):     #02  pc 0005d824  <unknown>
    Is Unity able to detect when a device doesn't support multithreaded rendering? Or is this not a Unity issue?
     
    Last edited: Dec 27, 2017