#10683 NORM Not Tri: Sugar crashes when an activity creates/destroys windows quickly
Zarro Boogs per Child
bugtracker at laptop.org
Thu Feb 10 10:53:52 EST 2011
#10683: Sugar crashes when an activity creates/destroys windows quickly
-----------------------------+----------------------------------------------
Reporter: martin.langhoff | Owner: martin.langhoff
Type: defect | Status: new
Priority: normal | Milestone: Not Triaged
Component: sugar | Version: 1.5/1.0 Software Build os860 aka 10.1.3
Keywords: | Next_action: never set
Verified: 0 | Deployment_affected:
Blockedby: | Blocking:
-----------------------------+----------------------------------------------
When an activity creates/destroys windows quickly, and the windows are
identified correctly so that they trigger _window_opened_cb(), we have
race conditions between the test for a valid wnd handle, and querying the
window.
When the window is destroyed right after getting the window handle, but
before we query it, Sugar crashes. shell.log shows a BadWindow error.
This problem has been spotted with an AdobeAIR application that uses
libsugarize.so .
* Thanks to libsugarize, the windows have the right name/class so they
trigger the callback. Removing libsugarize avoids the crash, but then the
window is not recognized.
* This AdobeAIR app goes through 4 windows quickly during startup. This
can be seen in debug mode -- the callback is triggered 4 times. We are
investigating with the developer whether this can be avoided. It may be
that the code uses "loader" SWF files; or it may be that the AdobeAIR
runtime is coded to create/destroy windows during startup.
It seems impossible to completely close the race condition (at least at
the python layer), but additional checks and minor code changes in sugar
and sugar-toolkit can narrow down the window significantly.
--
Ticket URL: <http://dev.laptop.org/ticket/10683>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list