HTML5 build OOM

I now have a new issue. I am not sure if this is still OOM because it doesn’t show an error in the console. But maybe it still is.

When I just Build the project, everything works perfectly.

If I bundle HTML5 and test locally, I do have some issues. The app loads. The player is put into the main menu. However, when I try to enter the play scene (loading another collection), I get a black screen. No errors in the console and the level just does not load.

If I try to upload that same build to Facebook, the game loads but the colors in the menu are all broken:

What it should look like:

And when I try to enter the play scene, instead of a black background, there is now a white background.

Btw, I updated the engine to the latest version yesterday.

What could cause this?

I tried to use the default texture profile (with texture compression enabled) and then a custom one with these settings:
image

Should I send the project to you, @britzl?

Thanks!

Are you using any custom shaders or materials? What if you disable texture compression? Does the console give any indication at all?

No custom shaders nor materials. Perhaps some packages were updated and it broke something?

I disabled texture compression (in preferences and right before making the build, set texture profile to default).

This is the console when hosting from a local server:
image

And this is the console when uploaded to FB:

Can you please isolate this to a project with a single collection with the graphics for the menu? You can remove all code, just the collection and the gui file and atlas is required.

Should I delete them from the project or just not use them and create a dummy collection? Should it still implement the fb library or not?

For the purpose of testing I suggest that you create a new collection and add the gui file to that collection. No FB implementation or anything. As simple as possible. I want to limit the sources of errors. I’m also assuming that the menu gui only uses a single atlas and not the two huge ones you had in your project? And make sure to not use texture compression at all!

If this minimal setup works and doesn’t result in weird colors we can start adding back files one by one.

Without changing anything, the colors are now suddenly okay. I wonder if it was a cache issue or something somewhere was updated so that it is fine now.

However, I still get the black screen when loading another collection.

When I disable a game object with 15 factories and a script that is used for spawning the characters then it works an there is no black screen.

All of the characters use 2 atlases, which are included in the build (when factories are enabled):

  1. atlas for faces, which is 2048x1024 (1.56MB compressed, 10.67MB uncompressed)
  2. atlas for bodies, which is 4096x4096 (15.55MB compressed, 85.33MB uncompressed)

I tried disabling the script, the code, the factories etc. The only thing that seemed to work was when the character atlas was not included in the build. Only then the collection loaded.

I then tried creating a separate atlas for just 1 single character (1024x1024) and see if it would load. It doesn’t. There is a single factory, the script (code is commented out btw so it does not actually do anything except initialization) and the single character atlas is included in the build. And still black screen. If I remove the collection factory, and thus not having the atlas in the build, it loads the collection just fine.

Note: I have other atlases included in the build as well.

If you share the minimal repro with us, we’ll take a look.

I will PM you the game.

The black screen issue was due to errors I did not for some reason detect in console. I was using “–[=====[” and “–]=====]” to do multiline comments. This however caused errors. I switched to --[[ ]]-- and the script errors were resolved.

EDIT: the reason I did not see the errors was because I was making a “Release” build and not a “Debug”.

Thank you!

2 Likes

You can select lines of text and press Ctrl + / (if on Windows) to toggle multiline comments a bit more quickly.

2 Likes