Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-deterministic "An error occurred before the game window could be initialised. Please check the console!" #35

Closed
rameshvarun opened this issue Apr 13, 2021 · 6 comments

Comments

@rameshvarun
Copy link

rameshvarun commented Apr 13, 2021

This project is extremely impressive - I think HTML export is the most needed feature in the LOVE ecosystem.

I'm encountering an issue (compatibility mode) where, most of the time my game will load successfully, but every now and then the load fails with the following alert: An error occurred before the game window could be initialised. Please check the console!

The console logs don't have any relevant errors and are the same from a successful load to an unsuccessful load.

Screen Shot 2021-04-13 at 12 45 40 AM

Here's a temporarily hosted version: https://fault-beta.surge.sh/

I also traced this string to Exception.cpp so it looks to be just a generic message.

@rameshvarun
Copy link
Author

Looks like Davidobot/love#1 adds the newline that is necessary for emscripten to buffer the line and actually send it to the JS console.

@Davidobot
Copy link
Owner

Oh! Thanks for the heads up. I didn't realise there was a pull request. I'll merge it and build a new version of love.js today/tomorrow

@rameshvarun
Copy link
Author

rameshvarun commented Apr 13, 2021

I've tested out the PR and I can see whats happening now.

  • My game is "resizable" under conf.lua.
  • Whenever there is an unsuccessful load, I can see that the game canvas is only 2x2 in size.
  • This was triggering errors in my Lua code for the tiny window size.

I've fixed my code, but the 2x2 canvas issue is still a problem. I will look to see what I can debug here.

@Davidobot
Copy link
Owner

I think this is related to #16 ?

@rameshvarun
Copy link
Author

I'm pretty sure that's it. I'll close this issue.

By the way, I found that builds on emsdk 2.0.17 fail with the following error when run in a webpage.

love.js:9 TypeError: Cannot read property 'buffer' of undefined
    at Object.write (love.js:9)
    at Object.write (love.js:9)
    at Object.writeFile (love.js:9)
    at Object.storeLocalEntry (love.js:9)
    at love.js:9
    at IDBRequest.req.onsuccess (love.js:9)
(anonymous) @ love.js:9

Downgrading to 1.40.1 worked. So the emsdk version should probably be pinned somewhere in the script or in the README.md.

@Davidobot
Copy link
Owner

I think I build with 2.x.x if I remember correctly. I'll check it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants