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

Medline search throws Exception and hangs (Jabref 3.6) #2110

Closed
cookpa opened this issue Oct 3, 2016 · 8 comments
Closed

Medline search throws Exception and hangs (Jabref 3.6) #2110

cookpa opened this issue Oct 3, 2016 · 8 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs fetcher status: waiting-for-feedback The submitter or other users need to provide more information about the issue

Comments

@cookpa
Copy link

cookpa commented Oct 3, 2016

JabRef version 3.6 on Mac OS X El Capitan

Steps to reproduce:

  1. Open web search
  2. Enter "Cook PA" (with or without quotes)
  3. It says "Number of references 105. Number to fetch? [click OK]
  4. The blue progress bar fills up, but the references never appear

Sometimes I can run a query and some references will appear, but then it hangs. For example, if I search "Tustison [au]" (no quotes), I get some results but then it hangs at about 25% progress. The hangups are accompanied by Exceptions in the console window:

Exception in thread "JabRef CachedThreadPool" java.lang.NullPointerException
    at net.sf.jabref.logic.importer.fileformat.MedlineImporter.addArticleInformation(MedlineImporter.java:516)
    at net.sf.jabref.logic.importer.fileformat.MedlineImporter.parseArticle(MedlineImporter.java:341)
    at net.sf.jabref.logic.importer.fileformat.MedlineImporter.importDatabase(MedlineImporter.java:151)
    at net.sf.jabref.gui.importer.fetcher.MedlineFetcher.fetchMedline(MedlineFetcher.java:226)
    at net.sf.jabref.gui.importer.fetcher.MedlineFetcher.processQuery(MedlineFetcher.java:199)
    at net.sf.jabref.gui.importer.fetcher.GeneralFetcher.lambda$actionPerformed$5(GeneralFetcher.java:223)
    at net.sf.jabref.gui.importer.fetcher.GeneralFetcher$$Lambda$191/1683863109.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

IEEE and Springer search don't seem to have this problem.

I can get specific things from Medline, for example if I enter a single PMID I can get the result. But larger searches sometimes fail with the above error. I had thought it was due to Medline refusing large requests, but I can enter some very general terms (eg searching my last name without initials) and get hundreds of results each time.

I tried the same thing on 3.0 and it works correctly, I can search "Cook PA [au]" and the results show up as expected.

@tobiasdiez
Copy link
Member

@tschechlovdev could you please have a look as you recently rewrote the MedlineImporter in #1479. Apparently the issn is null https://github.com/JabRef/jabref/blame/ee688c44765f11344226da531b63f9df345a6585/src/main/java/net/sf/jabref/logic/importer/fileformat/MedlineImporter.java#L515

@matthiasgeiger matthiasgeiger added bug Confirmed bugs or reports that are very likely to be bugs fetcher labels Oct 3, 2016
@Siedlerchr
Copy link
Member

Siedlerchr commented Oct 3, 2016

It would be interesting to see if the bug is still present in the latest dev version after the rewrite
Edit// I could confirm the bug in the latest dev version, too.

Siedlerchr added a commit that referenced this issue Oct 3, 2016
@Siedlerchr
Copy link
Member

I just found the error and added a quick fix for it. Works now as expected

@cookpa
Copy link
Author

cookpa commented Oct 3, 2016

Wonderful, thanks.

@Siedlerchr
Copy link
Member

@cookpa You can use the latest development from here, it includes the fix. http://builds.jabref.org/medlineIssn/
If you note further errors, please report/open a new issue (if not the same)

@Siedlerchr Siedlerchr added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Oct 3, 2016
@cookpa
Copy link
Author

cookpa commented Oct 4, 2016

Thanks, I downloaded JabRef_macos_3_7dev--snapshot--2016-10-03--medlineIssn--dc77ad8.dmg.

It solves the original problem but now the search hangs after the first successful search. I searched Medline for "Tustison [au]". It reported 53 results, but the number to retrieve box was blank so I entered 53. It completed successfully and I could import the citations.

Unfortunately, if I try a subsequent search, the program hangs. It displays the number of results dialog but after I click OK, Jabref becomes unresponsive. I have to force quit, so I can't get to the error console.

I've tried this with a few searches. The initial search works fine, and doesn't show the old error. But then I can't search again.

@Siedlerchr
Copy link
Member

Thanks for your report! The problem with the consecutive searches seems to be a more general problem with the new websearch code. Possible the same as in #2034 (comment)

tobiasdiez pushed a commit that referenced this issue Oct 4, 2016
* Fix NPE in issn, Fix for #2110

* Add new test for journal with no ISSN
@tobiasdiez
Copy link
Member

Fixed in #2113.

zesaro pushed a commit to zesaro/jabref that referenced this issue Nov 22, 2016
* Fix NPE in issn, Fix for JabRef#2110

* Add new test for journal with no ISSN
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 fetcher status: waiting-for-feedback The submitter or other users need to provide more information about the issue
Projects
None yet
Development

No branches or pull requests

4 participants