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

PDF importation freezes when filename contains a curly bracket #2577

Closed
programagor opened this issue Feb 20, 2017 · 4 comments
Closed

PDF importation freezes when filename contains a curly bracket #2577

programagor opened this issue Feb 20, 2017 · 4 comments

Comments

@programagor
Copy link

When I try to import PDFs via the Quality -> Find unlinked files, the process freezes when a PDF containing a curly bracket ( "{" or "}" ) in its filename is encountered.

JabRef version 4.0.0-dev (snapshot 2017-02-18) on Win 10 (1607)

Steps to reproduce:

  1. Open Quality -> Find unlinked files
  2. Select a folder containing at least one PDF with a curly bracket in its name
  3. Scan directory
  4. Make sure the offending file is selected
  5. Apply

After the last step, the process goes through all valid files (showing "Importing into database... M of N"), but freezes the whole JabRef once it gets to the offending file.

@lenhard
Copy link
Member

lenhard commented Feb 21, 2017

Probably related to #2439. It seems like our pdf-handling code has problems with curly braces.

@bernhard-kleine
Copy link

bernhard-kleine commented Feb 25, 2017

Not confirmed! I am working with 3.8.2 and snapshots JabRef 4.0.0-dev--snapshot--2017-02-24--master--83219486e and others before, I didnot have issues with braces. Just tested

@Siedlerchr
Copy link
Member

Siedlerchr commented Feb 27, 2017

I could reproduce the bug:
But it is not a problem of the braces, it happens when you an "unselect all" and then only select one file

21:52:04.655 [JabRef CachedThreadPool] ERROR org.jabref.FallbackExceptionHandler - Uncaught exception Occurred in Thread[JabRef CachedThreadPool,6,main]
java.lang.IndexOutOfBoundsException: Cannot get at -1 on list of size 2
	at ca.odell.glazedlists.TransformedList.get(TransformedList.java:105) ~[glazedlists_java15-1.9.1.jar:1.9.1]
	at org.jabref.gui.maintable.MainTable.getEntryAt(MainTable.java:347) ~[bin/:?]
	at org.jabref.gui.externalfiles.DroppedFileHandler.linkPdfToEntry(DroppedFileHandler.java:172) ~[bin/:?]
	at org.jabref.pdfimport.PdfImporter.importPdfFilesInternal(PdfImporter.java:159) ~[bin/:?]
	at org.jabref.pdfimport.PdfImporter.importPdfFiles(PdfImporter.java:113) ~[bin/:?]
	at org.jabref.gui.importer.EntryFromPDFCreator.createBibtexEntry(EntryFromPDFCreator.java:64) ~[bin/:?]
	at org.jabref.gui.importer.EntryFromFileCreator.createEntry(EntryFromFileCreator.java:90) ~[bin/:?]
	at org.jabref.gui.importer.EntryFromFileCreatorManager.addEntriesFromFiles(EntryFromFileCreatorManager.java:131) ~[bin/:?]
	at org.jabref.gui.FindUnlinkedFilesDialog.lambda$2(FindUnlinkedFilesDialog.java:526) ~[bin/:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]

@Siedlerchr
Copy link
Member

@programagor The issue is not related to the filename, but happens when you select a pdf and don't create an entry from it (just select nothing), then it throws an exception which breaks JabRef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants