View in #cornerstone3d on Slack
@Fima_Furman: One of our customers is reporting OHIF crashing with CONTEXT_LOST_WEBGL errors in console. Usually it happens with CT scans with many thin slices in the viewports.
This seems to be happening consistently on a brand new gaming laptop with the NVIDIA GeForce RTX 4060 card.
The WebGL errors are present when the viewport crashes and black screen is typically displayed to the user.
I asked the user to update all drivers by doing a windows update and this did not help.
I could never reproduce it on MacOS laptops, nor some of the other Windows machines we have access to.
@Alireza_Sedghi: Is this windows? check here https://github.com/OHIF/Viewers/issues/3207
575x157px image
@Fima_Furman: @Alireza_Sedghi Thanks you! I saw this before, but this user seems to have the NVIDIA GeForce RTX 4060 which looks like a dedicated GPU card? The bug report above does not seem to provide any conclusive workarounds. The gaming laptop purchase by our customer appears to be quite new.
@Alireza_Sedghi: The fact that they have it does not mean the user is using it!
They might be using the onboard gpu
I would check that first
@Fima_Furman: @Alireza_Sedghi Thanks! It sounds like a silly question, but what is the best way to tell? Is this a chrome setting?
@Alireza_Sedghi: hmm good question
https://superuser.com/questions/693790/how-to-check-if-nvidia-or-intel-graphics-is-being-used
Super User: how to check if nvidia or intel graphics is being used
maybe this?
@Fima_Furman: Interesting - from the screen shots it appears they have two displays and one is using integrated card and the other the GPU card. I will ask if they can replicate the issue on both!
@Alireza_Sedghi: Either way update drivers
it might solve the problem
@Fima_Furman: He did run windows update and that did not help.
@Steph_Vallance: Hey @Fima_Furman, did you get any further with this issue?
We’re currently encountering it now (I think most of our customers are using intel chips, so it’s quite scary to think about)
You can force the correct GPU by disabling the one you want to isolate in the hardware settings. I suspect the 4060 will handle it - my 2060 can!
The chrome://flags/#use-angle fix seems to work for us in most cases. But there are some machines we’ve tested that still suffer from other errors after that fix.
I’m not sure what we can do for a long term solution, or if it’s even a viable solution to ask customers to adjust flags.
@Alireza_Sedghi: Have you guys tried the latest OHIF and Cornerstone 3D 2.0 ? maybe that has helped
@Fima_Furman: @Steph_Vallance I cannot state that we conclusively fully solved the issue yet. @Alireza_Sedghi we’re were waiting for 3.9 non beta release to start re-basing our sultion - just saw that 3.9 and 3.9.1 just came out, so we’ll give it a try!
@Steph_Vallance What is your specific instructions to intel users with chrome://flags/#use-angle ?
@Steph_Vallance: @Alireza_Sedghi I’m in the process of migrating over to C3D 2.0 - I’m hopeful it will improve our experience with Segmentations, if it helps us out with Intel chips it would be a huge bonus.
@Fima_Furman I’ve been recommending chrome://flags/#use-angle, then to select ‘OpenGL’ and it works most of the time, if it doesn’t, I ask them to try each of the other options in the dropdown, but so far, OpenGL has been the only one that’s worked. This is for internal testing so far, so I’m keen for a better long term solution if possible. For Electron apps:
app.commandLine.appendSwitch('--use-angle', 'opengl');
in the main.js
before createWindow
achieves the same thing (just in case it’s helpful for anyone in the future!)
I’ll let you both know if 2.0 helps, or if we find any other solutions!
Unfortunately it looks like 2.0 will not solve the problem
I tested using the new live-examples and was able to crash the browser using them - same CONTEXT_LOST_WEBGL
error.
@Alireza_Sedghi: Which example is failing?
@Steph_Vallance: https://www.cornerstonejs.org/live-examples/labelmaprendering
Also https://www.cornerstonejs.org/live-examples/labelmapsegmentationtools
I suspect I’ll see the same with any volume viewports
@Alireza_Sedghi: What is the simplest example that is failing
@Steph_Vallance: I think https://www.cornerstonejs.org/live-examples/volumeapi is quite simple, yes?
It takes a lot longer, but does eventually fail. We noticed it definitely relates to the size of a study - more slices and segmentations = quicker leak. Our 32gb machines hold on longer than the 16gb but eventually crash too.
@Alireza_Sedghi: Yes that one is good start, and what is the spec of the machine? What cpu exactly and what version of driver?
@Steph_Vallance: CPU is Intel i7-10750H, driver 10.0.19041.4355,
GPU (Intel UHD Graphics) driver 31.0.101.2130
@Alireza_Sedghi: Was it mac or windows
@Steph_Vallance: Windows 10