Unity 5.3 beta crashing due to "precompiled shader asset from an old Unity version"

Hey all,

I’m testing a large project trying to upgrade it to Unity 5.3.0b2

I’m getting frequent crashes due to “precompiled shader asset from an old Unity version” in various shaders.

This is just one example:

Updating Assets/Garage-II/Shader/DifNorSpcCub.shader - GUID: 43cf4de722807b242adbb364c527f682…
GpuProgram creation error: shader program type is unrecognised. You might have a precompiled shader asset from an old Unity version.
(Filename: /Users/builduser/buildslave/unity/build/Runtime/GfxDevice/GpuProgram.cpp Line: 856)
Receiving unhandled NULL exception
Launching bug reporter
Obtained 8 stack frames.

I’m just deleting each shader and then restarting Unity to import/compile again each time.

EDIT: not a big issue in the scheme of things, but would be nice if Unity didn’t crash. Having to restart importing several times on a large project is a bit frustrating.

Cheers,
Andrew

Hi Andrew,

Sorry you’ve run into this crash. This sounds exactly like something we ran into in internal testing recently - there was a nasty problem that had been lurking for a while, but it didn’t show up until I ran across a project with this case of failing to create a lot of precompiled shaders all at once. I’ve put in a fix for it which should be delivered with 5.3.0b3 by this weekend. Let me know if it’s not fixed in beta 3 and you’re still running into the crash, and I can investigate your case.

Thanks! Baldur

GpuProgram creation error: shader program type is unrecognised. You might have a precompiled shader asset from an old Unity version.

I see this message in WebGL build from 5.3.0b4

Are you using pre-compiled shaders too ?

i just got this error with unity 5.3.0b5 =( all i did was go from 5.2.2 to 5.3.0b5 and ran it and it works in editor just not on device.

I posted the bug as “Android Crash on loading a scene, GPUProgram creation error”

Bug # please? (Can’t find it by that name)

for some reason i never received a bug report email =( i uploaded a 1 gb file with it, and i had sent 2 bug reports and didnt get emails for either of them!

Probably mail/bug server processing the queue still. Please let us know when you get it.

I actually just figured out what shader was breaking it, it took a few hours but “GlareFX” is the asset causing the issue, specifically “glareFxCheapMobile.cs” as a post effect, with “glareFXCheapMobile” as its shader and “glareBlur” as its blur shader.

its in the project i posted, i just got one of the emails, but its not the one with the project sorry Alex, but maybe that means the next one should come soon.

I also saw that “glareFXCheapMobile” has an error in the inspector saying “Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)”

which is weird, since it was made for mobile

SubProgram "gles " {
Keywords { }
"!!GLES
#define SHADER_API_GLES 1

i’m guessing because it doesnt have anything specifically saying GL ES 2 anywhere might be causing an issue.

Probably check the upgrade guide regarding the OpenGL upgrade?
http://forum.unity3d.com/threads/upgrade-guide-oct-10-2015.358197/

Wondering if the pragma needs changing