[Sugar-devel] PyGame can be run only once assertion error
Manuel Quiñones
manuq at laptop.org
Mon Sep 30 18:07:01 EDT 2013
2013/9/30 James Cameron <quozl at laptop.org>:
> On Mon, Sep 30, 2013 at 04:24:52PM -0300, Manuel Quiñones wrote:
>> 2013/9/30 Alan Jhonn Aguiar Schwyn <alanjas at hotmail.com>:
>> > Good job!
>> >
>> > I have one question about other thing:
>> >
>> > Check this request:
>> >
>> > http://git.sugarlabs.org/sugargame/mainline/merge_requests/1#db3f934e9aea80f9effc98ba68516d69e7856a81-db3f934e9aea80f9effc98ba68516d69e7856a81
>>
>> Looks good, I will rebase it (we use GTK3 now) and push.
>>
>> > That fixes something? Because sometimes I get in the activities log
>> > something like this:
>> >
>> > The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
>> > (Details: serial 953 error_code 9 request_code 130 minor_code 3)
>> > (Note to programmers: normally, X errors are reported asynchronously;
>> > that is, you will receive the error a while after causing it.
>> > To debug your program, run it with the --sync command line
>> > option to change this behavior. You can then get a meaningful
>> > backtrace from your debugger if you break on the gdk_x_error() function.)
>>
>> I don't think that this error is a consequence of not connecting the
>> visibility_notify_event or screen-changed event. Looks more a
>> consequence of embedding the PyGame display in a GTK window, which
>> according to the PyGame documentation has side effects:
>>
>> http://www.pygame.org/docs/ref/display.html#pygame.display.init
>>
>> "Be aware that there can be many strange side effects when running in
>> an embedded display."
>
> Hmm, I doubt this error would be part of what they are talking about
> there.
>
> The error means that the X server has received a request to draw, but
> the request mentions a Pixmap or Window parameter that the X server
> doesn't know about. It almost always means a programming error of
> some sort, by the program sending the X requests; which in this case
> will be either SDL or GTK.
>
> Not finding the cause of this error could lead to problems later on.
>
> I would first check to see exactly when the error appears in the
> activity log (using tail --follow).
>
> Then I would discover if the error occurs when the Pygame program is
> run without sugargames.
>
> Then I would remove actions that cause drawing until the error stops,
> in order to learn what action is causing the error.
+1 to further investigation. I was just guessing too.
--
.. manuq ..
More information about the Sugar-devel
mailing list