autorelease pool page corrupted

Jake Wang <[email protected]> Tue, 22 Oct 2013 21:49:30 +0800
Newsgroups gmane.comp.python.pyobjc.devel
Message-ID <CALtF252bzMpiSOi_cTQkj2tKjTTkixEajh4m1uJmJ0rSMj2qNQ@mail.gmail.com>
Hi,

I used PyObjc in a python application for monitoring some global events:

class MacOSXEventMonitor():
    def init(self):
        log.debug("Initializing events monitor for Mac OS X...")

        self._observer =
NSEvent.addGlobalMonitorForEventsMatchingMask_handler_(
            NSLeftMouseDownMask
            | NSLeftMouseUpMask
            | NSRightMouseDownMask
            | NSRightMouseUpMask
            | NSMouseMovedMask
            | NSLeftMouseDraggedMask
            | NSRightMouseDraggedMask
            | NSMouseEnteredMask
            | NSMouseExitedMask
            | NSScrollWheelMask
            | NSKeyDownMask
            | NSKeyUpMask
            | NSAlphaShiftKeyMask
            | NSShiftKeyMask
            | NSControlKeyMask
            | NSAlternateKeyMask
            | NSCommandKeyMask
            | NSNumericPadKeyMask
            | NSHelpKeyMask
            | NSFunctionKeyMask
            | NSFlagsChangedMask, self.handleEvent)

    def handleEvent(self, event):
        # NSLog(u"%@", event)

    def stop(self):
        NSEvent.removeMonitor_(self._observer)

It is strange that each time when I exit the application, the following
error printed in console:

objc[8775]: autorelease pool page 0x1009e0000 corrupted
  magic 0x1009ff00 0xc0000000 0x00000000 0x60000000
  pthread 0x7fff7e917180

Also a system dialog shown (please see the screenshot attached).

Anyone encountered this before? Much appreciate for any suggestions/help.

Thanks,
Jake

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk

_______________________________________________
Pyobjc-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyobjc-dev