Re: [Sugar-devel] Activity crashes when using libsugarize.so
On 02/10/2011 11:55 AM, Martin Langhoff wrote: On Thu, Feb 10, 2011 at 8:50 AM, Martin Langhoff wrote: Indeed. At this point, we think the crash comes not so much from libsugarize but from changing windows very quickly during startup. Wrtiteup of my diagnosis and patches at http://dev.laptop.org/ticket/10683 Note that the patches only shrink the window. Combine them, and the crash (with this specific program, this hw, this load profile) goes away. Mostly :-) Not sure if there's a way to ask gtk.gdk& wnck to query a window in a sane manner. Maybe this race is bad API in those bindings, maybe it's just an X11 protocol gotcha. Where's jg when we need him? ;-) m For reference: We just found that master has a catch for that issue: http://bugs.sugarlabs.org/ticket/1123 http://git.sugarlabs.org/sugar-toolkit/mainline/commit/d304f72872fa346dd2c3cedd1d3e508a3aeb5107 Regards, Simon ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activity crashes when using libsugarize.so
On Thu, Feb 10, 2011 at 8:50 AM, Martin Langhoff wrote: > Indeed. At this point, we think the crash comes not so much from > libsugarize but from changing windows very quickly during startup. Wrtiteup of my diagnosis and patches at http://dev.laptop.org/ticket/10683 Note that the patches only shrink the window. Combine them, and the crash (with this specific program, this hw, this load profile) goes away. Mostly :-) Not sure if there's a way to ask gtk.gdk & wnck to query a window in a sane manner. Maybe this race is bad API in those bindings, maybe it's just an X11 protocol gotcha. Where's jg when we need him? ;-) m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activity crashes when using libsugarize.so
On Thu, Feb 10, 2011 at 3:54 AM, Bert Freudenberg wrote: > libsugarize only works for "well-behaved" simple X11 programs. It relies on > certain functions being called that have been redirected to the library's > overrides. It's a preload-hack, not a proper library, so I'd expect many > programs not to work correctly. Indeed. At this point, we think the crash comes not so much from libsugarize but from changing windows very quickly during startup. If we don't use libsugarize, Sugar doesn't recognize the window as interesting, and doesn't get the callbacks. I have a fixed-up libsugarize that doesn't cache the call results in a static var -- it was caching the window handle too. Not sure why it is structured like that, it doesn't seem to make sense with apps that may switch windows. If we do use libsugarize, Sugar gets the callbacks (jarabe.model.shell._window_opened_cb()) and crashes querying the window that was valid a ms ago, and now is no longer valid. This app (Adobe AIR stuff) seems to trigger 4 window switches (that trigger the callback) during startup. The crash doesn't always happen -- you gotta get the timining "right" for the race condition. We're tracing this to strengthen Sugar in the face of "flipping windows" -- so it won't crash. But it won't be able to keep track of the correct window for the app either. On the other side of the fence, I'm working with the "upstream" on the activity side so that it doesn't flip windows faster than the eye can see. Where the eye has 'persistence of vision', xorg has race conditions. Progress? m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activity crashes when using libsugarize.so
Bert wrote > libsugarize only works for "well-behaved" simple X11 programs Hmmm. For me, libsugarize.so has worked even with "complex" X11 programs. I launch most of my third-party (Linux) applications from the command line -- but some number of them (e.g., Chrome, Labquest) I've "sugarized" so that others can launch them through Home View. Even though these applications are not "simple", I've so far not encountered any problems: I point activity.info to the bash "sugarize.script" (rather than to the compiled "sugarize.c") and make sure the bash script has the line export LD_PRELOAD="$SUGAR_BUNDLE_PATH/lib/libsugarize.so" I then add in lines to the end of the bash script which set up the application's variables, then launch the application's executable. mikus p.s. "Non-well-behaved" programs (perhaps because they might open multiple windows) can leave behind "gray circles" in Frame when they close. I wish Sugar would automatically clean out icons from Frame once the X11 window|session (which that icon represents) has gone away. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activity crashes when using libsugarize.so
On 09.02.2011, at 19:08, Martin Langhoff wrote: > On Wed, Feb 9, 2011 at 10:17 AM, Martin Langhoff > wrote: >> The solution is to grab the src and recompile. That .so is likely old. > > Actually, not so much of a solution. Still getting some crashes. May > be related to the program misbehaving. libsugarize only works for "well-behaved" simple X11 programs. It relies on certain functions being called that have been redirected to the library's overrides. It's a preload-hack, not a proper library, so I'd expect many programs not to work correctly. - Bert - ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activity crashes when using libsugarize.so
On Wed, Feb 9, 2011 at 10:17 AM, Martin Langhoff wrote: > The solution is to grab the src and recompile. That .so is likely old. Actually, not so much of a solution. Still getting some crashes. May be related to the program misbehaving. grr. m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activity crashes when using libsugarize.so
On Wed, Feb 9, 2011 at 12:27 PM, Thomas C Gilliard wrote: > I do not know where libsugarize.c is stored. Just follow the link in my email. m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activity crashes when using libsugarize.so
I just wrote this up on the wiki : http://wiki.sugarlabs.org/go/Category_talk:Live_USB#Sugarize_an_application_for_use_in_a_SoaS_USB I do not know where libsugarize.c is stored. Hopefully it will be made available to us. I modified the wget paths to reflect the present repo. (I have not tested it, yet) As I remember it worked for liveusb-creator on soas-v2 and v3 but made 2 icons on the sugar frame. Thus it was only partially successful. (Icon on F3 ring worked though.) Tom Gilliard satellit on IRC freenode #sugar Martin Langhoff wrote: On Wed, Feb 9, 2011 at 11:08 AM, Thomas C Gilliard wrote: Last year I experimented with sugarize and stored the files required in a local repo: Right. Could you please change your notes to recommend that people... - download libsugarize.c and compile it on the target OS instead of downloading yours? - use the shell version of "sugarize" instead of the C version? The libsugarize.so issue is the main one. It probably only works reliably on the specific Fedora version it was built on. cheers, m ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activity crashes when using libsugarize.so
On Wed, Feb 9, 2011 at 11:45 AM, Jon Nettleton wrote: > Any reason not to package both of these into an rpm and provide it in > the OLPC repos? Missing: a maintainer who knows and understands that it does, a maintainer that has time to do maintain it. m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activity crashes when using libsugarize.so
On Wed, Feb 9, 2011 at 11:08 AM, Thomas C Gilliard wrote: > Last year I experimented with sugarize and stored the files required in a > local repo: Right. Could you please change your notes to recommend that people... - download libsugarize.c and compile it on the target OS instead of downloading yours? - use the shell version of "sugarize" instead of the C version? The libsugarize.so issue is the main one. It probably only works reliably on the specific Fedora version it was built on. cheers, m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Activity crashes when using libsugarize.so
Last year I experimented with sugarize and stored the files required in a local repo: copied from: http://www.catmoran.com/olpc/#sugxterm--- http://people.sugarlabs.org/Tgillard/sugarize/ where I have a repo of the required files: http://people.sugarlabs.org/Tgillard/sugarize/libsugarize.so Icons: http://people.sugarlabs.org/Tgillard/sugarize/plain.svg http://people.sugarlabs.org/Tgillard/sugarize/l.svg http://people.sugarlabs.org/Tgillard/sugarize/ff.svg Look at http://people.sugarlabs.org/Tgillard/sugarize/wiki-sugarize.txt which explains the processes and paths I found that seemed to work. Tom Gilliard satellit http://www.catmoran.com/olpc/#sugxterm--- Today: When the folks at sugerlabs.org asked if they could copy my cheat sheet to their wiki, I told them they could under a few conditions. One of those conditions was that they host the files on their own server, specifically because I wasn't planning to keep hosting them much longer. Unfortunately, it seems that they didn't keep up their end of the bargain. If I happen to find a copy of the original files (doubtful, I don't have the OLPCs anymore) I'll post the source here. If that happens, make copies because this domain is going away when the current registration expires! I copied these files on: 23-Feb-2010 (with permission) Martin Langhoff wrote: If a newcomer to Sugar follows the instructions at http://wiki.sugarlabs.org/go/Running_Linux_Applications_Under_Sugar to use Albert Calahan's libsugarize.so from a precompiled binary, lots of funny things happen. X.org crashes with BadWindow at apparently random times -- some of the crashes can be tracked down to specific conditions, like opening the activity right after Sugar has started. The solution is to grab the src and recompile. That .so is likely old. I added a rough note in the wiki indicating that a build from src is needed, but the overall page needs a reorg. Posting here to feed google, increase awareness, and in case anyone has the time & motivation to tidyup the wiki... cheers, m ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Activity crashes when using libsugarize.so
If a newcomer to Sugar follows the instructions at http://wiki.sugarlabs.org/go/Running_Linux_Applications_Under_Sugar to use Albert Calahan's libsugarize.so from a precompiled binary, lots of funny things happen. X.org crashes with BadWindow at apparently random times -- some of the crashes can be tracked down to specific conditions, like opening the activity right after Sugar has started. The solution is to grab the src and recompile. That .so is likely old. I added a rough note in the wiki indicating that a build from src is needed, but the overall page needs a reorg. Posting here to feed google, increase awareness, and in case anyone has the time & motivation to tidyup the wiki... cheers, m -- martin.langh...@gmail.com mar...@laptop.org -- Software Architect - OLPC - ask interesting questions - don't get distracted with shiny stuff - working code first - http://wiki.laptop.org/go/User:Martinlanghoff ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel