Skip to content
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

Field right-click 'Protect terms' resulting in error #4958

Closed
1 task done
alfureu opened this issue May 7, 2019 · 8 comments
Closed
1 task done

Field right-click 'Protect terms' resulting in error #4958

alfureu opened this issue May 7, 2019 · 8 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs entry-editor ui

Comments

@alfureu
Copy link

alfureu commented May 7, 2019

JabRef 5.0-dev--snapshot--2019-05-06--master--c168c4978
Windows 10 10.0 amd64
Java 1.8.0_172

Steps to reproduce the behavior:

  1. Add author field, ie: Directorate-General for Research and Innovation
  2. Right-click and select Protect terms > Add {} around selected text
  3. Error (see screenshot)
  4. Even if the {} brackets are manually added, it is ignored in the main list

image

Log File
java.lang.IllegalStateException: Task must only be used from the FX Application Thread
  at javafx.concurrent.Task.checkThread(Task.java:1218)
  at javafx.concurrent.Task.isRunning(Task.java:985)
  at org.controlsfx.control.textfield.AutoCompletionBinding.onUserInputChanged(AutoCompletionBinding.java:333)
  at org.controlsfx.control.textfield.AutoCompletionBinding.setUserInput(AutoCompletionBinding.java:135)
  at org.jabref.gui.autocompleter.AutoCompletionTextInputBinding.setUserInputText(AutoCompletionTextInputBinding.java:136)
  at org.jabref.gui.autocompleter.AutoCompletionTextInputBinding.lambda$new$1074(AutoCompletionTextInputBinding.java:54)
  at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:361)
  at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
  at javafx.scene.control.TextInputControl$TextProperty.fireValueChangedEvent(TextInputControl.java:1389)
  at javafx.scene.control.TextInputControl$TextProperty.markInvalid(TextInputControl.java:1393)
  at javafx.scene.control.TextInputControl$TextProperty.controlContentHasChanged(TextInputControl.java:1332)
  at javafx.scene.control.TextInputControl$TextProperty.access$1600(TextInputControl.java:1300)
  at javafx.scene.control.TextInputControl.lambda$new$162(TextInputControl.java:139)
  at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:137)
  at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
  at javafx.scene.control.TextField$TextFieldContent.insert(TextField.java:87)
  at javafx.scene.control.TextInputControl.replaceText(TextInputControl.java:1204)
  at javafx.scene.control.TextInputControl.filterAndSet(TextInputControl.java:1171)
  at javafx.scene.control.TextInputControl.access$900(TextInputControl.java:79)
  at javafx.scene.control.TextInputControl$TextProperty.doSet(TextInputControl.java:1410)
  at javafx.scene.control.TextInputControl$TextProperty.set(TextInputControl.java:1323)
  at javafx.scene.control.TextInputControl$TextProperty.set(TextInputControl.java:1300)
  at javafx.beans.property.StringProperty.setValue(StringProperty.java:65)
  at javafx.beans.property.StringProperty.setValue(StringProperty.java:57)
  at com.sun.javafx.binding.BidirectionalBinding$TypedGenericBidirectionalBinding.changed(BidirectionalBinding.java:601)
  at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:361)
  at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
  at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:103)
  at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:110)
  at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:144)
  at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:49)
  at javafx.beans.property.StringProperty.setValue(StringProperty.java:65)
  at javafx.beans.property.StringProperty.setValue(StringProperty.java:57)
  at org.jabref.gui.util.BindingsHelper$BidirectionalBinding.updateLocked(BindingsHelper.java:234)
  at org.jabref.gui.util.BindingsHelper$BidirectionalBinding.changedB(BindingsHelper.java:227)
  at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182)
  at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
  at javafx.beans.binding.ObjectBinding.invalidate(ObjectBinding.java:172)
  at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:51)
  at com.sun.javafx.collections.MapListenerHelper$Generic.fireValueChangedEvent(MapListenerHelper.java:320)
  at com.sun.javafx.collections.MapListenerHelper.fireValueChangedEvent(MapListenerHelper.java:72)
  at com.sun.javafx.collections.ObservableMapWrapper.callObservers(ObservableMapWrapper.java:115)
  at com.sun.javafx.collections.ObservableMapWrapper.put(ObservableMapWrapper.java:169)
  at org.jabref.model.entry.BibEntry.setField(BibEntry.java:413)
  at org.jabref.model.cleanup.FieldFormatterCleanup.cleanupSingleField(FieldFormatterCleanup.java:63)
  at org.jabref.model.cleanup.FieldFormatterCleanup.cleanupAllTextFields(FieldFormatterCleanup.java:88)
  at org.jabref.model.cleanup.FieldFormatterCleanup.cleanup(FieldFormatterCleanup.java:32)
  at org.jabref.model.cleanup.FieldFormatterCleanups.applyAllActions(FieldFormatterCleanups.java:71)
  at org.jabref.model.cleanup.FieldFormatterCleanups.applySaveActions(FieldFormatterCleanups.java:61)
  at org.jabref.logic.exporter.BibDatabaseWriter.lambda$applySaveActions$192(BibDatabaseWriter.java:60)
  at java.util.Optional.ifPresent(Unknown Source)
  at org.jabref.logic.exporter.BibDatabaseWriter.applySaveActions(BibDatabaseWriter.java:57)
  at org.jabref.logic.exporter.BibDatabaseWriter.savePartOfDatabase(BibDatabaseWriter.java:172)
  at org.jabref.logic.exporter.BibDatabaseWriter.saveDatabase(BibDatabaseWriter.java:143)
  at org.jabref.logic.autosaveandbackup.BackupManager.performBackup(BackupManager.java:124)
  at java.util.Optional.ifPresent(Unknown Source)
  at org.jabref.logic.autosaveandbackup.BackupManager.lambda$new$132(BackupManager.java:49)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)
