-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty Error setting field #1757
Comments
Thank you for your report. |
Same bug with the development version. Please try to save database repeatedly, because the bug is not always reproducible.. [{a is the only entry in title field. (I think the problem is, that two braces don't match, so two exeptions are thrown) |
I can reproduce it. You (or at least I) have to click on the save icon, pressing Ctrl+s doesn't trigger the crash. |
Interesting:
My guess is that this may be related to some old code where we catch more or less any exception and ignore it... |
I can also add that it doesn't seem related to any EDT issue (although there is one solved in #1725 that will be triggered later in the save process, but JabRef freezes before getting there). |
I looked a bit more intro this and what happens is that for ctrl+s the first dialog shows up and then is the save action not performed until "OK" is clicked. Then during the actual save, the next dialog shows. When pressing the toolbar button, the save action starts despite the first dialog not being confirmed. Then, after a while, a second dialog shows up and then it freeze. It seems related to the spin library somehow. Looking at BasePanel.runCommand() it is the following line that freezes the program: wrk.run(); // Runs the potentially time-consuming action
// without freezing the GUI. The magic is that THIS line
// of execution will not continue until run() is finished. probably because both dialogs are up at the same time (the first one cannot be clicked during debug). |
OK, I think I know what the problem is, but I do not really know how to solve it.
Any ideas how to solve it? |
AFAIK it's recommended to use for this cases methods or statements that are |
Fixed in #1863. |
For Ctrl-S and File > Save database the invalidBackgroundColor (red) is only flashing up for a short period of time. This is, because the FieldEditorFocusListener sets the ValidBackgroundColor (white) on focusLost. I think this is not necessary, because the EntryEditor sets the ValidBackgroundColor already. Should I fix that? |
If you think you have a solution it would be excellent! Please also see #1866 in case they are related somehow. I guess we really need to figure out some good logic for these things (how FocusLost, Save, selecting a new entry etc interact), but since I do not really see a "total rewrite" solution anything that improves it is welcome. Btw, I learned today that if the JabRefFrame is used as parent for JOptionPane it becomes modal, so everything (most?) else is stopped and waits. Just thinking when discussing the issue solved here. |
JabRef version 3.5 on Windows 10
Steps to reproduce:
(covering another message box: Error: Braces don't match)
The text was updated successfully, but these errors were encountered: