OHIF Viewer v2 MPR/MDR view crashes on mobile (iOS/Android): WebGL lost, white screen, reload or Viewer crash

35 views
Skip to first unread message

Reuniones GrupoCBM

unread,
Jul 1, 2025, 5:13:25 PMJul 1
to cornerstone platform
We are experiencing a critical crash in OHIF Viewer v2 when activating the MPR/MDR functionality on real mobile devices (both iOS and Android). The viewer loads the study and initial series just fine, but when enabling MPR, the interface freezes at “Loading…”, crashes, reloads the page, shows a red notification `Failed to load 2D MPR Dataset is too big to display in MPR`, and the mobile browser becomes unresponsive or reloads entirely.

This only occurs on real physical mobile devices. When emulating mobile view using Chrome or Firefox DevTools, the viewer behaves correctly, and MPR loads without problems.

We’ve tested this with both a customized and a fresh cloned OHIF v2 repo (latest version ~4.12.51) with no modifications to vtk.js or its volume handling logic. The crash seems to originate from WebGL context loss and shader compilation issues triggered during the MPR rendering setup.

Some images of the problem:
https://i.sstatic.net/JigKGb2C.png
https://i.sstatic.net/YjND6KJx.png
https://i.sstatic.net/9nuoj2PK.png

What baffles me is that this was working perfectly fine a month ago. We made no change that would affect this and used the original clone to test, and had the same behavior, which it did not show before. We are also having trouble updating to the new OHIF v3 given the problems it has with loading images on mobile devices.

Can you help me? Don't know if this is the place to ask but, I'm quite lost on what to do and how to make it work.

- On an iPhone 11: The page either shows a white screen, hangs at “Loading...”, or the browser reloads the page unexpectedly. No MPR images appear.
- On low-end Android phones like a Nokia C21 Plus: Sometimes one MPR pane loads (usually the axial one), and the others remain black. Then WebGL crashes, and the console shows the lost WEBGL context. Sometimes it manages to load the second pane and then the third never loads.

The viewer fails to render the volume, WebGL context is lost, and eventually crashes or becomes unresponsive.

Everything seems fairly unstable. At one point we were experiencing the error of the context lost for WEBGL, but then for some days it stopped showing this message and a new red notification started showing that said `Failed to load 2D MPR Dataset is too big to display in MPR` and now it no longer shows again. This was to the point we thought maybe some critical library or resource was being actively changed (which would be very weird given OHIF v2 is no longer in development) or taken down. And that this resource was being called by the viewer, but we saw no trace of it. But I digress.

I also observed a warning related to `dpdb.json`. But this is for VR and should not be the cause?

OS / Devices Tested:

iPhone 11 iOS 17 4 GB Crash/reload
Nokia C21 Plus Android 12 2+2 GB Loads 1 or 2 planes, then crashes
Infinix Note Android 13 8+5 GB Works fine, sometimes it crashes
Laptop/Desktop Win/Linux 8+ GB Always works

I also tested on a Redmi Tablet and it works perfectly fine.

Browsers tested:

- Safari iOS
- Chrome Android
- Firefox Android
- Chrome Desktop (works fine even in mobile emulation mode)
- Firefox Desktop (works fine even in mobile emulation mode)

I suspect that mobile GPU capabilities or WebGL 2.0 handling in real mobile hardware may be the cause, but this used to work fine in the past, and now fails even with clean installs.
Reply all
Reply to author
Forward
0 new messages