@Siedlerchr Siedlerchr added entry-editor good first issue An issue intended for project-newcomers. Varies in difficulty. ui labels May 7, 2019
@Siedlerchr Siedlerchr added bug Confirmed bugs or reports that are very likely to be bugs and removed good first issue An issue intended for project-newcomers. Varies in difficulty. labels May 7, 2019
@Siedlerchr
Copy link
Member

Threading problem in Cleanup/setFields. I think we had simliar issues already with the cleanup dialog and could solve this somewhow.

@Siedlerchr
Copy link
Member

@DOFfactory It seems like you have save actions enabled. Do you maybe have Latex2Unicode formatting enabled as save actions?
Please look at the LIbrary-> Library Propertes menu and post the list of save actions

@alfureu
Copy link
Author

alfureu commented May 10, 2019

Hi @Siedlerchr, you are right, whenever I create a biblatex library, I usually set up the user-specific library for the respective library (instead of one single library location), and I also click at the Save actions - Enable save actions > Recommended for biblatex.

This last action automatically enables the all-text-fields: Latex to Unicode option. While I can disable it, I think it is a useful conversion, and it should be rather Latex to UTF-8 instead and not firing an error mentioned in my 1st post.

@Siedlerchr
Copy link
Member

@DOFfactory Okay thanks! Now I could reproduce the error.
Regarding the protected terms: This is a known issue with the Latex2Unicode conversion:
#4152

@alfureu
Copy link
Author

alfureu commented May 10, 2019

Thanks. Sorry, I was not aware of the fact that it has been already reported. Something similar happens also if one copy&pastes a text from the website directly to the Abstract field.

@Siedlerchr
Copy link
Member

@DOFfactory This are two different issues. The error reported from your log comes from the save actions and is defintively a bug. And the same underlying error for every other field.

The other issue you noticed is that the braces of corporate authors vanish. That is the issue #4152

@homocomputeris
Copy link

Latest Git version
JabRef 5.0-dev
Linux 5.1.8-zen1-1-zen amd64
Java 1.8.0_212

