asciidocfx / AsciidocFX

Asciidoc Editor and Toolchain written with JavaFX 21 (Build PDF, Epub, Mobi and HTML books, documents and slides)
http://www.asciidocfx.com/
Apache License 2.0
1.89k stars 297 forks source link

AsciidocFX UI does not start any more (but process is running) #482

Open matthiasbasler opened 4 years ago

matthiasbasler commented 4 years ago

I've been using AsciiDoc FX with built-in JRE on Windows 10 (1909, currently build 18363.959) for quite some time, lately version 1.7.1. It worked until today when the application simple wouldn't show anything any more when launched - no window, no taskbar icon either. (So this is likely not the same issue as a similar bug where at least a taskbar icon would show up.) However I can see the process "AsciidocFX.exe" in the "Details" view of the Windows task manager, being idle. One time it also showed as "Background process" in the "Process" tab there, but typically it is not to be found there.

I'm not short of RAM, disk space or anything like that. I already tried

All this didn't make a difference. I am not aware of anything other significant changing since it worked one or two days ago.

Is there a way to start AsciidocFX in the console in order to check for error messages? Or a log file?

matthiasbasler commented 4 years ago

It does start up its UI when run "as administrator". But it doesn't show its UI if I start it normally again, afterwards. Huh?

matthiasbasler commented 4 years ago

I found the cause (?) of the issue: The Windows PATH variable contains the bin directory of my AdoptOpenJDK 8 bin directory like this: ...;C:\Program Files\AdoptOpenJDK\jdk-8.0.242.08-hotspot\bin Obviously this AdoptOpenJDK version was being used by AsciidocFX and obviously it is not compatible.

Strange thing is, this must have worked before, because if I remove this JDK from the path AsciidocFX does work, but now other applications don't find Java any more. I'm puzzled.

Update: For a test I added the path to the AdoptOpenJDK (the JRE this time) to the PATH again, removed the JAVA_HOME variable -> worked. Then I added the JAVA_HOME variable again -> worked too.

So I now have the initial situation again, but AsciidocFX starts up nicely again. What should I think of this???

rahmanusta commented 4 years ago

Does AsciidocFX start if you don't remove its internal JDK? Actually you don't need to remove it since AsciidocFX uses OpenJDK.

matthiasbasler commented 4 years ago

I did not remove its internal JDK, I did not even think about it. Actually am happy with AsciiDocFX using it. All I said is I removed an entry pointing to an JDK (one I had installed myself some time ago) from the windows path variable.

Adding a JAVA_HOME environment variable (for some other software) seemed to have broken the application for me. But as I wrote above: It now works again, even with the variable. I don't know what made the difference but it is fine now.

matthiasbasler commented 4 years ago

Same issue again this morning:

Also starting AsciidocFX from within Eclipse by double-clicking an .adoc file does work only if Eclipse was started when the JAVA_HOME variable was not set (not pointing to the AdoptOpenJDK folder).

I searched the web to find out exactly what rules Asciidoc FX uses to determine the JDK/JRE to use, but could not find such documentation.

rahmanusta commented 3 years ago

New release is available https://github.com/asciidocfx/AsciidocFX/releases/tag/v1.7.4 Please check if that fix your issue.

matthiasbasler commented 3 years ago

Hi, unfortunately v1.7.4 does not solve the issue. I have, for the time being, circumvented the issue by defining in the application's Windows compatibility settings that it must always run as admin. This way the application starts normally. If I run it without admin privileges, the UI never comes up.