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
WEBGL_lose_context.restoreContext is used for restoring context #7232
Comments
This does seem to be a bug @GoodBoyDigital |
I think our context loss/restore really needs some help. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This remains an issue in the current master branch, it should not be closed. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still an issue in the current master branch and should not be closed. I didn't get around to commenting on #7206 before it was closed by stalebot, but we still have that issue in 6.2.0. Currently, we restart the application in the event of a WebGL context loss to get around the sprites not rendering. In our testing of recovery methods, we were able to get things to recover and render properly after a WebGL context loss by listening for a context loss and then recreating all of the graphics objects and sprites. We ended up not using this recover method this as it would eventually fail if there were multiple context losses in the same session. In the event of successive context losses pretty much everything would stop rendering regardless of when or how it was created. |
Any progress about this? Just want to know the proper way to handle context lost situation, otherwise than recreating the whole applicaiton instances. |
I'm going to put a bounty on this if someone wants to take a stab at working on this. |
I think the right solution here is for PixiJS to clear all of its internal state and wait for the |
@bigtimebuddy @Altimor has asked for the bounty to be raised to $500 on behalf of @teamflowhq − how can we pay for this bounty? |
Please see https://github.com/pixijs/pixijs/wiki/Bounties for details. Basically, a donation to our Open Collective to cover the bounty. I'll remove the current bounty amount. |
Thanks @bigtimebuddy. Please see contribution #571998 in the OpenCollective for a bounty of $250! |
Is it fixed? If yes, is it available only on the latest version and we need to upgrade or is it also available on v5 (we're using 5.3.11)? Because there are some breaking changes while migrating and I'm not familiar with pixi. A previous developer did all the coding. |
This bounty has not been claimed or fixed yet. |
Ok. Our website has several menu tabs. Two of them use the pixi based component. When switching to normal tabs from pixi-using tab, it's all fine. But when we switch back to pixi-using tab the crash and context loss happens. Is there a way to destroy the context when leaving the pixi-using tab so that when we come back it doesn't crash? Or is it not possible and that's what this issue is referring to? |
https://github.com/pixijs/pixi.js/blob/78516ba04f3fb59f4de06bd0dee5a609d9f91c19/packages/core/src/context/ContextSystem.ts#L98-L102
I'm fairly certain that
(WEBGL_lose_context).restoreContext()
is not intended to be used to recover from a general loss of context situation, it rather seems to be intended for recovering from(WEBGL_lose_context).loseContext()
for debugging purposes.See the specification and the following discussion on StackOverflow.
This is probably directly related to #7206, where it can be seen that the system can't actually handle real context loss, just a simulated one.
The text was updated successfully, but these errors were encountered: