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

Can't use "Cleanup Entries" on more than one entry #11966

Open
2 tasks done
Luram123 opened this issue Oct 14, 2024 · 4 comments · Fixed by #11974
Open
2 tasks done

Can't use "Cleanup Entries" on more than one entry #11966

Luram123 opened this issue Oct 14, 2024 · 4 comments · Fixed by #11974
Labels
bug Confirmed bugs or reports that are very likely to be bugs cleanup-ops

Comments

@Luram123
Copy link

JabRef version

Latest development branch build (please note build date below)

Operating system

Windows

Details on version and operating system

Windows 11 23H2

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

Hello there :)

  1. Select entries in your library (5 are enough).
  2. Run the "Cleanup Entries" feature.
  3. In my case I wanted to get rid of the field Urldate, which means that I take away every tick on the checkboxes and only enable field formatters.
  4. I add: "Field name: Urldate" and "Formatter name: Clear"
  5. I hit enter.

A window ("Exception details") should show up and say: "Unhandles exception occured."
When looking at the details a bunch of java related stuff comes up, but I can't read computer language very well. But every line of this text ends with the words "Unknown Source" within brackets.

When looking at the entries selected only one was cleaned up.
After installing the latest development version I was able to clean up two entries but the process still breaks in the same way.

What can I do to fix this? Or is it an issue that has to be fixed by the developers and I have to wait?

Thanks in advance
Luram

PS.:
My Jabref Version
JabRef 6.0--2024-10-14--e0cd309
Windows 11 10.0 amd64
Java 21.0.2
JavaFX 23+29

Appendix

No response

@Siedlerchr
Copy link
Member

Can you please paste the whole stack trace of the exception?
That helps us to identify the real problems

@Siedlerchr Siedlerchr added bug Confirmed bugs or reports that are very likely to be bugs cleanup-ops labels Oct 15, 2024
@Siedlerchr
Copy link
Member

Siedlerchr commented Oct 15, 2024

As the undo properties are bound to the fx thread we need to make sure the edits are posted on the fx thread
Maybe pass a Consumer/Supplier that is used for delegating the undo events to the on succeeded handler

Refs #11839

java.lang.IllegalStateException: This operation is permitted on the event thread only; currentThread = pool-2-thread-5
	at javafx.graphics@23/com.sun.glass.ui.Application.checkEventThread(Application.java:445)
	at javafx.graphics@23/com.sun.glass.ui.MenuItem.setEnabled(MenuItem.java:108)
	at javafx.graphics@23/com.sun.javafx.tk.quantum.GlassSystemMenu.lambda$insertMenuItem$8(GlassSystemMenu.java:260)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:376)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(BooleanPropertyBase.java:104)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:111)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase$Listener.invalidated(BooleanPropertyBase.java:239)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:147)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(BooleanPropertyBase.java:104)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:111)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase$Listener.invalidated(BooleanPropertyBase.java:239)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:147)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(BooleanPropertyBase.java:104)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:111)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase$Listener.invalidated(BooleanPropertyBase.java:239)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:147)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at javafx.base@23/javafx.beans.binding.BooleanBinding.invalidate(BooleanBinding.java:180)
	at javafx.base@23/com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:147)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at javafx.base@23/javafx.beans.property.ReadOnlyBooleanPropertyBase.fireValueChangedEvent(ReadOnlyBooleanPropertyBase.java:78)
	at javafx.base@23/javafx.beans.property.ReadOnlyBooleanWrapper.fireValueChangedEvent(ReadOnlyBooleanWrapper.java:103)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:111)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase$Listener.invalidated(BooleanPropertyBase.java:239)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:147)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at javafx.base@23/javafx.beans.binding.BooleanBinding.invalidate(BooleanBinding.java:180)
	at javafx.base@23/javafx.beans.binding.Bindings$ShortCircuitAndInvalidator.invalidated(Bindings.java:4669)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:376)
	at javafx.base@23/com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:91)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(BooleanPropertyBase.java:104)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:111)
	at javafx.base@23/javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
	at javafx.base@23/javafx.beans.property.BooleanProperty.setValue(BooleanProperty.java:79)
	at [email protected]/org.jabref.gui.undo.CountingUndoManager.updateUndoableStatus(CountingUndoManager.java:70)
	at [email protected]/org.jabref.gui.undo.CountingUndoManager.addEdit(CountingUndoManager.java:29)
	at [email protected]/org.jabref.gui.cleanup.CleanupAction.cleanup(CleanupAction.java:147)
	at [email protected]/org.jabref.gui.cleanup.CleanupAction.lambda$execute$1(CleanupAction.java:93)
	at [email protected]/org.jabref.logic.util.BackgroundTask$2.call(BackgroundTask.java:82)
	at [email protected]/org.jabref.logic.util.BackgroundTask$2.call(BackgroundTask.java:79)
	at [email protected]/org.jabref.gui.util.UiTaskExecutor$1.call(UiTaskExecutor.java:191)
	at javafx.graphics@23/javafx.concurrent.Task$TaskCallable.call(Task.java:1401)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Siedlerchr added a commit that referenced this issue Oct 15, 2024
@github-project-automation github-project-automation bot moved this to Normal priority in Prioritization Oct 15, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 16, 2024
@github-project-automation github-project-automation bot moved this from Normal priority to Done in Prioritization Oct 16, 2024
@Luram123
Copy link
Author

This is the exception stacktrace that i got:

java.util.ConcurrentModificationException at java.base/java.util.AbstractList$Itr.checkForComodification(Unknown Source) at java.base/java.util.AbstractList$Itr.next(Unknown Source) at [email protected]/org.jabref.gui.cleanup.CleanupAction.cleanup(Unknown Source) at [email protected]/org.jabref.gui.cleanup.CleanupAction.lambda$execute$1(Unknown Source) at [email protected]/org.jabref.logic.util.BackgroundTask$2.call(Unknown Source) at [email protected]/org.jabref.logic.util.BackgroundTask$2.call(Unknown Source) at [email protected]/org.jabref.gui.util.UiTaskExecutor$1.call(Unknown Source) at javafx.graphics@23/javafx.concurrent.Task$TaskCallable.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)

@Siedlerchr Siedlerchr reopened this Oct 16, 2024
@Siedlerchr
Copy link
Member

Okay that's a different error. This is then a simliar/the same issue as #11416

ExrosZ pushed a commit to ExrosZ/jabref that referenced this issue Oct 17, 2024
ExrosZ pushed a commit to ExrosZ/jabref that referenced this issue Oct 17, 2024
ExrosZ pushed a commit to ExrosZ/jabref that referenced this issue Oct 21, 2024
@calixtus calixtus moved this from Done to Normal priority in Prioritization Nov 13, 2024
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 cleanup-ops
Projects
Status: Normal priority
Development

Successfully merging a pull request may close this issue.

2 participants