Slaus Posted September 4, 2018 Share Posted September 4, 2018 Hello everyone. In my 100k+ lines_of_code project in late weeks was introduced a bug which sometimes causes all the graphics to disappear at the end of loading process. Could you please help me to hunt it down? First, game loads background and loading bar with PIXI.loader and displays it with PIXI. Then loads all the other resources the same way. When other resources finish loading there is a chance (50% for some machines and <1% for others) that none will be displayed and both background and loading bar also disappear. When it happens, line: PIXI.renderer.render( stage ) throws these errors (currently using PIXI 4.5.3): where Sprite.js:208 of my version is and WebGLRenderer.js:408 is I was trying to examine and reverse every change made to the project for last weeks, but they are pretty innocent and it didn't help What I figured out so far is that sprite.baseTexture.orig of every existing image somehow becomes null at some point and every width() getter stops working which throws such exceptions, but weird part is that these errors are only thrown once - not every requestAnimationFrame() call, hmm. And I couldn't find any line in PIXI and PIXI.loader where there would be something like sprite.baseTexture.orig = null or BaseTexture: this.orig = null ... Do you guys have any ideas what could cause such behavior and any possible steps to fix it? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 4, 2018 Share Posted September 4, 2018 Check your pixi.js version and make sure its up-to-date, i think we fixed filter-related problem already. However, if it is resource--loader problem, you have to ask@xerver, I recommend to make a fiddle that reproduces the problem for him. Quote Link to comment Share on other sites More sharing options...
Slaus Posted September 4, 2018 Author Share Posted September 4, 2018 I will try. Thank you very much! Quote Link to comment Share on other sites More sharing options...
Slaus Posted September 5, 2018 Author Share Posted September 5, 2018 Switching to PIXI 4.8.2 didn't help Quote Link to comment Share on other sites More sharing options...
Slaus Posted September 5, 2018 Author Share Posted September 5, 2018 Found the reason: I had a custom shader for which I was getting dummy (to make shader working) texture this way: let whatever for ( let i in PIXI.utils.TextureCache ) { if ( i.indexOf( '.json' ) >= 0 ) continue whatever = i break } sometimes it happen so that loadbar/loadscreen.png was obtained this way and after a while loading scene was destroyed: load_scene.destroy( true ) which cause loadbar/loadscreen.png textures to also remove which lead to shader stop working and PIXI to shutdown. Thanks for help! Glad everything's working again! Cheers! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 5, 2018 Share Posted September 5, 2018 Dummy texture is "PIXI.Texture.WHITE" or "PIXI.Texture.EMPTY" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.