java.lang.IllegalStateException: Task must only be used from the FX Application Thread
	at javafx.concurrent.Task.checkThread(Task.java:1218)
	at javafx.concurrent.Task.isRunning(Task.java:985)
	at org.controlsfx.control.textfield.AutoCompletionBinding.onUserInputChanged(AutoCompletionBinding.java:333)
	at org.controlsfx.control.textfield.AutoCompletionBinding.setUserInput(AutoCompletionBinding.java:135)
	at org.jabref.gui.autocompleter.AutoCompletionTextInputBinding.setUserInputText(AutoCompletionTextInputBinding.java:136)
	at org.jabref.gui.autocompleter.AutoCompletionTextInputBinding.lambda$new$394(AutoCompletionTextInputBinding.java:54)
	at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:361)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
	at javafx.scene.control.TextInputControl$TextProperty.fireValueChangedEvent(TextInputControl.java:1389)
	at javafx.scene.control.TextInputControl$TextProperty.markInvalid(TextInputControl.java:1393)
	at javafx.scene.control.TextInputControl$TextProperty.controlContentHasChanged(TextInputControl.java:1332)
	at javafx.scene.control.TextInputControl$TextProperty.access$1600(TextInputControl.java:1300)
	at javafx.scene.control.TextInputControl.lambda$new$0(TextInputControl.java:139)
	at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:137)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
	at javafx.scene.control.TextField$TextFieldContent.insert(TextField.java:87)
	at javafx.scene.control.TextInputControl.replaceText(TextInputControl.java:1204)
	at javafx.scene.control.TextInputControl.filterAndSet(TextInputControl.java:1171)
	at javafx.scene.control.TextInputControl.access$900(TextInputControl.java:79)
	at javafx.scene.control.TextInputControl$TextProperty.doSet(TextInputControl.java:1410)
	at javafx.scene.control.TextInputControl$TextProperty.set(TextInputControl.java:1323)
	at javafx.scene.control.TextInputControl$TextProperty.set(TextInputControl.java:1300)
	at javafx.beans.property.StringProperty.setValue(StringProperty.java:65)
	at javafx.beans.property.StringProperty.setValue(StringProperty.java:57)
	at com.sun.javafx.binding.BidirectionalBinding$TypedGenericBidirectionalBinding.changed(BidirectionalBinding.java:601)
	at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:361)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
	at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:103)
	at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:110)
	at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:144)
	at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:49)
	at javafx.beans.property.StringProperty.setValue(StringProperty.java:65)
	at javafx.beans.property.StringProperty.setValue(StringProperty.java:57)
	at org.jabref.gui.util.BindingsHelper$BidirectionalBinding.updateLocked(BindingsHelper.java:234)
	at org.jabref.gui.util.BindingsHelper$BidirectionalBinding.changedB(BindingsHelper.java:227)
	at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
	at javafx.beans.binding.ObjectBinding.invalidate(ObjectBinding.java:172)
	at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:51)
	at com.sun.javafx.collections.MapListenerHelper$Generic.fireValueChangedEvent(MapListenerHelper.java:320)
	at com.sun.javafx.collections.MapListenerHelper.fireValueChangedEvent(MapListenerHelper.java:72)
	at com.sun.javafx.collections.ObservableMapWrapper.callObservers(ObservableMapWrapper.java:115)
	at com.sun.javafx.collections.ObservableMapWrapper.put(ObservableMapWrapper.java:169)
	at org.jabref.model.entry.BibEntry.setField(BibEntry.java:413)
	at org.jabref.model.cleanup.FieldFormatterCleanup.cleanupSingleField(FieldFormatterCleanup.java:63)
	at org.jabref.model.cleanup.FieldFormatterCleanup.cleanup(FieldFormatterCleanup.java:34)
	at org.jabref.logic.cleanup.CleanupWorker.cleanup(CleanupWorker.java:31)
	at org.jabref.gui.cleanup.CleanupAction.doCleanup(CleanupAction.java:90)
	at org.jabref.gui.cleanup.CleanupAction.cleanup(CleanupAction.java:133)
	at org.jabref.gui.cleanup.CleanupAction.lambda$action$708(CleanupAction.java:65)
	at org.jabref.gui.util.BackgroundTask$2.call(BackgroundTask.java:55)
	at org.jabref.gui.util.BackgroundTask$2.call(BackgroundTask.java:52)
	at org.jabref.gui.util.DefaultTaskExecutor$1.call(DefaultTaskExecutor.java:122)
	at javafx.concurrent.Task$TaskCallable.call(Task.java:1423)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

@tobiasdiez
Copy link
Member

This should be fixed in the latest development version. Could you please check the build from http://builds.jabref.org/master/. Thanks! Please remember to make a backup of your library before trying-out this version.

