Query Display Bug
Hypertext-infused philosophy personal database software
Brought to you by:
jasonwinning
If I close the only open query things get weird in the UI (picture attached). I can still click on the invisible buttons and navigate to other tabs (like "Works") at which point everything is normal except if I click the "Queries" tab in which case there's a pause and then it goes back to the weird screen. This is fixed if I execute a query (either via the Execute Query button or the Mentions button). It breaks again if I close the only open query.
I don't think I've ever seen that happen before, on any of the computers and platforms I've tested on. Are you able to reliably reproduce this, even after exiting and restarting the application? Are there any additional steps you have to do to see that behavior? What happens when I close the last remaining tab is that it is closed and replaced by a new tab; basically like clicking "Reset Fields" but clearing the results pane as well (in that way it is useful; otherwise I would just prevent the X from appearing on the last remaining tab).
When you see that behavior, I suspect you can also fix it by just resizing the main window. There are some JavaFX bugs I've had to find various workarounds for over the years that have to do with refreshing parts of the window; this is probably another case of that. But I've never seen it cause the main tabs and bottom row buttons disappear before.
I can reliably reproduce it, yes. Usually it happens when I close the last open query but sometimes it happens when I do that and then click away to another tab and then click back on the Queries tab.
In reproducing it I've found that the more times I trigger the bug the longer it takes to load the Queries tab when I've clicked on another tab while there is no open query. After I clicked back and forth about 6 times, the program was hanging for about 12 seconds before loading the Queries tab with the UI bug. Restarting the program doesn't seem to have reduced the time so I think I'm going to stop reproducing it!
Resizing the main window seems to fix it sometimes but not always.
I'm guessing you're on Windows 11 (not sure if that makes a difference).
Try this.
1) Open Hypernomicon, then go to File -> Close Database.
2) File -> New Database, and create a new, empty database.
3) Close Hypernomicon, then restart your computer.
4) After your computer restarts, don't open any other application or browser, just start Hypernomicon with the new empty database.
5) Now try reproducing the bug.
This will rule out anything to do with your database in particular or other applications interfering somehow.
That's really weird about it hanging for a successively longer time (if I understood correctly); never seen anything like that either. That makes me think this could be related to this bug:
https://sourceforge.net/p/hypernomicon/tickets/73/
I think I may have a solution for this. Though, I still have not been able to reproduce it myself, so it is a hunch.
Try running Hypernomicon from the command line. You will need to have java version 17 or greater, either JRE or JDK, installed. Then open a command window (window key + R, cmd.exe) and change to the Hypernomicon installation directory (e.g., "cd C:\Program Files\Hypernomicon").
Then do this command:
java -Dprism.dirtyopts=false -jar Hypernomicon.jar
which should run Hypernomicon in a separate window. Then try reproducing the bug.
If that doesn't fix it try this:
java -Dprism.dirtyopts=false -Dprism.forcerepaint=true -jar Hypernomicon.jar
See attached screenshot.
If one of those works, I can just have the released version always run with the options(s) set.
Unfortunately I have still been totally unable to reproduce what you saw, but I have seen other occasions where toolbar buttons and things like that would temporarily disappear and then reappear if I interact with the controls. I'm pretty confident that this is due to certain repaint optimizations in JavaFX that are known to have bugs, and the options I mentioned previously is generally the recommended fix for those. I have been using those options lately (dirtyopts=false and forcerepaint=true) and since then, I haven't seen this kind of issue at all.
These options are not set by default because they supposedly can impact visual performance, but I have not personally seen that (of course, Hypernomicon isn't a 3D shooter; reduced framerate for its "visual effects" are not likely to be terribly disruptive). So I am going to make it so that in the next version, these options are set whenever you run the application. On the assumption that this fixes the issue, I will close this ticket.
If you continue to see the issue in the next version (1.31.1) or later, please reopen this ticket.