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

Error improvement when call Assets.loadEverything before System.start #1466

Open
RblSb opened this issue Jul 5, 2023 · 0 comments
Open

Error improvement when call Assets.loadEverything before System.start #1466

RblSb opened this issue Jul 5, 2023 · 0 comments

Comments

@RblSb
Copy link
Contributor

RblSb commented Jul 5, 2023

Currently this mistake is complicated to debug, because:

  • Loading callback if fired without problems
  • Rendering without resources is fine
  • g2.drawImage fails with:
Error: Cannot cast {
	g2canvas : null, 
	myWidth : 240, 
	myHeight : 160, 
	myFormat : 0, 
	renderTarget : false, 
	image : [object HTMLImageElement], 
	video : null
} to {
	__name__ : true, 
	init : <function>, 
	formatByteSize : <function>
}

And endless Error: End before you begin spam.

We can throw this problem at step 1 if do not ignore null in SystemImpl.gl here 10 years ago:

public function createTexture() {
if (SystemImpl.gl == null)
return;

Or maybe even earlier someway.

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

1 participant