I uploaded my jam game, I agree there is a lot of mess, I took a lot of code from my other projects and I don’t have now a clue on how can I debug this issue, so maybe you have some ideas why such runtime errors could appear on window focus in a HTML5 build?
DefSave, Log and Err by Pkeod, Defold-Orthographic, Monarch, DefArc, Gooey, Defold Printer, most of them are only Lua modules - maybe Defold-Orthographic?
Have you tried to upload an empty example app?
Does that work properly?
If so, then I’d start looking at removing your extensions one-by-one and see if it starts working.
I have a lot of shader work here, so probably there is some error - but how could I find that / operation? But definitely there is a problem with dividing vec2 by int and it not works in HTML5 build If I will not find it anywhere in codebase - what could it be?
Ah, discovered a similar issue a while back when I helped another user debug a project. I can’t remember, but I think I got an error when trying to bundle the project for Windows. The cross compiler for shaders complained about integer vs float. I wonder if we can add some flag to the compiler to generate an error for this kind of situation? @jhonny.goransson ?
In my case only problem was with HTML5 build (and in the past I also had only problems with HTML5 builds and it was almost all the time the problem with some shader)
For future reference, @Dragosha on Discord pointed out how to read those logs (which I’m ashamed, I couldn’t notice, even after reading it a hundred times…)
I was focusing to much on the message itself, while below was another warning, that because of this error, the resource couldn’t be created and that’s vital!
If you ask me, such conversion in shaders (dividing floats by ints, or vec2 by ints) could have been detected in development, if it’s vital for one of the platforms. But learned about this and advised by Igor I will be testing shaders with HTML5 builds more often.
P.S.
Other than this, there are problems with HTML5 when you use Lua multiple line comments --[] and somewhere you nest it. It is allowed in Editor, everywhere, but HTML5. But the message, than is pretty straight-forward.
The problem is that we cannot always test what the final driver on the device is going to say about the shaders.
However, certain things can probably be highlighted better, and we are currently working on adding linter functionality to the editor. Hopefully we can add such a linter to the glsl shaders as well. We’ll see.