Fix #2680 and fix #2667: Swing errors are catched properly and without freezing#2681
Merged
Conversation
LinusDietz
approved these changes
Mar 23, 2017
LinusDietz
left a comment
Member
There was a problem hiding this comment.
I have not looked at the code, but it seems like the freezing issues are gone for me.
Member
|
Will look at it.
|
stefan-kolb
approved these changes
Mar 23, 2017
stefan-kolb
left a comment
Member
There was a problem hiding this comment.
Seems to work for me! Thanks Tobias 👍
matthiasgeiger
approved these changes
Mar 23, 2017
matthiasgeiger
left a comment
Member
There was a problem hiding this comment.
Generally, ok - however, it would be better to actually solve the LOGGER problem, as this might pop-up again at other occurrences...
Any idea how to accomplish this?
Member
Author
|
@matthiasgeiger You are right, my changes are more a workaround than a proper solution. However, since the deadlock only appears if an exception is logged in the Swing thread and afterwards the GUIAppender also logs something, I decided not to invest more time. Probably a application-wide lock for the appender is needed. |
Siedlerchr
added a commit
that referenced
this pull request
Mar 25, 2017
* upstream/master: Localization: General: French: Translation of new entries Localization: Menu: French: Translation of an entry (#2685) Fix #2680 and fix #2667: Swing errors are catched properly and without freezing (#2681) Do not log AND throw Replace misleading error message for fetcher connection error Document CrossRef test Fix subtitle detection for CrossRef fetcher Revert "Invoke LogMessages.add in JavaFX thread" Use global user agent Update mockito from 2.7.17 to 2.7.18 Move GuiAppender to GUI package Invoke LogMessages.add in JavaFX thread [WIP] Put the PDFAnnotationImporter under Test, enhance FileAnnotationTab (#2640) Fix for "Paying off technical debt: almost all utility classes have a private constructor now." (#2672) Revert "Paying off technical debt: almost all utility classes have a private constructor now. (#2649)" (#2670) Paying off technical debt: almost all utility classes have a private constructor now. (#2649) Changed codeformatting for better fxml annotation (#2668) Disalbe Google Scholar tests on all CI environments (#2654) Fix JSONException in Crossref fetcher as mentioned in #2442
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hopefully, fixes that the error console is not updated properly #2667 as well as that Swing errors lead to frezzing #2680. At least for me, it works now without problems. @stefan-kolb @lynyus can you please also check it.
For the error console, I took the suggestion #2667 (comment) by @matthiasgeiger. The freezing after a Swing message occurred since
̀
LOGGER.warn("No localized message exception message defined. Falling back to getMessage().");lead to recursive calls (actually, Log4j has some logic to prevent deadlocks but these don't take effect since the original message is thrown in the Swing thread, while the above "no localized messsage" is posted in the JavaFX thread.). I simply changed it to log level "debug", which effectively hides it in most cases. As a positive side effect, the scroll issue mentioned in #2667 (comment) is also fixed.
gradle localizationUpdate?