question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Write XMP Button should be disabled when action is in progress

See original GitHub issue

We offer the functionality to write XMP to a PDF:

grafik

We tried to fix it at https://github.com/JabRef/jabref/pull/8658

However, the fix does not work:

com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: 1-based index not found: 8 at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache$Segment.get(Unknown Source) at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache.get(Unknown Source) at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache.getOrLoad(Unknown Source) at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache$LocalLoadingCache.get(Unknown Source) at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(Unknown Source) at org.jabref@5.6.160/org.jabref.logic.pdf.FileAnnotationCache.getFromCache(Unknown Source) at org.jabref@5.6.160/org.jabref.gui.entryeditor.fileannotationtab.FileAnnotationTabViewModel.lambda$reloadAnnotations$1(Unknown Source) at org.jabref.merged.module@5.6.160/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at org.jabref.merged.module@5.6.160/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source) at org.jabref.merged.module@5.6.160/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) at org.jabref.merged.module@5.6.160/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at org.jabref.merged.module@5.6.160/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalStateException: 1-based index not found: 8 at org.jabref.merged.module@5.6.160/org.apache.pdfbox.pdmodel.PDPageTree.get(Unknown Source) at org.jabref.merged.module@5.6.160/org.apache.pdfbox.pdmodel.PDPageTree.get(Unknown Source) at org.jabref.merged.module@5.6.160/org.apache.pdfbox.pdmodel.PDPageTree.get(Unknown Source) at org.jabref.merged.module@5.6.160/org.apache.pdfbox.pdmodel.PDPageTree.get(Unknown Source) at org.jabref@5.6.160/org.jabref.logic.pdf.PdfAnnotationImporter.importAnnotations(Unknown Source) at org.jabref@5.6.160/org.jabref.logic.pdf.EntryAnnotationImporter.lambda$importAnnotationsFromFiles$2(Unknown Source) at java.base/java.util.Optional.ifPresent(Unknown Source) at org.jabref@5.6.160/org.jabref.logic.pdf.EntryAnnotationImporter.importAnnotationsFromFiles(Unknown Source) at org.jabref@5.6.160/org.jabref.logic.pdf.FileAnnotationCache$1.load(Unknown Source) at org.jabref@5.6.160/org.jabref.logic.pdf.FileAnnotationCache$1.load(Unknown Source) at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(Unknown Source) at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache$Segment.loadSync(Unknown Source) at org.jabref.merged.module@5.6.160/com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(Unknown Source) ... 14 more

Proposal: When clicking on the button

  1. JabRef disalbes the button
  2. JabRef does its work
  3. JabRef enabled the button

This a) provides the user a feedback that JabRef is working and b) removes synchronized statements from the code.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
melmorsycommented, Apr 21, 2022

Thank you @ThiloteE ! 😃 - I’m planning to push the proposed enhancement to disable the button once it’s clicked then re-enable it once the write is done, will have a look at the contribution guidelines before pushing the change though, let me know please if you have any suggestions.

1reaction
ThiloteEcommented, Apr 20, 2022

Thank you for your interest by the way! 😃

If you are here, you are at the right place:

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Friendly reminder to enable XMP profile when buying RAM ...
XMP is very safe. How to enable XMP: First restart your pc and mash the F2/DEL button (varies per manufacturer) get to the...
Read more >
HTML attribute: disabled - HTML: HyperText Markup Language
This Boolean disabled attribute indicates that the user cannot interact with the control or its descendant controls.
Read more >
XMP file for *** cannot be created or updated. - FastRawViewer
Cannot write to XMP file. Check card write lock switch, available disk space, and folder access rights. This message comes up 95% of...
Read more >
Manage Camera Raw settings - Adobe Support
Learn how to manage Adobe Camera Raw settings to work with your images to ... The Camera Raw plug-in cannot write an XMP...
Read more >
Making Disabled Buttons More Inclusive - CSS-Tricks
Let's talk about disabled buttons. ... the traditional disabled attribute in HTML (e.g. <button disabled> ) to mark a button as disabled.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found