apposed / jaunch

Launch Programs 𝙔𝙤𝙪𝙧 Way! 🍔
The Unlicense
11 stars 2 forks source link

Fiji crashes after applying updates #55

Closed hinerm closed 1 month ago

hinerm commented 1 month ago

To reproduce:

  1. start a fresh Fiji
  2. turn on SciJava Ops update site to get Jaunch
  3. close Fiji
  4. Start with the fiji-xxx launcher

On second launch, everything is fine.

This could be because of https://github.com/apposed/jaunch/issues/47 but what's odd to me is that we have always shipped an updated imagej-launcher.jar and this wasn't a problem in the past (and all the other .jars on the update site worked on first launch, e.g. could use SJOps in the script editor)

Debug output from initial jaunch launch:

[DEBUG] Input arguments processed:
[DEBUG] * hints -> [OS:WINDOWS, ARCH:X64, --debug]
[DEBUG] * vars -> {app-dir=C:\Users\hiner\Desktop\Fiji.app, config-dir=C:\Users\hiner\Desktop\Fiji.app\config\jaunch, executable=C:\Users\hiner\Desktop\Fiji.app\fiji-windows-x64.exe}
[DEBUG] * userArgs.runtime -> []
[DEBUG] * userArgs.main -> []
[DEBUG] * userArgs.ambiguous -> []
[DEBUG]
[DEBUG] Modes applied:
[DEBUG] * hints -> [OS:WINDOWS, ARCH:X64, --debug, LAUNCH:JVM]
[DEBUG]
[DEBUG] /--------------------------\
[DEBUG] | CONFIGURING RUNTIME: JVM |
[DEBUG] \--------------------------/
[DEBUG]
[DEBUG] Root paths to search for Java:
[DEBUG] * C:\Program Files\Amazon Corretto\jdk1.8.0_252
[DEBUG] * C:\Users\hiner\Desktop\Fiji.app\java\win64\jre1.8.0_172_complete
[DEBUG] * C:\Program Files\Java\jdk1.8.0_251
[DEBUG] * C:\Program Files\Java\jre1.8.0_351
[DEBUG] * C:\Program Files (x86)\Java\jdk1.8.0_251
[DEBUG] * C:\Program Files (x86)\Java\jre1.8.0_351
[DEBUG]
[DEBUG] Suffixes to check for libjvm:
[DEBUG] * bin\server\jvm.dll
[DEBUG] * bin\client\jvm.dll
[DEBUG] * jre\bin\server\jvm.dll
[DEBUG] * jre\bin\client\jvm.dll
[DEBUG] * bin\server\jvm.dll
[DEBUG] * bin\client\jvm.dll
[DEBUG] * jre\bin\server\jvm.dll
[DEBUG] * jre\bin\client\jvm.dll
[DEBUG] * bin\server\jvm.dll
[DEBUG] * bin\client\jvm.dll
[DEBUG] * jre\bin\server\jvm.dll
[DEBUG] * jre\bin\client\jvm.dll
[DEBUG]
[DEBUG] Discovering Java installations...
[DEBUG] Analyzing candidate JVM directory: 'C:\Program Files\Amazon Corretto\jdk1.8.0_252'
[DEBUG] Guessing OS name...
[DEBUG] Reading release file...
[DEBUG] -> OS name: WINDOWS
[DEBUG] Guessing CPU architecture...
[DEBUG] -> CPU architecture: X64
[DEBUG] Guessing Java version...
[DEBUG] * rootString -> jdk1.8.0_252
[DEBUG] * versions8u -> []
[DEBUG] * versionsPrefixed -> [1.8.0_252]
[DEBUG] -> Java version: 1.8.0_252
[DEBUG] Successfully discovered Java installation:
[DEBUG] * rootPath -> C:\Program Files\Amazon Corretto\jdk1.8.0_252
[DEBUG] * libjvmPath -> C:\Program Files\Amazon Corretto\jdk1.8.0_252\jre\bin\server\jvm.dll
[DEBUG] * binJava -> C:\Program Files\Amazon Corretto\jdk1.8.0_252\bin\java.exe
[DEBUG] * hints -> [OS:WINDOWS, ARCH:X64, --debug, LAUNCH:JVM, JAVA:8, JAVA:0+, JAVA:1+, JAVA:2+, JAVA:3+, JAVA:4+, JAVA:5+, JAVA:6+, JAVA:7+, JAVA:8+]
[DEBUG]
[DEBUG] Classpath to calculate:
[DEBUG] * C:\Users\hiner\Desktop\Fiji.app/jars/imagej-launcher*.jar
[DEBUG]
[DEBUG] Classpath calculated:
[DEBUG] * C:\Users\hiner\Desktop\Fiji.app\jars\imagej-launcher-6.0.2.jar
[DEBUG]
[DEBUG] JVM arguments calculated:
[DEBUG] * -Dij.debug=true
[DEBUG] * -Dscijava.log.level=debug
[DEBUG] * -XX:+UseG1GC
[DEBUG] * -Dpython.cachedir.skip=true
[DEBUG] * -Dplugins.dir=C:\Users\hiner\Desktop\Fiji.app
[DEBUG] * -Dimagej.splash=true
[DEBUG] * -Dimagej.dir=C:\Users\hiner\Desktop\Fiji.app
[DEBUG] * -Dij.dir=C:\Users\hiner\Desktop\Fiji.app
[DEBUG] * -Dfiji.dir=C:\Users\hiner\Desktop\Fiji.app
[DEBUG] * -Dfiji.executable=C:\Users\hiner\Desktop\Fiji.app\fiji-windows-x64.exe
[DEBUG] * -Dij.executable=C:\Users\hiner\Desktop\Fiji.app\fiji-windows-x64.exe
[DEBUG] * -Djava.library.path=C:\Users\hiner\Desktop\Fiji.app\lib\win64
[DEBUG] * -Dscijava.context.strict=false
[DEBUG] * -Dpython.console.encoding=UTF-8
[DEBUG] Added classpath arg: -Djava.class.path=C:\Users\hiner\Desktop\Fiji.app\jars\imagej-launcher-6.0.2.jar
[DEBUG]
[DEBUG] Calculating max heap (75%)...
[DEBUG] System reported memTotal of 25616617472
[DEBUG] Added maxHeap arg: -Xmx17g
[DEBUG]
[DEBUG] Calculating main class name...
[DEBUG] mainProgram -> net.imagej.launcher.ClassLauncher
[DEBUG]
[DEBUG] Main arguments calculated:
[DEBUG] * -ijjarpath
[DEBUG] * jars
[DEBUG] * -ijjarpath
[DEBUG] * plugins
[DEBUG] * net.imagej.Main
[DEBUG]
[DEBUG] /-----------------------------\
[DEBUG] | CONFIGURING RUNTIME: PYTHON |
[DEBUG] \-----------------------------/
[DEBUG]
[DEBUG] Root paths to search for Python:
[DEBUG] * C:\Users\hiner\AppData\Local\Programs\Python\Python310
[DEBUG] * C:\Users\hiner\AppData\Local\Programs\Python\Python38
[DEBUG] * C:\Users\hiner\AppData\Local\Programs\Python\Python39
[DEBUG]
[DEBUG] Suffixes to check for libpython:
[DEBUG] * python313.dll
[DEBUG] * python312.dll
[DEBUG] * python311.dll
[DEBUG] * python310.dll
[DEBUG] * python39.dll
[DEBUG] * python38.dll
[DEBUG] * python3.dll
[DEBUG] * lib\python313.dll
[DEBUG] * lib\python312.dll
[DEBUG] * lib\python311.dll
[DEBUG] * lib\python310.dll
[DEBUG] * lib\python39.dll
[DEBUG] * lib\python38.dll
[DEBUG] * lib\python3.dll
[DEBUG]
[DEBUG] Discovering Python installations...
[DEBUG] Analyzing candidate Python directory: 'C:\Users\hiner\AppData\Local\Programs\Python\Python310'
[DEBUG] Guessing Python version...
[DEBUG] Invoking `"C:\Users\hiner\AppData\Local\Programs\Python\Python310\python.exe" --version`...
[DEBUG] -> Python version: 3.10.7
[DEBUG] Successfully discovered Python installation:
[DEBUG] * rootPath -> C:\Users\hiner\AppData\Local\Programs\Python\Python310
[DEBUG] * libPythonPath -> C:\Users\hiner\AppData\Local\Programs\Python\Python310\python310.dll
[DEBUG] * binPython -> C:\Users\hiner\AppData\Local\Programs\Python\Python310\python.exe
[DEBUG] * hints -> [OS:WINDOWS, ARCH:X64, --debug, LAUNCH:JVM, JAVA:8, JAVA:0+, JAVA:1+, JAVA:2+, JAVA:3+, JAVA:4+, JAVA:5+, JAVA:6+, JAVA:7+, JAVA:8+, PYTHON:3.10, PYTHON:3.0+, PYTHON:3.1+, PYTHON:3.2+, PYTHON:3.3+, PYTHON:3.4+, PYTHON:3.5+, PYTHON:3.6+, PYTHON:3.7+, PYTHON:3.8+, PYTHON:3.9+, PYTHON:3.10+]
[DEBUG]
[DEBUG] Python arguments calculated:
[DEBUG] <empty>
[DEBUG]
[DEBUG] Calculating main script path...
[DEBUG] mainProgram -> fiji.py
[DEBUG]
[DEBUG] Main arguments calculated:
[DEBUG] * ${jvm.libjvmPath}
[DEBUG] * @{jvm.runtimeArgs}
[DEBUG] * --
[DEBUG] * ${jvm.mainClass}
[DEBUG] * @{jvm.mainArgs}
[DEBUG]
[DEBUG] /------------------------\
[DEBUG] | CALCULATING DIRECTIVES |
[DEBUG] \------------------------/
[DEBUG]
[DEBUG] Directives parsed:
[DEBUG] * directives -> [apply-update, INIT_THREADS, JVM]
[DEBUG] * launchDirectives -> [INIT_THREADS, JVM]
[DEBUG] * configDirectives -> [apply-update]
[DEBUG]
[DEBUG] /-------------------------\
[DEBUG] | BUILDING ARGUMENT LISTS |
[DEBUG] \-------------------------/
[DEBUG]
[DEBUG] Validating user arguments...
[DEBUG] Contextualizing user arguments...
[DEBUG] * jvm:runtime -> [-Dij.debug=true, -Dscijava.log.level=debug, -XX:+UseG1GC, -Dpython.cachedir.skip=true, -Dplugins.dir=C:\Users\hiner\Desktop\Fiji.app, -Dimagej.splash=true, -Dimagej.dir=C:\Users\hiner\Desktop\Fiji.app, -Dij.dir=C:\Users\hiner\Desktop\Fiji.app, -Dfiji.dir=C:\Users\hiner\Desktop\Fiji.app, -Dfiji.executable=C:\Users\hiner\Desktop\Fiji.app\fiji-windows-x64.exe, -Dij.executable=C:\Users\hiner\Desktop\Fiji.app\fiji-windows-x64.exe, -Djava.library.path=C:\Users\hiner\Desktop\Fiji.app\lib\win64, -Dscijava.context.strict=false, -Dpython.console.encoding=UTF-8, -Djava.class.path=C:\Users\hiner\Desktop\Fiji.app\jars\imagej-launcher-6.0.2.jar, -Xmx17g]
[DEBUG] * jvm:main -> [-ijjarpath, jars, -ijjarpath, plugins, net.imagej.Main]
[DEBUG] * python:runtime -> []
[DEBUG] * python:main -> [${jvm.libjvmPath}, @{jvm.runtimeArgs}, --, ${jvm.mainClass}, @{jvm.mainArgs}]
[DEBUG] Guessing Java distribution...
[DEBUG] Invoking `"C:\Program Files\Amazon Corretto\jdk1.8.0_252\bin\java.exe" Props`...
[DEBUG] -> Java distribution: Amazon Corretto
[DEBUG]
[DEBUG] /----------------------\
[DEBUG] | EXECUTING DIRECTIVES |
[DEBUG] \----------------------/
[DEBUG]
[DEBUG] Executing configurator-side directives...
[DEBUG] + mkdir 'C:\Users\hiner\Desktop\Fiji.app\config'
[DEBUG] + mkdir 'C:\Users\hiner\Desktop\Fiji.app\config\jaunch'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\config\jaunch\fiji.py' 'C:\Users\hiner\Desktop\Fiji.app\config\jaunch\fiji.py'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\config\jaunch\fiji.txt' 'C:\Users\hiner\Desktop\Fiji.app\config\jaunch\fiji.txt'
[DEBUG] + mkdir 'C:\Users\hiner\Desktop\Fiji.app\jars'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\apiguardian-api-1.1.2.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\apiguardian-api-1.1.2.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\flimlib-2.1.1.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\flimlib-2.1.1.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\jars\imagej-launcher-6.0.2.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\update\jars\imagej-launcher-6.0.2.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\imagej-launcher-6.0.3-SNAPSHOT.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\imagej-launcher-6.0.3-SNAPSHOT.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\imagej-opencv-0.1.3.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\imagej-opencv-0.1.3.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\jars\imagej-ui-swing-1.0.1.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\update\jars\imagej-ui-swing-1.0.1.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\imagej-ui-swing-1.0.2-SNAPSHOT.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\imagej-ui-swing-1.0.2-SNAPSHOT.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\jars\imagej-updater-1.0.1.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\update\jars\imagej-updater-1.0.1.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\imagej-updater-1.0.2-SNAPSHOT.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\imagej-updater-1.0.2-SNAPSHOT.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\jars\imglib2-6.1.0.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\update\jars\imglib2-6.1.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\imglib2-6.2.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\imglib2-6.2.0.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\jars\imglib2-algorithm-0.13.2.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\update\jars\imglib2-algorithm-0.13.2.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\imglib2-algorithm-0.14.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\imglib2-algorithm-0.14.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\imglib2-mesh-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\imglib2-mesh-1.0.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\json-simple-1.1.1.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\json-simple-1.1.1.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\nashorn-core-15.4.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\nashorn-core-15.4.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\openblas-0.3.21-1.5.8.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\openblas-0.3.21-1.5.8.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\opencv-4.6.0-1.5.8.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\opencv-4.6.0-1.5.8.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-collections-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-collections-1.0.0.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-common-2.94.2.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-common-2.94.2.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-common-2.99.0-SNAPSHOT.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-common-2.99.0-SNAPSHOT.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-common3-1.0.1-SNAPSHOT.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-common3-1.0.1-SNAPSHOT.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-concurrent-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-concurrent-1.0.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-discovery-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-discovery-1.0.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-function-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-function-1.0.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-legacy-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-legacy-1.0.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-meta-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-meta-1.0.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-ops-api-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-ops-api-1.0.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-ops-engine-1.0.1-SNAPSHOT.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-ops-engine-1.0.1-SNAPSHOT.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-ops-flim-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-ops-flim-1.0.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-ops-image-1.0.1-SNAPSHOT.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-ops-image-1.0.1-SNAPSHOT.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-ops-opencv-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-ops-opencv-1.0.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-ops-spi-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-ops-spi-1.0.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-priority-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-priority-1.0.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-progress-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-progress-1.0.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-struct-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-struct-1.0.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\scijava-types-1.0.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\scijava-types-1.0.0.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\jars\snakeyaml-1.33.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\update\jars\snakeyaml-1.33.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\snakeyaml-2.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\snakeyaml-2.0.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\therapi-runtime-javadoc-0.12.0.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\therapi-runtime-javadoc-0.12.0.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\jars\ui-behaviour-2.0.7.jar'
[DEBUG] + rm 'C:\Users\hiner\Desktop\Fiji.app\update\jars\ui-behaviour-2.0.7.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\ui-behaviour-2.0.8.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\ui-behaviour-2.0.8.jar'
[DEBUG] + mkdir 'C:\Users\hiner\Desktop\Fiji.app\jars\win64'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\win64\flimlib-2.1.1-natives-windows_64.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\win64\flimlib-2.1.1-natives-windows_64.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\win64\openblas-0.3.21-1.5.8-windows-x86_64.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\win64\openblas-0.3.21-1.5.8-windows-x86_64.jar'
[DEBUG] + mv 'C:\Users\hiner\Desktop\Fiji.app\update\jars\win64\opencv-4.6.0-1.5.8-windows-x86_64.jar' 'C:\Users\hiner\Desktop\Fiji.app\jars\win64\opencv-4.6.0-1.5.8-windows-x86_64.jar'
[DEBUG]
[DEBUG] Emitting launch directives to stdout...
run_command: closed jaunch stdout pipe
[JAUNCH-JVM] libjvm_path = C:\Program Files\Amazon Corretto\jdk1.8.0_252\jre\bin\server\jvm.dll
[JAUNCH-JVM] main_class_name = net/imagej/launcher/ClassLauncher
[JAUNCH-JVM] LOADING LIBJVM
[JAUNCH-JVM] LOADING JNI_CreateJavaVM
[JAUNCH-JVM] POPULATING VM OPTIONS
[JAUNCH-JVM] POPULATING VM INIT ARGS
[JAUNCH-JVM] CREATING JVM
[JAUNCH-JVM] FINDING MAIN CLASS
Error finding class net/imagej/launcher/ClassLauncher
ctrueden commented 1 month ago

what's odd to me is that we have always shipped an updated imagej-launcher.jar and this wasn't a problem in the past

I cannot imagine that this ever worked using the exact workflow you described, as long as it was Jaunch responsible for moving the files of the Fiji.app/update folder into place and then immediately launching; #47 has always been a limitation of Jaunch since you first implemented the logic in #46.

Two theories come to mind:

  1. Are we totally certain that this really worked in the past? I.e. that after enabling the SciJava Ops update site, then immediately running the Jaunch launcher once, it successsfully started up? I'd be surprised. At some point, weren't we running the classic ImageJ Launcher one more time to move the updates into place, and only then quitting Fiji and restarting with Jaunch with no pending Fiji.app/update folder? And/or: maybe when we initially tested it, and running with jaunch didn't work, we just clicked it again, thinking we might not have double-clicked correctly? Could it be that simple?

  2. I haven't looked closely in a long time, but my vague memory is that the classic Launcher might not always need to store pending updates into a Fiji.app/update folder, depending on the platform? Are we certain that enabling the SciJava Ops update site via the ImageJ Updater created a Fiji.app/update folder handled by Jaunch? I.e. are there cases (e.g. on non-Windows platforms) where it is simply able to move the new files directly into place during the same update operation?

In any case, regardless of the reason, the fix is the same: solve #47 somehow.

hinerm commented 1 month ago

Are we totally certain that this really worked in the past? I.e. that after enabling the SciJava Ops update site, then immediately running the Jaunch launcher once, it successfully started up?

we have always shipped an updated imagej-launcher.jar

I was wrong - I was thinking of the Java update logic, but that's in imagej-ui-swing. This likely worked in June when we submitted because imagej-launcher wasn't modified at that point. It probably broke in July when this PR was merged to try and fix focus.

But https://github.com/apposed/jaunch/issues/47 seems like it's missing something, because every jar except imagej-launcher seems to be picked up fine on the initial update launch.

For example, I can do the following:

  1. Start with a pristine Fiji
  2. Turn on SciJava Ops update site
  3. Close Fiji
  4. Go into the Fiji.app/update/jars directory and remove the two imagej-launcher entries. This will allow the Jaunch launcher to work on the first, update-application run.
  5. Also note that imagej-ui-swing has an update in the update/jars dir
  6. Run the Jaunch fiji-xxx launcher. This will apply the update and successfully launch Fiji.
  7. With Fiji open, run Help > Update... and we get the notice about updating Java.

This Java upgrade logic is only in the new imagej-ui-swing, which according to https://github.com/apposed/jaunch/issues/47 shouldn't be on the classpath until after another restart, right?

I'm not sure that this changes how we should approach https://github.com/apposed/jaunch/issues/47, but it feels like slightly different information.

ctrueden commented 1 month ago

Regarding Fiji still working when the imagej-ui-swing version changed and got updated in the same run: I'm guessing it's because the imagej-launcher.jar's ClassLoaderPlus is taking care of recursively adding all the JARs to the classpath. I.e. if you didn't run ./fiji-<platform> with the --full-classpath flag, then Jaunch's classpath computation does not matter. Or rather, it almost doesn't matter... it still matters for imagej-launcher.jar because that's the bootstrapping JAR, so when that JAR changes, it won't start.

I'm planning to remove the ClassLoaderPlus logic in favor of the --full-classpath behavior always, which will certainly break Fiji startup more nastily after updates are applied! :scream_cat: Until apposed/jaunch#47 is fixed, of course.