PIXI 8 Application Crash Multiple Tabs
PixiJS version
8.21.0
Link to minimal reproduction
https://naileditgames.github.io/pixi8-crash-context-poc
Steps to reproduce
- Open the PixiJS 8 version of the PoC in multiple browser tabs on iOS Safari.
- Run the game in several tabs simultaneously.
- Keep the tabs running for some time / switch between them.
- Eventually, one or more tabs lose their WebGL context.
- The affected game does not recover correctly and shows a black screen or crashes the page.
What is expected?
The application should not crash.
Ideally, after a context loss, PixiJS should be able to automatically recover or reinitialize the renderer and allow the application to continue running, if the browser makes the WebGL context available again.
What is actually happening?
With PixiJS 8, running multiple instances can result in a WebGL context loss from which the application cannot recover.
On iOS Safari, the result can be a permanent black screen or, in some cases, a complete page crash.
The same scenario does not reproduce with PixiJS 6.
System Info
iPhone 12, iOS 27.0
iPhone 14 Plus, iOS 26.7Any additional comments?
We recently migrated our game framework from PixiJS 6 to PixiJS 8 and noticed an issue with WebGL context loss when running multiple instances of the game in separate browser tabs.
When several game instances are running simultaneously, PixiJS 8 eventually loses the WebGL context. After the context is lost, the game is unable to recover correctly and either:
Displays a black screen, or Causes the entire page to crash.
We do not observe this behavior with the same setup running on PixiJS 6.
The issue is reproducible on iOS Safari, specifically on iOS 27 and iOS 26.7.
I prepared a minimal proof of concept demonstrating the issue. It contains two versions of the same application:
PixiJS 6 — works correctly when running multiple tabs. PixiJS 8 — eventually loses the WebGL context and fails to recover.
Live PoC: https://naileditgames.github.io/pixi8-crash-context-poc/
Repository: https://github.com/naileditgames/pixi8-crash-context-poc
Videos: I have also attached two videos demonstrating the difference: PixiJS 6 — multiple instances running correctly. https://youtube.com/shorts/mt8alwbWPZk PixiJS 8 — WebGL context loss followed by the black screen / crash. https://youtube.com/shorts/d0vxoOJRrCk
Source: pixijs/pixijs