-
Notifications
You must be signed in to change notification settings - Fork 55
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
Missing textures crash the renderer #106
Comments
|
Is there a standard for error logging in this project, or should I just leave it ignored? |
No standards, just leave it ignored for now. |
|
Omori does use RPG Maker MV, listed here. |
Good! Those checks exists in webgl: https://github.com/pixijs/pixi-tilemap/blob/master/src/TileRenderer.ts#L52 |
Encountered in the 1.0.2 (and earlier) versions of OMORI, as discussed on the Steam bug reports page.
It seems to use a different fork of pixi-tilemap, judging by the slightly different variable names, so it has to be verified if this issue is present in this version.
In the implementation of renderCanvasCore in RectTileLayer.ts there is no check to see if a texture is defined or not, thus leading to crashes with
Uncaught TypeError: Cannot read property 'baseTexture' of undefined.
if it does not.https://github.com/pixijs/pixi-tilemap/blob/389c82082def66e0563d2a11a8f78ec9eac424d1/src/RectTileLayer.ts#L160-L166
My proposed fix is modifying the if condition to be
textureIndex >= 0 && this.textures[textureIndex] !== undefined
, so that undefined textures are skipped, but I'm not sure whether that is computationally efficient.Instead of crashing, a more useful behaviour would be logging the error for the developer to see.
The text was updated successfully, but these errors were encountered: