Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity game crash immediately after build after updating to 4.5.2

Discussion in 'Editor & General Support' started by Astral14, Aug 11, 2014.

  1. Astral14

    Astral14

    Joined:
    Aug 5, 2014
    Posts:
    21
    After updating to 4.5.2 any game, including the games I had developed before without any issues will immediately crash when I build and run that game on my android device. The logcat gives me this error,
    E/Unity (17831): The resource Internal-ErrorShader.shader could not be loaded from the resource file!
    E/Unity (17831): (Filename: ./Runtime/Misc/ResourceManager.cpp Line: 1115)

    Even if I create a new project with just an image file in the scene and than build and run that scene it will still crash on my device and give this error even though I'm not using any shader in my scene. Still I created a Resources Folder (Assets/Resources) and than placed the Internal-ErrorShader.shader in that Rescources folder so that this shader will be included in the build (we can find this shader in built in shader package) However when I build and run the scene it will immediately crash on my device and give the same error- The resource Internal-ErrorShader.shader could not be loaded from the resource file!

    I did try to replace the unity default resource file with the one from earlier versions of Unity but that did not work either.

    When I downgrade it back to Unity 4.3.4 than I do not get this Internal-ErrorShader error and the game will run on my android device. Can anybody please help me with this and tell me how to get rid of this error? I do not wish to keep using the Unity 4.3.4 since the new unity update is really cool except ofcourse the above error.
     
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    I believe that there should be in the build a file called "unity default resources". This is a binary file that stores all those things you've probably never thought about. (For example, where does the Ariel font come from? When you get a shader error why does the material turn pink? Where do the GUI layouts come from?) So, my suspicion is that this file isn't in the build. Maybe compare the build that you get from 4.5.2 with 4.3.4. I'd expect the files in the build to be pretty similar, not necessarily binary identical.
     
  3. Astral14

    Astral14

    Joined:
    Aug 5, 2014
    Posts:
    21
    Hi Graham,

    Thanks for your reply. I checked the build, unity default resources file is included in the build..it's in the assets/bin/data. This means even though the "unity default resources" file is included in the build I still get the error! The default resources file in the build that I get from 4.5.2 and 4.3.4 is also of the same size.

    This file "unity default rescources" is actually located in Program Files\Unity\Editor\Data\Resources folder, I did try to replace it with the unity default rescources file from Unity 4.3.4 but than when I launch Unity I immediately get the same shader error along with few other errors in console. So even this doesn't work.

    I really have no clue what to do about this error! unity default resources file is in the build, the Internal-ErrorShader.shader is placed in Assets/Resources folder so that it can be included in the build even though I do not use shader in the scene but this error won't go. Is there something in unity default resources file or in Internal -errorShader due to which it keeps giving error on Android device?
     
  4. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    There are multiple versions of "unity default resources", one for each platform. You should not have to do any manual copying of files around - Unity does do this for you. On PC, there should be a "unity default resources" file in ...\Editor\Data\PlaybackEngines\androidplayer\Data. (And in each of the playback engine folders.)

    Can you create a completely new project, perhaps with a spinning cube and deploy that to Android? I guess that crashes in the same way, in which case, please submit a bug report from the editor, include the project, and when you get an email back with a bug number, post that here.
     
  5. Astral14

    Astral14

    Joined:
    Aug 5, 2014
    Posts:
    21
    Hi Graham,

    I did create a spinning cube project, but just like all other games it crashes when I deploy it on my Android device. Case number is 626111. Thanks.
     
  6. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Hi, I have successfully built and run your project without any problem. Do you get the same problem if you build to other targets - PC/Mac standalone for example?

    Have you tried a fresh reinstallation of 4.5.2f1? Make sure nothing persists in the folder after you've uninstalled it.
     
  7. Astral14

    Astral14

    Joined:
    Aug 5, 2014
    Posts:
    21
    Hi, Thanks you did help me by telling me to make sure there is nothing in the folder after I uninstall Unity. After uninstalling there was still a folder MonoDevelop with data in there. I deleted the 2 folders, installed Unity, build and deployed it on my device and now it runs without any crash. For a week I was on the forum trying to find errors similar to mine and trying different solutions however only deleting the 2 folders manually helped. Is this because the files which do remain after uninstalling conflict when you install a new version of Unity giving rise to errors?
     
  8. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    Hi, It seems surprising that the folder left was MonoDevelop, but yes I suspected that if you were installing the new version over an older one that there may have been some problem with lingering files.

    Could you confirm your operating system.
     
  9. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    There's no uninstaller with MonoDevelop, which is a bit strange. Still a puzzle why this affected the build.
     
  10. Astral14

    Astral14

    Joined:
    Aug 5, 2014
    Posts:
    21

    Hi, well today when I build and deploy the game on my android device it crashes again. I was working on my game and tried to test it but when I build and deploy it I get the same error - Internal-ErrorShader.shader could not be loaded from the resource file!.

    Yesterday that spinning cube project which I had build and deployed on my device successfully, when I take that apk and install it on my device than it runs and will not crash. However the same spinning cube project when I build and deploy on my device today it crashes immediately and gives me that error. Same project, today's apk will crash but yesterdays apk will run successfully! Can you help me with this?
     
  11. Astral14

    Astral14

    Joined:
    Aug 5, 2014
    Posts:
    21
    Hi Graham,

    Well it worked only yesterday! when I build and deploy the game on my android device now it crashes again. That spinning cube project, yesterday which I had build and deployed on my device successfully, if I take that apk now and install it on my device than it runs and will not crash. But the same spinning cube project when I build and deploy on my device today it crashes immediately. This means today's apk will crash but yesterday's apk will run without any error! It is a puzzle.
     
  12. Astral14

    Astral14

    Joined:
    Aug 5, 2014
    Posts:
    21
    Hi, just like before, I uninstalled Unity, deleted the folders and installed it again. Its working now and won't crash on my device. However I checked the 2 apk's and the "unity default resources" file in both the apk's are of different size! That's why the one I built and deployed yesterday crashes. But why is the "unity default resources" different in both the apk's?
     
  13. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
  14. Astral14

    Astral14

    Joined:
    Aug 5, 2014
    Posts:
    21
    No just the latest version of Unity, I'm not using 2 versions side by side. Also, after I uninstall and than reinstall Unity 4.5.2 I do not get this shader error until I close and restart Unity. I'm using Vista, I just saw the system requirements and it does say that Vista is not supported however till now the previous version of Unity along with all other software's I use have all worked on Vista and hence I've never tried to upgrade to Windows 7. So is this error because of Vista?
     
  15. Jack-Unity

    Jack-Unity

    Unity Technologies

    Joined:
    May 21, 2013
    Posts:
    34
    It's hard to say, but because your OS is unsupported, it's unlikely QA will take a look at your bug. Are you able to build other targets, Win Standalone for example?