dmolony/DiskBrowser

Diskbrowser.jar stopped launching

Closed this issue · 10 comments

Setup: macOS 10.13.6, JRE 10.0.2 installed.

I installed the JRE last night and was able to launch DiskBrower.jar fine. Shut down my Mac for the night. Restarted today and now the app no longer launches.

Here's what I think is the relevant Terminal output, if that helps:

ThunderTouch:~ boliver$ /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -jar /Users/boliver/Downloads/DiskBrowser.jar 
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at java.desktop/java.awt.Window.init(Unknown Source)
	at java.desktop/java.awt.Window.<init>(Unknown Source)
	at java.desktop/java.awt.Frame.<init>(Unknown Source)
	at java.desktop/javax.swing.JFrame.<init>(Unknown Source)
	at com.bytezone.diskbrowser.gui.DiskBrowser.<init>(DiskBrowser.java:27)
	at com.bytezone.diskbrowser.gui.DiskBrowser$2.run(DiskBrowser.java:211)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue.access$600(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
ThunderTouch:~ boliver$ /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

Java is not my strong suit, so I'm unsure how to further diagnose this. I will say that "/usr/bin/java -version" reports Java 8, but I think that's to be expected?

I do have the Java 8 runtime installed, yes. Possibly even the JDK for 8, although I'm less clear on that.

I only installed the JRE for Java 10, not the JDK. Maybe this is part of the problem?

Following on from that:

ThunderTouch:~ boliver$ setjdk10                                                                                                                                                                    
Unable to find any JVMs matching version "10".
ThunderTouch:~ boliver$ setjdk8
ThunderTouch:~ boliver$ 

As for running the app, I launched it via the Finder initially, by double-clicking on the jar. That failed until I installed the JRE v10 runtime, then it worked. Today, however, it always fails - it just silently quits. That's when I got the bright idea to try to launch it manually in the terminal, which is what you see in my first post.

I then tried to launch it with /usr/bin/java and got the same runtime error as you posted about the runtime mismatch. /usr/bin/java -version tells me it's 1.8, so the failure is not surprising.

Again, I'm pretty unfamiliar with Java so it's unclear to me if I need to also install the Java 10 JDK or uninstall Java 8 or what. I'll take a stab at installing the v10 JDK and see where that gets me. Maybe I'll figure out what older app caused me to install Java 8 in the process. ;-)

Thanks again for the help.

OK, installed the v10 JDK. The bad news: no change. Here's how it shakes out:

ThunderTouch:~ boliver$ which java
/usr/bin/java
ThunderTouch:~ boliver$ setjdk10
ThunderTouch:~ boliver$ java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
ThunderTouch:~ boliver$ java -jar /Users/boliver/Downloads/DiskBrowser.jar 
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at java.desktop/java.awt.Window.init(Window.java:509)
	at java.desktop/java.awt.Window.<init>(Window.java:549)
	at java.desktop/java.awt.Frame.<init>(Frame.java:423)
	at java.desktop/javax.swing.JFrame.<init>(JFrame.java:224)
	at com.bytezone.diskbrowser.gui.DiskBrowser.<init>(DiskBrowser.java:27)
	at com.bytezone.diskbrowser.gui.DiskBrowser$2.run(DiskBrowser.java:211)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
	at java.desktop/java.awt.EventQueue.access$600(EventQueue.java:97)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

I'll keep poking at this as time permits. That it would stop working after a shutdown/restart is weird, so maybe if I restart again, it'll start working? ;)

That it would stop working after a shutdown/restart is weird, so maybe if I restart again, it'll start working?

Unbelievably, I restarted macOS and it now launches again. When I retire, there will be no computers allowed in the cave.

Thanks again for the help. I'll close this although I can't say the solution is particularly satisfying. Feel free to reopen if you want to continue to track this.

I will let you know tomorrow but I sure hope not. It would be amusing though.

There is one possibility at play: yesterday, I set DiskBrower's "HOME" directory, and it's a network-mounted share. When I launched DiskBrowser after restart #2 today, I forgot to mount the drive first (oops!) and it fired right up and asked me to choose a HOME directory, as if it'd never been set. It could be entirely unrelated, but if it happens again, I'll pay closer attention to the state of the mounted share.

Ok, ran tests today.

First launch from cold power-off: not working
Restart: working
Restart after unrelated kernel panic: not working
Restart again: working
Restart again: working

Maybe the v10 JRE is buggy in certain scenarios, maybe there's some quirk to my setup, maybe all of the above. If you can suggest a more exhaustive way to diagnose, I'm game but I'm also content to chalk this up to "Java+macOS+my setup" being unorthodox in some hard-to-determine way.