Comment 7 for bug 1013396

Revision history for this message
RaiMan (raimund-hocke) wrote : Re: Java heap space exhausted with long running script

OK, you are the champ ;-)

The problem is caused behind the scenes by the JPanel preparation for the extra option, to show a popup with the image and the skip/retry/fail option in case of FindFailed.

In the case of Region.right(), every call seems to produce a bunch of new JPanels that are never released and so constantly (slowly though) increase the memory usage.

I used the tool "Java Visual VM" (bundled with the JDK 6), to look at the details.

I tried some variants, but there is no other workaround, than to make your own functions, to get a Region right (or above, below, left, nearby) of a given region.

BTW: neither setAutoWaitTimeout(0.0) nor setFindFailedResponse(SKIP) have any influence on the behavior.