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

Seemingly Random freeze on PDF import #2482

Closed
paulsputer opened this issue Jan 23, 2017 · 10 comments
Closed

Seemingly Random freeze on PDF import #2482

paulsputer opened this issue Jan 23, 2017 · 10 comments

Comments

@paulsputer
Copy link
Contributor

v3.8.1, windows 10

Great work on this version the get BibTex from doi functionality is working better than ever. Unfortunately this version often seems to suffer a freeze when importing PDFs. Initially I thought it was caused by some interaction with the quality assured field as it seemed to freeze after setting a few quality assured fields and then importing a PDF. However, I've also had it freeze without setting those. On a restart it imports the file no problem so seems to be some state issue.

Would love to give more details but the freeze prevents me from accessing the in-app log. Is there a quick way to get it to print the log to a file without running in dev mode?

Perhaps related to #410 #2309

@paulsputer
Copy link
Contributor Author

Can confirm this also occurs on v3.8.2

It appears to be a state issue as importing this PDF file caused a crash. However, when importing into a fresh database it did not cause a crash.

Any hints on how to turn on file based logging on the release version would be much appreciated.

@matthiasgeiger
Copy link
Member

Hi!
Can you please describe the concrete workflow of your "importing the pdf"? There are different ways to do this - and there might be even different understandings of what "import" actually means ;-)

Regarding the logging: We have not implemented a file based logging mechanism - but you can run the jar-Version of JabRef from the windows console which will show each log statement directly without the need to open the JabRef error console dialog.

@paulsputer
Copy link
Contributor Author

paulsputer commented Jan 31, 2017

Hi @matthiasgeiger sure.

  1. File explorer window open of directory containing PDF files
  2. Select a single PDF file and drag and drop into JabRef list panel
  3. Confirm dialog to relocate/rename PDF
  4. File relocated and metadata displayed in JabRef

In the case of the error occurring the JabRef UI is unresponsive following (4) however there are no drawing errors. The window can be relocated and it redraws correctly. CPU usage for JabRef indicated at 0%, only way to close JabRef is via task manager.

Thanks for the hint on running the jar version I'll try that and see if it provides some further clues

@Siedlerchr
Copy link
Member

As I cant reproduce that here, do you make use of the XMP feature, e.g. creating metatadat from the pdf or do you solely attach the pdf?

@paulsputer
Copy link
Contributor Author

That's correct, first one - I let JabRef pull out any XMP data, if the pdf doesn't contain any then I manually find the doi enter that and then use JabRef's "Get BibTex from DOI", and if no doi then I just copy paste bibtex from scholar.google.com when it doesn't halt I find this the quickest way to import and have the pdfs attached automatically (and renamed/relocated to a local directory).

The unfortunate problem is that I also have difficulties reproducing this.

@paulsputer
Copy link
Contributor Author

@matthiasgeiger is there a way to set the log level when calling via the command prompt? I had the situation freeze occur but apart from the initial INFO level log no further details displayed.

@matthiasgeiger
Copy link
Member

matthiasgeiger commented Jan 31, 2017

java -jar JabRef.jar --debug should do the trick.

However, I fear that this is caused by a deadlock which will not be displaying any useful information on the console...

(As reported in #2489 (comment))

@paulsputer
Copy link
Contributor Author

Thanks @matthiasgeiger looks like it may be some bad timing / race condition on saving the database. Managed to capture this flurry of messages:

21:05:02.763 [AWT-EventQueue-0] DEBUG net.sf.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running.
21:05:02.771 [AWT-EventQueue-0] DEBUG net.sf.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running.
21:05:02.775 [AWT-EventQueue-0] DEBUG net.sf.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running.
21:05:02.777 [AWT-EventQueue-0] DEBUG net.sf.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running.
21:05:02.779 [AWT-EventQueue-0] DEBUG net.sf.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running.
21:05:02.781 [AWT-EventQueue-0] DEBUG net.sf.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running.
21:05:02.782 [AWT-EventQueue-0] DEBUG net.sf.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running.
21:05:02.785 [AWT-EventQueue-0] DEBUG net.sf.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running.
21:05:02.787 [AWT-EventQueue-0] DEBUG net.sf.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running.
21:05:02.788 [AWT-EventQueue-0] DEBUG net.sf.jabref.logic.autosaveandbackup.BackupManager - Rejecting while another backup process is already running.

@matthiasgeiger
Copy link
Member

Thanks! We will try to check whether we can find the problem now!

@paulsputer
Copy link
Contributor Author

paulsputer commented Feb 3, 2017

Right it has occurred sufficient number of times for me to get the code up and running in debug mode. It appears it is a deadlock as you feared so will add more details in #2489.

paulsputer added a commit to paulsputer/jabref that referenced this issue Feb 3, 2017
+ Caused by attempt to update UI on multiple threads
Siedlerchr pushed a commit that referenced this issue Feb 4, 2017
+ Caused by attempt to update UI on multiple threads
Siedlerchr added a commit that referenced this issue Feb 8, 2017
* upstream/master:
  Fix error when path is no valid directory (#2527)
  French localization: translation of a string
  French menu: localization
  Highlight groups that match any/all of the entries selected in the main table. (#2515)
  Fix % sign cleanup (#2521)
  Revert "Fix repeated escaping of % sign" (#2520)
  Fix repeated escaping of % sign (#2519)
  fix for #2482 deadlock on PDF import (#2517)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants