sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #06084
Re: [Question #174047]: Exception in thread "Thread-13" java.lang.OutOfMemoryError: Java heap space
Question #174047 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/174047
Demian Godon posted a new comment:
Below is the start and stop observer code. Can you advise on our usage
of observers?
# set up the launch dialog handlers (helper method called from launchApp method)
def __setUpLaunchDialogHandlers(self, maxWaitTime=200):
region = Screen() # get reference to OS Window
region.onAppear( self.getAppImgPath() + "eulaDialog.png", self.__eulaDialogFound )
region.onAppear( self.getAppImgPath() + "signInDialog.png", self.__signInDialogFound )
region.observe( maxWaitTime, True )
self.__addObserver( region )
# add a new region that is being observed for class to track
def __addObserver(self, region):
tempObservers = self.__getObservers()
tempObservers.append(region)
self.__setObservers(tempObservers) // just adds region/observer to list
# stop any observers open on regions tracking
def __stopObservers(self):
if len(self.__getObservers()):
num = 1
print "stopping " + str(len(self.__getObservers())) + " observers"
for region in self.__getObservers():
print "observer " + str(num) + ": stopping..."
region.stopObserver()
num += 1
// self.__setObservers([]) - this line was not in our code, but seems like we should add it
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.