Helioviewer-Project / JHelioviewer-SWHV

Space Weather JHelioviewer ☉
https://swhv.oma.be
Mozilla Public License 2.0
49 stars 16 forks source link

All layers disappear when moving window to another screen #255

Open ebuchlin opened 1 year ago

ebuchlin commented 1 year ago

When moving a JHelioViewer window from a screen to another screen, all layers (including grid, FOV, PFSS... and open observation layers) disappear. It is then possible to add again an observation layer, but grid, FOV, PFSS... are lost forever. Nothing should disappear in the first place.

See attached screencast

System and JHV versions:

bogdanni commented 1 year ago

I'm doing that for years in macOS, even between different pixel scaling displays (2x <-> 1x). The fact the all layers are removed is very strange, could you please see if you can find something in Help->Show Log?

ebuchlin commented 1 year ago

I've had the issue for a long time but didn't have time or sufficient elements to report.

Here is the difference in logs between before and after:

2023-10-21 17:41:11.337 [AWT-EventQueue-0] SEVERE  org.helioviewer.jhv.opengl.GLInfo.checkGLErrors - GL Error (1281): invalid value - @GLListener.dispose()
2023-10-21 17:41:11.480 [AWT-EventQueue-0] INFO  org.helioviewer.jhv.opengl.GLInfo.get - OpenGL 4.6 (Core Profile) Mesa 23.0.4-0ubuntu1~23.04.1
bogdanni commented 1 year ago

Right, there's a catastrophic OpenGL error which kills all layers (1st line). The canvas is reconfigured with a new OpenGL context (2nd line).

Even if it was possible to restore the layers, I have doubts that the image in the canvas can be reconstituted since the original context is lost.

Here's hoping that this bug is fixed in the underlying software (windowing system, Mesa, and/or JOGL).

ebuchlin commented 8 months ago

Temporary workaround: I can define the screen where I want JHV to appear as "primary screen". JHV will then open on that primary screen.