github-actions bot pushed a commit that referenced this issue Nov 1, 2020
5c376b8 Create karlstad-universitet-kau-harvard-swedish.csl (#5083)
6a62c24 Create ucl-institute-of-education-harvard.csl (#5084)
4d1bbb0 Update ferdinand-porsche-fern-fachhochschule.csl (#5073)
3a9f494 Update cureus.csl (#5087)
181c0dd Create apa-no.csl (#5059)
651ce48 Some fixes for Advanced Functional Materials (#5080)
4e3297a Acta Zoologica Hungarica: Don't demote nd particles
c659df7 Create medicina-delle-dipendenze-italian-journal-of-the-addictions.csl (#5078)
d243055 Update geografia-fisica-e-dinamica-quaternaria.csl (#5079)
1ee3809 Update mcgill-en.csl (#5076)
949cdc6 Update mcgill-fr.csl (#5075)
ee7d4e1 Create chem-catalysis.csl (#5074)
ec9faec Switch Molecular Therapy to Cell (#5070)
cf6034c Switch Elsevier to their own ad-vancouver (#5072)
78cca13 Updates in research-institute-for-nature-and-forest.csl (#4958)
68b7478 Update journal-of-neolithic-archaeology.csl (#5065)
524ba93 Create offa.csl (#5066)
9713a82 Update associacao-brasileira-de-normas-tecnicas-ufrgs-note-initials-with-ibid (#5067)
44449df Uodate associacao-brasileira-de-normas-tecnicas-ufrgs-initials.csl (#5061)
baf9efa Create İstanbul Üniversitesi Sosyal Bilimler Enstitüsü Ali Ekber Çına… (#5064)
c5c3531 Fix CORR
853a804 Major Update mcgill-fr.csl to 9th ed. (#5057)
d3e2cd9 Update mcgill-en.csl (#5056)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 5c376b8
github-actions bot pushed a commit to dimitra-karadima/jabref that referenced this issue Nov 15, 2020
55200d0 Create computational-intelligence.csl (JabRef#5102)
6d2efc3 Merge branch 'master' of github.com:citation-style-language/styles
60ab0fb Add Steinbeis SMI
d5e0130 Add AAQR Style
d964f9b Create bitonline-publikationen.csl (JabRef#5090)
0dc1a56 Add "APA 7th edition" to Norsk APA style titles (JabRef#5098)
3b6aaf7 Update norsk-apa-manual.csl (JabRef#5095)
0139c63 Create technische-universitat-dresden-betriebswirtschaftslehre-rechnungswesen-controlling.csl (JabRef#5034)
fdc4497 Update universidade-estadual-de-alagoas-abnt (JabRef#5085)
afdc2ea Create revista-espanola-de-nutricion-humana-y-dietetica.csl (JabRef#5082)
939189d Create citation-compass-apa-note-no.csl (JabRef#5060)
414f5e6  brazilian-journal-of-veterinary-research: add bib sorting (JabRef#5091)
dbae9d7 Add DOI to Thieme German
f4399aa APA: match="any" bugfixes (JabRef#5092)
d0cc2c4 Add APA numeric and update BioEssays (JabRef#5089)
5c376b8 Create karlstad-universitet-kau-harvard-swedish.csl (JabRef#5083)
6a62c24 Create ucl-institute-of-education-harvard.csl (JabRef#5084)
4d1bbb0 Update ferdinand-porsche-fern-fachhochschule.csl (JabRef#5073)
3a9f494 Update cureus.csl (JabRef#5087)
181c0dd Create apa-no.csl (JabRef#5059)
651ce48 Some fixes for Advanced Functional Materials (JabRef#5080)
4e3297a Acta Zoologica Hungarica: Don't demote nd particles
c659df7 Create medicina-delle-dipendenze-italian-journal-of-the-addictions.csl (JabRef#5078)
d243055 Update geografia-fisica-e-dinamica-quaternaria.csl (JabRef#5079)
1ee3809 Update mcgill-en.csl (JabRef#5076)
949cdc6 Update mcgill-fr.csl (JabRef#5075)
ee7d4e1 Create chem-catalysis.csl (JabRef#5074)
ec9faec Switch Molecular Therapy to Cell (JabRef#5070)
cf6034c Switch Elsevier to their own ad-vancouver (JabRef#5072)
78cca13 Updates in research-institute-for-nature-and-forest.csl (JabRef#4958)
68b7478 Update journal-of-neolithic-archaeology.csl (JabRef#5065)
524ba93 Create offa.csl (JabRef#5066)
9713a82 Update associacao-brasileira-de-normas-tecnicas-ufrgs-note-initials-with-ibid (JabRef#5067)
44449df Uodate associacao-brasileira-de-normas-tecnicas-ufrgs-initials.csl (JabRef#5061)
baf9efa Create İstanbul Üniversitesi Sosyal Bilimler Enstitüsü Ali Ekber Çına… (JabRef#5064)
c5c3531 Fix CORR
853a804 Major Update mcgill-fr.csl to 9th ed. (JabRef#5057)
d3e2cd9 Update mcgill-en.csl (JabRef#5056)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 55200d0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs entry-editor ui
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants