Application crashing with Bad Window error only on OLPC 767 build

Wade Brainerd wadetb at gmail.com
Thu Feb 19 12:01:56 EST 2009


Hey there,
I think you're in fairly undocumented territory trying to develop a "real"
activity using libsugarize.so.  But to your credit, you seem to have a
pretty good understanding of how the X protocol works (beyond mine anyway!).

Have you seen this page before?  It describes how Sugar interacts with
activities at the X window level and may help you remove the need for
libsugarize.so.
http://wiki.laptop.org/go/Low-level_Activity_API

Also, for debugging X errors like the Bad Window error in C programs, you
might gain some use from this page.  It will allow you to synchronize the X
protocol and to then get a stack trace at the exact location which generates
the error.
http://www.rahul.net/kenton/perrors.html

Personally I have seen errors like this from PyGTK, but it usually has to do
with using some API outside the normal boundaries - like a Drawable blit
with a negative area rectangle for example.

Hope this helps!

Wade




2009/2/19 shivaprasad javali <jbsp72 at gmail.com>

> Some more progress. I had used libsugarize.so from this link
> http://www.catmoran.com/olpc/libsugarize.so to sugarise my activity. When
> I first started developing the activity, it wouldn't run on the XO unless I
> preloaded this so. On a hunch I removed this preload and now my application
> launches on the XO when run from the activity circle.
>
> It works fine after this except for when I quit my application. If I don't
> preload this so then when I close my application it doesn't close at once.
> It goes to the activity icon blinking state for about half a minute before
> it closes. When I had the preloaded the so on the older sugar builds, my
> application would quit almost immediately after closing the application and
> I wouldn't get that activity icon after closing. Can anybody help me figure
> out how to solve this?
>
> Thanks
> jbsp72
>
>
>
> On Wed, Feb 18, 2009 at 8:49 PM, shivaprasad javali <jbsp72 at gmail.com>wrote:
>
>> Finally some more information about what is happening. The application
>> that I am running previously didn't use any UI packages and worked directly
>> with windows through X calls. I had to add a xulrunner based browser to it
>> which accepted only a gtk window and couldn't work with an X window
>> directly. So I added the code for just the browser to use gtk.
>>
>> I switched to the old code ( pre gtk) and it works fine on the XO with 767
>> sugar build. Then I tried adding the gtk_init() call to the initialization
>> sequence and it crashed immediately. I guess the problem has something to do
>> with both gtk and X windows working together.( Although I don't get why the
>> problem should persist only when I launch my app from the activity bar and
>> not when I run it from the terminal) . Can anybody help me figure out what
>> the problem might be?
>>
>> Thanks
>> jbsp72
>>
>>
>> On Wed, Feb 18, 2009 at 5:49 AM, S Page <info at skierpage.com> wrote:
>>
>>> (private response, but if you learn more re-send to OLPC devel list)
>>>
>>> Do you see anything in the logs after enabling warnings?
>>> See http://wiki.laptop.org/go/Attaching_Sugar_logs_to_tickets
>>>
>>> Then there's general debugging on Linux using strace, gdb, etc.  I don't
>>> see much on the wiki about that.
>>>
>>>
>>> shivaprasad javali wrote:
>>>
>>>>        I am trying to port an application to OLPC. It has a xulrunner
>>>> based browser which draws into a gtk window. It runs perfectly on OLPC
>>>> builds 708 and 711 , but when I try to run it on 767 build it crashes with
>>>> an error in a X window system error with error code 3( Bad Window).
>>>>
>>>>        Also the crash occurs only when I launch the activity from the
>>>> Activity bar. If open the Terminal activity and run it from there it works
>>>> fine. It crashes only when I run it from the Activity bar and on the 767
>>>> build. Could any body tell me what changed from build 711 to 767 which made
>>>> my application to crash?
>>>>
>>>> Thanks
>>>> jbsp72
>>>>
>>>
>>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.laptop.org
> http://lists.laptop.org/listinfo/devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/devel/attachments/20090219/94f1f52b/attachment.htm 


More information about the Devel mailing list