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

NullPointerException #467

Closed
meisterplanlos opened this issue Feb 8, 2021 · 4 comments
Closed

NullPointerException #467

meisterplanlos opened this issue Feb 8, 2021 · 4 comments

Comments

@meisterplanlos
Copy link

Env:

  • Audiveris: 5.1.0:4687c3527
  • OS: Windows 10 10.0
  • Architecture: amd64
  • Java VM: Java HotSpot(TM) 64-Bit Server VM (build 25.281-b09, mixed mode)
  • OCR Engine: Tesseract OCR, version 3.04.01

Log:
ERROR [IMSLP622774#2-ext (Custom)] TextLine 327 | TextLine with no first word TextLine{ "" conf:NaN}
WARN [IMSLP622774#2-ext (Custom)] SheetStub 845 | Error in performing [SCALE, GRID, HEADERS, STEM_SEEDS, BEAMS, LEDGERS, HEADS, STEMS, REDUCTION, CUE_BEAMS, TEXTS, MEASURES, CHORDS, CURVES, SYMBOLS, LINKS, RHYTHMS, PAGE] java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.NullPointerException
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.audiveris.omr.sheet.SheetStub.doOneStep(SheetStub.java:1111)
at org.audiveris.omr.sheet.SheetStub.reachStep(SheetStub.java:832)
at org.audiveris.omr.sheet.SheetStub.transcribe(SheetStub.java:1026)
at org.audiveris.omr.sheet.ui.BookActions$TranscribeSheetTask.doInBackground(BookActions.java:2094)
at org.audiveris.omr.sheet.ui.BookActions$TranscribeSheetTask.doInBackground(BookActions.java:2077)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at org.audiveris.omr.step.AbstractSystemStep.doitPerSystem(AbstractSystemStep.java:221)
at org.audiveris.omr.step.AbstractSystemStep.doit(AbstractSystemStep.java:101)
at org.audiveris.omr.step.Step.doit(Step.java:184)
at org.audiveris.omr.sheet.SheetStub$4.call(SheetStub.java:1101)
at org.audiveris.omr.sheet.SheetStub$4.call(SheetStub.java:1089)
at java.util.concurrent.FutureTask.run(Unknown Source)
... 3 common frames omitted
Caused by: java.lang.NullPointerException: null
at java.awt.geom.Area.contains(Unknown Source)
at org.audiveris.omr.sheet.StaffManager.getStavesOf(StaffManager.java:640)
at org.audiveris.omr.sheet.StaffManager.getClosestStaff(StaffManager.java:547)
at org.audiveris.omr.sheet.SystemInfo.getClosestStaff(SystemInfo.java:486)
at org.audiveris.omr.sheet.SystemInfo.getStaffAtOrAbove(SystemInfo.java:1027)
at org.audiveris.omr.sig.inter.SentenceInter.assignStaff(SentenceInter.java:170)
at org.audiveris.omr.text.TextBuilder.createInters(TextBuilder.java:483)
at org.audiveris.omr.text.TextBuilder.retrieveSystemLines(TextBuilder.java:260)
at org.audiveris.omr.text.TextsStep.doSystem(TextsStep.java:64)
at org.audiveris.omr.text.TextsStep.doSystem(TextsStep.java:42)
at org.audiveris.omr.step.AbstractSystemStep$1.call(AbstractSystemStep.java:193)
at org.audiveris.omr.step.AbstractSystemStep$1.call(AbstractSystemStep.java:176)
at org.audiveris.omr.step.AbstractSystemStep.doitPerSystem(AbstractSystemStep.java:214)
... 8 common frames omitted

@hbitteur
Copy link
Contributor

hbitteur commented Feb 8, 2021

@meisterplanlos
Could you post your input image file, so that we can reproduce the problem and try to understand what happened?
Thanks in advance.

@meisterplanlos
Copy link
Author

Here you go:
IMSLP622774#2-ext (Custom)

@hallvors
Copy link

Hi @meisterplanlos , I had a null pointer exception with a very similar stack, and looking into it the reason was I had Tesseract 4.x installed and Audiveris is not compatible with 4.x data files.

To fix this, I downloaded the eng, fra and deu files from https://github.com/tesseract-ocr/tessdata/tree/074c37215b01ab8cc47a0e06ff7356383883d775 (the commit for the last tesseract data 3.x) and placed them in a folder named tessdata, then set TESSDATA_PREFIX environment variable to the parent folder of said tessdata. I tested transcribing the picture above before and after, and it works with this config.

@hallvors
Copy link

So this might be considered a duplicate of #273 (but it is closed). #431 is same.

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