Home › Forums › WebGL & WebXR Troubleshooting › Firefox Error: WebGL context was lost
- This topic has 5 replies, 3 voices, and was last updated 7 months ago by studiogijs.
-
AuthorPosts
-
2020-04-02 at 11:31 pm #25289Alex TAYLORCustomer
Hi – brand new member/purchaser here, so apologies if this is in the wrong place!
As I’ve been working through first in trial mode and now licensed, I’ve identified that sometimes Firefox (and only Firefox) gets bogged down after multiple page reloads and navigation.
I’m pretty sure that it is this known/acknowledged bug in Firefox:WebGL Context not being cleared after page reload.
To summarise, after a number of WebGL contexts in an active tab, Firefox fails to clear them and eventually anything trying to use WebGL in this tab dies.
While I am fairly sure that this is not a Verge3d problem, is it something that can be mitigated by changes to Verge3d, or should I try to design around it? (and hope Mozilla fix soon!)To summarise:
- With my test model it happens after about 20 loads in the same tab
- That sounds like a lot, however that holds even for navigating to many different pages with Verge3d instances (while remaining in the same tab)
- Closing the tab and reopening does fix the problem, but I can’t expect users to do that
- The development I’m working on would see users navigate in the same tab between different models, so this is likely to be an issue
- Prior to discovering Verge3d (which is awesome!) I had been working with x3dom which also renders via WebGL but doesn’t seem to have this issue
2020-04-03 at 6:44 am #25294Yuri KovelenovStaffHi Alex,
Thanks for becoming our customer.
What may help here is cleaning up all the resources when the user reloads the page.
Try this puzzle
https://www.soft8soft.com/docs/manual/en/puzzles/Scenes.html#unload_scene
coupled with onunload handler
https://www.w3schools.com/jsref/event_onunload.asp
See here about how you can mix Puzzles and JavaScript
https://www.soft8soft.com/docs/manual/en/introduction/Using-JavaScript.html2020-04-03 at 7:43 am #25296Alex TAYLORCustomerThanks for the quick and very helpful reply Yuri!
I’ll work on those approaches next week, and report any progress back on this thread should it be useful to others.Thanks Alex
2020-04-03 at 12:49 pm #25300Yuri KovelenovStaff2024-04-19 at 11:27 am #72399studiogijsCustomer@yuri I have a similar problem with my application and need urgent help, since the app is now not loading reliably on iOS. The above instructions are not completely clear to me.
How do I force a reset of the app when the user reloads the page? Using the unload scene puzzle somehow does not work for me, since that messes up everything. So what I am looking for is something that makes sure the scene is not kept in cache, at least that’s my understanding of why this might happen. I wonder though why this only happens on iOS.
Even when it does work sometimes, I still see that content gets lostI tried the following. I installed Chrome browser on the iphone and started chrome://inspect
then I open a new tab and load the app.
It loads well, and I get:
LOG Verge3D 4.5.1 for Blender (License, WebGL 2.0) so all seems goodWhen I reload I sometimes get a correct scene, sometimes not, and this message:
LOG Verge3D 4.5.1 for Blender (License, WebGL 2.0)
LOG v3d.WegGLRenderer: Context Lost.
LOG v3d.WegGLRenderer: Context Restored.I see part of the page, but the scene is not correctly loaded. Sometimes it just gets stuck on the preloader.
EDIT: the above seems to happen only when I load the same page also in Safari. So it appears to me that there is an issue with Safari. If I close Safari down, the page loads correctly again.
Thanks in advance for your help.
The app is https://v3d.net/ukb
Some more info: the app runs fine on ipad pro running iOS 16.5
Also running fine on iphone pro max running 17.4.1I further see:
https://forums.developer.apple.com/forums/thread/737042
and:
https://bugs.webkit.org/show_bug.cgi?id=268070how do I verify if the above is the case in my shaders?
- This reply was modified 7 months ago by studiogijs.
-
AuthorPosts
- You must be logged in to reply to this topic.