You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

jeromebg

Professional

  • "jeromebg" started this thread

Posts: 1,113

Location: Angers - France

Occupation: 360 experiences creator

  • Send private message

1

Monday, August 17th 2015, 3:55pm

Error: WebGL: Exceeded 16 live WebGL contexts

Hi, I'm trying to make a "pano preview" when mouse is over a hotspot.
onover I display a textfield plugin with an iframe in it showing the linked pano.
It works perfect, except after going over severals hotspots I have this error :

Quoted

Error: WebGL: Exceeded 16 live WebGL contexts for this principal, losing the least recently used one

So the main pano goes black !

is there a way to avoid that ?

jeromebg

Professional

  • "jeromebg" started this thread

Posts: 1,113

Location: Angers - France

Occupation: 360 experiences creator

  • Send private message

2

Tuesday, August 18th 2015, 11:54am

Note, this is only a Firefox issue, no problems on chrome and ME...

3

Tuesday, August 18th 2015, 1:45pm

Hi,

do you mean you load an iframe with the next pano on every onover?
That's probably not the best solution? (in kind of performance and resources).

About WebGL contexts error - that might be a browser bug - when the iframe will be removed then the resources from within the iframe page (like the WebGL context) should be removed too...

The correct way for unloading/removing the krpano viewer from the webpage, would be called the removepano() function:
http://krpano.com/docu/html/#removing

But even then the WebGL context error might still happen when its a browser bug.

Best regards,
Klaus

jeromebg

Professional

  • "jeromebg" started this thread

Posts: 1,113

Location: Angers - France

Occupation: 360 experiences creator

  • Send private message

4

Tuesday, August 18th 2015, 1:56pm

Thanx Klaus for your reply,
I tried with removepano() but the bug is still there on firefox (maybe it's a browser bug ?)

do you mean you load an iframe with the next pano on every onover?
That's probably not the best solution? (in kind of performance and resources).


I load an iframe each time a hotspot has mouse onover (to display the linked panorama in a iframe before clicking to for loadpano())
Here is my code :

Source code

1
2
3
onover="txtadd(previewurl,'[iframe src=preview.html?image.cube.url=',get(name),'.tiles/mobile_%s.jpg width=100% height=auto frameborder=0][/iframe]');
		         set(layer[preview].html,get(previewurl));
                         ...   "


Is there a better way to to this ?

5

Tuesday, August 18th 2015, 8:33pm

Hi,
I tried with removepano() but the bug is still there on firefox (maybe it's a browser bug ?)
Yes, than it's a browser bug.


Is there a better way to to this ?
What about just showing an image?
Loading a whole webpage with a new viewer instance on each on-over event is a bit extreme...

Best regards,
Klaus

6

Wednesday, October 21st 2015, 7:33pm

Same issue where chromium is complaining about too many webgl contexts

I am facing the same issue when switching two different panoramas in spite of clearing the previous one before loading the next one.
I'm using chromium for my app. Every time I change the panorama, I'm removing the previous panorama with removepano('krpanoSWFObject'). I have doubled checked and found that even though remove pano removes the panorama from DOM, it probably isn't clearing event handlers and webgl context


Typical observations I made about this issue include:
1. The memory consumption increases gradually every time the panorama is changed
2. After 8-10 times of changing the panorama, chrome starts showing the warning "Too many active WebGL contexts. Oldest context will be lost"
3. I've tested with Firefox, Chrome and Chromium to find same results
4. I tried removing the canvas element from DOM using jquery. But, I still didn't notice any difference in the behavior.