jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Preview out of sync with entry table

Open mlep opened this issue 2 years ago • 19 comments

JabRef version

Latest development branch build (please note build date below)

Operating system

GNU / Linux

Details on version and operating system

JabRef 5.8--2022-09-21--35d995a Linux 5.10.0-18-amd64 amd64 Java 18.0.2.1 JavaFX 19+11

Checked with the latest development build

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

Steps to reproduce the behaviour

From time to time, the entry displayed in the preview does not correspond to the entry selected in the entry table.

  1. open the library https://github.com/JabRef/jabref/blob/main/src/test/resources/testbib/jabref-authors.bib
  2. double-click on one entry of the entry table to open the entry editor. The entry editor contains the entry preview (as a tab or not, depending on the settings). If needed, select the tab "Preview".
  3. click on the current entry in the entry table.
  4. with the up and down keys, move around the entries --> from time to time, the preview does not match the selected entry (it matches the previous entry).

I never noticed this issue before. So, it could be due to a recent change. I could reproduce this behaviour with the preview as a tab or not.

Appendix

...

Log File
Paste an excerpt of your log file here

mlep avatar Sep 23 '22 14:09 mlep

As far as I can tell, this issue does not appear in the following version:

JabRef 5.8--2022-09-05--ce08d0d Windows 10 10.0 amd64 Java 18.0.2.1 JavaFX 18.0.2+2

I also wanted to try the latest version, but since https://github.com/JabRef/jabref/issues/9176 still needs to be fixed, I will have to wait for that bugfix until I can test the current JabRef version.

AEgit avatar Sep 27 '22 18:09 AEgit

I cannot reproduce the bug with JabRef 5.8--2022-09-14--6a4a4f4

mlep avatar Sep 28 '22 13:09 mlep

The issue stopped showing once I downgraded to JavaFX 18. The upgrade to JavaFX 19 was done on 2022-09-15, which explains why it was not reproducible on the day before it.

HoussemNasri avatar Sep 30 '22 12:09 HoussemNasri

@HoussemNasri Thanks for testing this. Maybe it has something to do with the changes to the observables (in combination with the new map operators stuff) Could be then an issue with our easybind fork

Siedlerchr avatar Oct 07 '22 15:10 Siedlerchr

I don't think so. When I tested it, I only changed the version of JavaFX in the gradle file. If the changes in the observables or easybind triggered the issue then downgrading JavaFX shouldn't prevent the issue because the changes are still there. I saw a recent issue in JavaFX TreeView - TreeView selects wrong item when folder above is modified and opened - Maybe both TreeView and TableView share the same selection logic? I need to have a deeper look to confirm the cause.

HoussemNasri avatar Oct 07 '22 16:10 HoussemNasri

Ah okay, thanks https://github.com/openjdk/jfx/blob/master/doc-files/release-notes-19.md There was a fix regarding an IIOBE on the list change listener for tables. Maybe that was the culprit

Siedlerchr avatar Oct 07 '22 17:10 Siedlerchr

Thank you; I'll take a look. It's hard to tell whether it's really a JavaFX-related issue. I played around with JabRef for ~5 minutes and was able to trigger it around 5 times while running JavaFX 19 and none while running version 18. It's probably a concurrency problem because it's randomly triggered and I still can't extract deterministic steps for triggering it.

HoussemNasri avatar Oct 07 '22 18:10 HoussemNasri

DevCall decision: We create an explicit branch with JavaFX 18, ask users for feedback - and see if the issue still appears.

koppor avatar Oct 10 '22 19:10 koppor

I wil prepare a thing

Siedlerchr avatar Oct 15 '22 14:10 Siedlerchr

@mlep Can you try and test this version? I downgraded to javafx18 so we can see if this was introduced there https://builds.jabref.org/pull/9253/merge/

Siedlerchr avatar Oct 15 '22 20:10 Siedlerchr

The bug is there.

mlep avatar Oct 15 '22 20:10 mlep

Encountered the same issue.

  1. After through all entries with the cursor keys, it is faster --> do we have caching enabled?
  2. Mostly, the currently selected entry is eventually shown in the preview --> We should show a loading indicator when the preview is starting to get updated. Is this a background process?
  3. Once, I saw that there was no final update (step 2)

koppor avatar Jan 01 '23 19:01 koppor

When the entry editor is opened:

  • Switching the tab in the entry editor leads to an update of the content grafik
  • When switching back, the wrong content is shown again
    grafik
  • Adding an entry from an import does not update the preview

koppor avatar Jan 02 '23 11:01 koppor

Just as a follow-up, I have the same problem under:

JabRef 5.9--2023-01-08--76253f1a7 Linux 5.15.0-60-generic amd64 Java 19.0.1 JavaFX 19+11

It seems to me that when JabRef has been running for a while, the problem goes away (some kind of caching issue?).

wviechtb avatar Feb 28 '23 07:02 wviechtb

Have the same issue with:

JabRef 5.9--ArchLinux--1 Linux 6.1.14-1-lts amd64 Java 19.0.2 JavaFX 19+11

I can also confirm that after some time (In the neighbourhood of like a few to 10 minutes) the issue seems to go away and the preview is updated consistently and correctly. This seems to be affected by the amount of usage.

BeCracked avatar Mar 07 '23 09:03 BeCracked

+1 JabRef 5.10--2023-06-11--27a22af Linux 5.15.0-73-generic amd64 Java 20.0.1 JavaFX 20+19

The Preview tab gets stuck displaying a particular entry and doesn't change when one scrolls to different entries.

https://github.com/JabRef/jabref/assets/762246/7f931cca-d692-4460-be51-7bafbf34714e

wujastyk avatar Jun 11 '23 09:06 wujastyk

I can reproduce this very reliably if you show the entry preview next to the entry editor. Then you will also see that the entry editor is updated correctly, but not the preview. In fact, one can sometimes even arrange that one entry is previewed in one tab, while another entry is shown in another tab. So it's almost surely not an issue in JavaFX (at least not related to the main table), and more likely a problem how the update events are consumed to update the preview.

tobiasdiez avatar Oct 07 '23 10:10 tobiasdiez

Still happens with todays' dev version (JabRef 5.13--2024-02-05--47bdfc1)

image

koppor avatar Feb 05 '24 10:02 koppor

It has to do something with throttling of events... After writing the report, the view updated. Clicking fastly back and forth, the view does not update. - Heisenbug. - Currently no update.

koppor avatar Feb 05 '24 10:02 koppor