Question #692550 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692550

Michael Böhm posted a new comment:
as the original text was lost, here a copy again:

Hi!

I can reproduce with following script:

Reg=Region(884,1291,104,64)
Reg.highlight(2)
for i in range(1,1000):
    print_l(i,":",Reg.text())

on my PC it crashed always(!!!) on counter: 272

Here the log:
[debug (19.08.20, 11:19:17)] Finder2: makeMat: INT_RGB (104x64)
[debug (19.08.20, 11:19:17)] RunTime:loadlib: trying opencv_java342
[debug (19.08.20, 11:19:17)] RunTime:loadLib: opencv_java342.dll already loaded
[debug (19.08.20, 11:19:17)] OCR: start: Tess4J 4.4.1 using Tesseract 4.1.0
[debug (19.08.20, 11:19:17)] RobotDesktop: captureScreen: [884,1291, 104x64]
[debug (19.08.20, 11:19:17)] Image: BufferedImage: (104, 64)
[debug (19.08.20, 11:19:17)] Image: getImage inMemory: __BufferedImage__
[debug (19.08.20, 11:19:17)] Finder2: makeMat: INT_RGB (104x64)
[debug (19.08.20, 11:19:18)] RunTime:loadlib: trying opencv_java342
[debug (19.08.20, 11:19:18)] RunTime:loadLib: opencv_java342.dll already loaded
[debug (19.08.20, 11:19:18)] OCR: start: Tess4J 4.4.1 using Tesseract 4.1.0
[debug (19.08.20, 11:19:18)] RobotDesktop: captureScreen: [884,1291, 104x64]
[debug (19.08.20, 11:19:18)] Image: BufferedImage: (104, 64)
[debug (19.08.20, 11:19:18)] Image: getImage inMemory: __BufferedImage__
[debug (19.08.20, 11:19:18)] Finder2: makeMat: INT_RGB (104x64)
[debug (19.08.20, 11:19:47)] IDE: AbortKey was pressed: aborting all running 
scripts
[debug (19.08.20, 11:19:50)] IDE: AbortKey was pressed: aborting all running 
scripts


Hi! Some more findings:

Using the "reproduce script":
*) It does NOT crash, when OCR finds a text.
*) It crashes also at counter 272 for different Regions/images, however:
      -) it does not crash (also not later) when I select a Region with "easy" 
background (not many patterns)
      -) taking a much bigger region results in no difference
      -) finding a word in the meantime makes no difference, the script always 
crashes at 272
      -) OCR.reset() in the meantime makes no difference, still crash at 272
      -) replace Reg.text() to OCR.readText() - same, still crash at 272
      -) OCR.readLine(), readWord, readChar are also crashing (different count 
(=128)), even tough they
find characters in any pattern.
      -) Doing OCR alternatively on word and on non-word patterns let it crash 
earlier (at 172)
      -) Doing OCR on words only does not crash within 1000 runs
      -) OEM=0, PSM=8 also crash
      -) OEM=0, PSM=2 also crash

I hope I found some useful information.

I was not able to find a workaround (other than avoiding OCR on non
text).

Good luck
Best Regards
Michael

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to