Helioviewer-Project / JHelioviewer-SWHV

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

JHelioviewer not responding #207

Open AvijeetPrasad opened 2 years ago

AvijeetPrasad commented 2 years ago

Hi,

I just downloaded the JHelioviewer_4_3_2.dmg. After installation, when I try to run, it just opens a window, tries to load and then just stops responding.

My system details are as follows: OS: macOS Monterey 12.2.1 Graphics: Intel

bogdanni commented 2 years ago

Did you ever run it before on this computer? Do you see it in Activity Monitor?

You could try to launch it from command line to see if anything relevant gets logged. Assuming the app is in the home directory, the command is:

$ $HOME/JHelioviewer.app/Contents/Resources/jre.bundle/Contents/Home/bin/java --add-exports java.desktop/sun.awt=ALL-UNNAMED -cp $HOME/JHelioviewer.app/Contents/Resources/app/classes/JHelioviewer.jar:$HOME/JHelioviewer.app/Contents/Resources/app/classes/natives-macos.jar org.helioviewer.jhv.JHelioviewer
AvijeetPrasad commented 2 years ago

Hi,

Thanks for your reply. I have not run JHelioviewer recently. Not sure if it was working on this system before.

I ran the app from the command line, and I am finding similar behavior with the application not responding. It also shows up in the activity monitor as not responding. The following are the messages printed on the terminal:

$ /Applications/JHelioviewer.app/Contents/Resources/jre.bundle/Contents/Home/bin/java --add-exports java.desktop/sun.awt=ALL-UNNAMED -cp /Applications/JHelioviewer.app/Contents/Resources/app/classes/JHelioviewer.jar:/Applications/JHelioviewer.app/Contents/Resources/app/classes/natives-macos.jar org.helioviewer.jhv.JHelioviewer
2022-05-25 13:44:10.155 [main] INFO  org.helioviewer.jhv.JHelioviewer.main - JHelioviewer started with command-line options:
2022-05-25 13:44:10.174 [main] INFO  org.helioviewer.jhv.JHVGlobals.getVersion - JHV/SWHV-4.3.2.10674 (x86_64 Mac OS X 12.2.1) Eclipse Adoptium JRE 17.0.2 16.0GB 12CPU
2022-05-25 13:44:12.044 [AWT-EventQueue-0] INFO  org.helioviewer.jhv.JHelioviewer.lambda$main$0 - Start main window
2022-05-25 13:44:13.819 [AWT-EventQueue-0] INFO  org.helioviewer.jhv.JHelioviewer.lambda$main$0 - Load bundled plugins
2022-05-25 13:44:14.043 [AWT-EventQueue-0] SEVERE  org.helioviewer.jhv.plugins.swek.SWEKConfig.parseGroups: Cannot invoke "org.helioviewer.jhv.events.SWEK$Source.name()" because "this.source" is null
bogdanni commented 2 years ago

So it locks trying to detect OpenGL, the next log line should be like:

2022-05-25 11:36:20.146 [AWT-EventQueue-0] INFO  org.helioviewer.jhv.opengl.GLInfo.get - OpenGL 4.1 ATI-4.8.54

(ATI in my case)

The computer seems a bit unusual, Java detected 6 cores/12 threads, what model is it, a Mac Pro?

AvijeetPrasad commented 2 years ago

For me, the system was stuck at the last line in the previous message.

I am working on a Mac mini. The following are the system details

bogdanni commented 2 years ago

Ah, that explains the 12CPU...

I'm afraid I cannot do much without physical access to the computer, I suspect the OpenGL binding library (JOGL) locks up while trying to detect the video card/driver. Sorry.

AvijeetPrasad commented 2 years ago

Thanks for checking. Any suggestions on what I can try out myself?

bogdanni commented 2 years ago

It's a bit complicated:

Double click in Finder to extract those, assume they are in ~/Downloads, then:

$ cd ~/Downloads/jogl-demos-2.4-20210112-linux-amd64/jar
$ cp ../../gluegen-2.4-b938-20210111-macosx-universal/jar/*.jar .
$ cp ../../jogl-2.4-b1507-20210111-macosx-universal/jar/* .
$ /Applications/JHelioviewer.app/Contents/Resources/jre.bundle/Contents/Home/bin/java --add-exports java.desktop/sun.awt=ALL-UNNAMED -cp gluegen-rt.jar:gluegen-rt-natives-macosx-universal.jar:jogl-all.jar:jogl-all-natives-macosx-universal.jar:jogl-demos.jar demos.gears.Gears

The famous gears should run now and in the terminal there should be some information about the OpenGL driver, something like this (that's my computer):

INIT GL IS: jogamp.opengl.gl4.GL4bcImpl
GL_VENDOR: ATI Technologies Inc.
GL_RENDERER: AMD Radeon Pro 5500M OpenGL Engine
GL_VERSION: 2.1 ATI-4.8.54

This is OpenGL 2.1 and JHV needs 3.3, but it's a start.

AvijeetPrasad commented 2 years ago

Thanks for the info. I'll check these :)

bogdanni commented 2 years ago

As simpler action could be to add -Djogl.debug=all just before --add-exports in the command you ran in https://github.com/Helioviewer-Project/JHelioviewer-SWHV/issues/207#issuecomment-1137143120

It will produce many pages of text, on my computer the last few lines being:

NSOpenGLLayer.Attach: OK, layer 0x7f7fd07fabd0 w/ pbuffer 0x0, texID 1, texSize 4202x2426, drawableHandle 0x7f7fe12ca680 - AppKit Thread
GLDrawableHelper GLAnimatorControl: null, GLEventListeners num 1 [org.helioviewer.jhv.opengl.GLListener@1b6c97cb[init false], ].invokeGL(): Running initAction
2022-05-25 15:43:41.923 [AWT-EventQueue-0] INFO  org.helioviewer.jhv.opengl.GLInfo.get - OpenGL 4.1 ATI-4.8.54 <-- coming from JHV
AWT-EventQueue-0: Reshape: 4202x2426
AvijeetPrasad commented 2 years ago

Thanks, with the -Djogl.debug=all option, it is able to go few more steps forward, but it again gets stuck in the following step

MaxOSXCGLContext.NSOpenGLImpl.associateDrawable: true, ctx 0x6000037d81c0, hasBackingLayerHost true, attachGLLayerCmd null
MaxOSXCGLContext.NSOpenGLImpl.associateDrawable(true).calayer: AttachGLLayerCmd[done false, size tex[5098x2912], win[2549x1456], ctx 0x6000037d81c0, opaque true, texID 1, pbuffer 0x0, nsOpenGLLayer 0x0]
MaxOSXCGLContext.NSOpenGLImpl.contextMadeCurrent: Cure missing CGLContextLock (Bug1398), surfaceLock <4d18db38, 4f8da689>[count 1, qsz 0, owner <AWT-EventQueue-0>]
MaxOSXCGLContext.NSOpenGLImpl.contextMadeCurrent: Wait for SetNSViewCmd (Bug1398), surfaceLock <4d18db38, 4f8da689>[count 0, qsz 0, owner <NULL>]
bogdanni commented 2 years ago

You are probably hit by this: https://jogamp.org/bugzilla/show_bug.cgi?id=1398