Search Unity

Remove a shader to avoid crash on some ICS devices

Discussion in 'Android' started by ugur, Jun 5, 2012.

  1. ugur

    ugur

    Joined:
    Jun 3, 2008
    Posts:
    692
    This is valid as of june 2012 (i´ll update the thread once a different solution is available and this becomes outdated)

    Important for all Android developers: Remove a shader to avoid crash on some ICS devices:

    Update for case 467944: App crashing on Android ICS

    Summary of crash: App which ran fine on all other devices/Android versions crashes on Android ICS (4.0.3) on some Samsung devices (Galaxy S2 for example)

    Alexey (from Unity) got back to me on this cause he found the reason for this crash, since this could be important for all others i'm posting it here, too (with permission of course =) ) :
    Alexey:
    "hey
    the crash is caused by "Hidden/Dof/Bokeh34" shader - your game cam reference "Depth of Field 34" effect - and shader is loaded and compiled. So as a workaround (while we try to understand WTH) please remove this component."

    So as summary: Some shaders which work fine on all the devices (and even on the S2 without that messed ICS build) can lead to a crash of the app on a few devices with that messed custom version of ICS. In particular remove the depth of field related bokeh shader in case you have that in your project (No matter if you have that image effect enabled or disabled if you have it referenced in your project in a scene it gets loaded anyway).

    Also as Alexey said:
    "and the "Hidden/Dof/Bokeh34" compilation crashes shader compiler very close to kernel - so no callstack in logcat."

    Hence yeah, i couldn´t see the actual reason in logcat either..

    Well, anyway, thanks to knowing that now i could just remove that shader/image effect and now my game works fine even on that messed ICS version on S2 =)

    thanks again to Alexey and the other Unity fellas =)


    Ugur