vircadia-native-core icon indicating copy to clipboard operation
vircadia-native-core copied to clipboard

Crash on startup related to shader cache

Open SilverfishVR opened this issue 3 years ago • 2 comments

I just got the dreaded crash on startup bug but was able to fix it by deleting \Vircadia\Interface\shaders\cache.json

the issue started after I closed interface while it was still loading content because I went to the hub after clearing cache but after about 4 minutes and still loading I went back to my sandbox, but it kept loading hub content forever (ktx textures I think), also the log was spamming:

[08/26 20:55:58] [WARNING] [default] Invalid level to be stored, expected:  -1 , got:  0
[08/26 20:56:00] [WARNING] [default] Invalid level to be stored, expected:  -1 , got:  0
[08/26 20:56:00] [WARNING] [default] Invalid level to be stored, expected:  -1 , got:  0
[08/26 20:56:00] [WARNING] [default] Invalid level to be stored, expected:  -1 , got:  0
[08/26 20:56:01] [WARNING] [default] Invalid level to be stored, expected:  -1 , got:  0

according to Kalila this comes from libraries\gpu\src\gpu\Texture_ktx.cpp on line 295.

  • My cache.json when crashing: cache.json_bad It does not look currupted, as in it is still a valid text file but it is pretty big (800MB 😮 )
  • Regenerated cache.json after deleting the old one and successfully started and closed interface: cache.json_good

https://github.com/vircadia/vircadia/issues/1172 may be the same or related.

SilverfishVR avatar Aug 26 '21 20:08 SilverfishVR

Looked at my own, 30 MB in size right now. Still probably a bit too big for JSON. Perhaps we shouldn't be using JSON for this, for performance and memory usage reasons.

daleglass avatar Jan 27 '22 22:01 daleglass

Hello! Is this still an issue?

stale[bot] avatar Jul 27 '22 04:07 stale[bot]