← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #692550]: IDE crash when OCR does not find anything. Only 272 unsuccessful calls of text() possible

 

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

Michael Böhm posted a new comment:
Hi!
actually: using JSYS.gc()  at the script makes no difference.

following script stalls at loop #294  (which is about 10 later than
without gc() )

import java.lang.System as JSYS # at beginning of main script
def OCRTest1():
    global jrt
    Reg=selectRegion()
    Reg.highlight(2)
    for i in range(1,3000):
        txt=Reg.text()
        if i % 100== 0: 
            print_l(i,": GC!",ExtractAlphanumeric_all(txt),len(txt),"free:", int(jrt.freeMemory()/(1024 * 1024)))
            JSYS.gc() # at loop start or loop end
        if i % 2 == 0:
            print_l(i,":",ExtractAlphanumeric_all(txt),len(txt),"free:", int(jrt.freeMemory()/(1024 * 1024)))

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