foundryvtt-lancer
foundryvtt-lancer copied to clipboard
[BUG] Using faction logos for actor icon breaks the scene
Opening this issue for my GM, who's running Foundry, since he doesn't have a Github account.
Describe the bug Using a faction logo on an NPC and dragging it to a scene completely breaks the scene.
To Reproduce Steps to reproduce the behavior:
- Create a new NPC actor with faction-logos/union.svg or another faction logo as icon
- Drag it onto a scene
- The scene completely breaks, shows a single color, and everything is unresponsive
This only seems to happen with the files under faction-logos, not the other icons.
It should also be noted that once it's broken, it's not possible to interact with anything in the map (or other maps), almost everything but the chat is broken. It's almost like the javascript responsible for rendering the scene is completely broken. Doing an F5 refresh will make it work again until you visit the broken scene again, at which point it'll break again. You basically have to delete the affected scene to fix it.
In the developer tools, the following errors are shown:
core.min.js:8 Uncaught DOMException: Failed to execute 'texImage2D' on 'WebGL2RenderingContext': The image element contains cross-origin data, and may not be loaded.
at r.upload (http://localhost:30000/scripts/pixi.min.js:8:127584)
at r.upload (http://localhost:30000/scripts/pixi.min.js:8:131278)
at e.updateTexture (http://localhost:30000/scripts/pixi.min.js:8:231932)
at e.bind (http://localhost:30000/scripts/pixi.min.js:8:230260)
at e.r.bindAndClearTexArray (http://localhost:30000/scripts/pixi.min.js:8:248646)
at e.r.drawBatches (http://localhost:30000/scripts/pixi.min.js:8:249492)
at e.r.flush (http://localhost:30000/scripts/pixi.min.js:8:249881)
at e.r.stop (http://localhost:30000/scripts/pixi.min.js:8:250247)
at t.setObjectRenderer (http://localhost:30000/scripts/pixi.min.js:8:164426)
at t.flush (http://localhost:30000/scripts/pixi.min.js:8:164521)
Regenerating the thumbnail image for an affected scene shows:
core.min.js:8 Uncaught TypeError: Cannot read properties of null (reading '_batchEnabled')
at e.r.buildTexturesAndDrawCalls (core.min.js:8)
at e.r.flush (core.min.js:8)
at e.r.stop (core.min.js:8)
at t.setObjectRenderer (core.min.js:8)
at t.flush (core.min.js:8)
at SmoothGraphics._render (SmoothGraphics.ts:596)
at SmoothGraphics.e.render (display.min.js:8)
at e.render (display.min.js:8)
at r.render (core.min.js:8)
at t.render (app.min.js:8)
Expected behavior It shouldn't break.
Screenshots
Platform (please complete the following information):
- OS: Linux (Manjaro)
- Browser: Both the foundry integrated browser thing and the player browsers (chrome/firefox)
- Foundry version: Version 9, Build 269
- Lancer system version: 1.2.0
Discord contact info NCMagic#1578
Blocked by core issue: https://github.com/foundryvtt/foundryvtt/issues/6567
Marked wontfix
but leaving open, in case/until the core issue is fixed.
I don't know if our svgs got changed or if a PIXI.js update fixed this in foundry, but this doesn't seem to affect 2.0-rc.