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

Entry Editor removes entries when in souce-code-field #4764

Closed
1 task done
JoKalliauer opened this issue Mar 15, 2019 · 3 comments
Closed
1 task done

Entry Editor removes entries when in souce-code-field #4764

JoKalliauer opened this issue Mar 15, 2019 · 3 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs entry-editor ui
Milestone

Comments

@JoKalliauer
Copy link
Contributor

JoKalliauer commented Mar 15, 2019

JabRef version 5.0-dev on Ubuntu 18.04

JabRef 5.0-dev--snapshot--2019-03-15--master--7ed15bc4a
Linux 4.15.0-46-generic amd64
Java 1.8.0_201

Steps to reproduce the behavior:

  1. Open 4764.bib
  2. double click on "Rechnergestütze Simulation von Anfahrversuchen nach EN 1317"
  3. go to "BibTeX-source code" (in the newest dev-version be aware of the workaround #4762#issue-421323351, but "my bug" also ocours in a february-version)
  4. click anywhere into the source-code-field
  5. click on "Misc"-"DNA-Dennis"-"CoulombsLaw.svg pblished under CC-BY 3.0"
  6. save
  7. check output.bib.txt (the "Misc"-"DNA-Dennis"-"CoulombsLaw.svg pblished under CC-BY 3.0" disapeared)
Detail information:
Can only load style files: Preview
Can only load style files: Preview
Can only load style files: Preview
Can only load style files: Preview
Can only load style files: Preview
Terminal

java -jar -Djavafx.embed.singleThread=true /home/jkalliau/prgm/JabRef/JabRef--master--latest.jar 4633.bib

16:17:39.557 [JavaFX Application Thread] INFO  org.jabref.logic.importer.OpenDatabase - Opening: 4633.bib
16:17:39.803 [JavaFX Application Thread] INFO  org.jabref.logic.importer.OpenDatabase - Opening: /home/jkalliau/ownCloud/PhDJK/LaTeX/Style/LiteratureJK.bib
16:17:40.907 [JavaFX Application Thread] ERROR org.jabref.logic.citationstyle.CitationStyle - Can only load style files: Preview
16:17:40.982 [JavaFX Application Thread] ERROR org.jabref.logic.citationstyle.CitationStyle - Can only load style files: Preview
16:17:47.312 [JavaFX Application Thread] ERROR org.jabref.logic.citationstyle.CitationStyle - Can only load style files: Preview
@tobiasdiez tobiasdiez added this to the v5.0 milestone Mar 15, 2019
@Siedlerchr
Copy link
Member

Confirmed: when I click in the source field and then select another entry in the table, the bib entry codes changes to the first selected one.
Log informs about autosave:

12:44:23.668 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:23.706 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:23.717 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:23.737 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:23.749 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:23.797 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:23.808 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:23.820 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:23.838 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:23.879 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:23.928 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:23.952 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:23.994 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:24.060 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:24.077 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:24.140 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:24.175 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:24.380 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:24.402 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:24.653 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:24.710 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  
12:44:24.725 [JavaFX Application Thread] DEBUG org.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running. -  

@Siedlerchr Siedlerchr added the bug Confirmed bugs or reports that are very likely to be bugs label Mar 16, 2019
@CaptainDaVinci
Copy link
Contributor

CaptainDaVinci commented Mar 16, 2019

I think this is because when the sourceTab is out of focus (when another entry is selected), the storeSource() method is called with the previous sourceText but the currentEntry refers to the second entry and the field values of first one are copied to the second one.

One possible solution might be to maintain a previousEntry field along with currentEntry which is updated every time notifyAboutFocus() is called.
Edit: The proposed solution will break saving on losing focus.

@Siedlerchr
Copy link
Member

Thanks to @CaptainDaVinci this should be fixed in the latest master. https://builds.jabref.org/master

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

No branches or pull requests

4 participants