Skip to content

Fix #2680 and fix #2667: Swing errors are catched properly and without freezing#2681

Merged
tobiasdiez merged 1 commit into
masterfrom
fixLogFX
Mar 24, 2017
Merged

Fix #2680 and fix #2667: Swing errors are catched properly and without freezing#2681
tobiasdiez merged 1 commit into
masterfrom
fixLogFX

Conversation

@tobiasdiez

@tobiasdiez tobiasdiez commented Mar 23, 2017

Copy link
Copy Markdown
Member

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.

  • Change in CHANGELOG.md described
  • Tests created for changes
  • Screenshots added (for bigger UI changes)
  • Manually tested changed features in running JabRef
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)
  • If you changed the localization: Did you run gradle localizationUpdate?

@tobiasdiez tobiasdiez added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Mar 23, 2017

@LinusDietz LinusDietz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not looked at the code, but it seems like the freezing issues are gone for me.

@stefan-kolb

stefan-kolb commented Mar 23, 2017

Copy link
Copy Markdown
Member

Will look at it.

@stefan-kolb stefan-kolb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work for me! Thanks Tobias 👍

@matthiasgeiger matthiasgeiger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@tobiasdiez

Copy link
Copy Markdown
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.

@tobiasdiez tobiasdiez merged commit 2c7ea60 into master Mar 24, 2017
@tobiasdiez tobiasdiez deleted the fixLogFX branch March 24, 2017 09:54
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants