Possible bug in _gdi_ ?

Hey. I'm currently working on a third year B.Comp.Sci. project which is
heavily using wxPython, and we're running into some strange problems.

The worst of these are seemingly non-deterministic crashes we're getting
in various places: trying to open certain dialogs, and closing the
application, mostly. It's also annoying in that the crashes aren't
predictable. Sometimes they happen, sometimes they don't.

It's at the point where I've resorted to tracing every last function
call and line of executed code. I may come up with more, but this is
the first I have noticed...

Here's the tail-end of the call stack:

          call
E:\Bin\Python24\Lib\site-packages\wx-2.6-msw-unicode\wx\_gdi.py:544 __init__
           call E:\Bin\Python24\lib\encodings\cp1252.py:20 decode
           return E:\Bin\Python24\lib\encodings\cp1252.py:22 decode ->
(u'F:\\Personal\\Documents\\Uni\\csci\\321\\repository\\Builder\\trunk\\src\\py-src\\res\\images\\builder-128.png',
97)

At this point, the program crashed with an access violation. The lines
of code executed looks like this:

E:\Bin\Python24\Lib\site-packages\wx-2.6-msw-unicode\wx\_gdi.py:550 __init__
E:\Bin\Python24\lib\encodings\cp1252.py:22 decode

I honestly don't know what to do with this. It looks like cp1252 is
decoding something, returning it to the method call in _gdi_ (which I
obviously can't debug), and then barfing. Any help whatsoever would be
greatly appreciated!

Also, if you need any extra information, just tell me what you need and
how to get it. I need this solved as soon as possible.

Just so you know, I'm using the latest binary installers for Python and
wxPython.

    -- Daniel

If you're up to it, you can build debug versions of wxWidgets,
wxPython, and Python, which will allow you step into the C++ code with
the debugger of your choice.

cp1252 is decoding the filename into Windows code page 1252, and then
passing that the the __init__ function for wxBitmap. I have no idea
why it you'd be getting intermittent errors - everything I can think
of here should be reproducible.

Try setting a Python breakpoint in the __init__ function and
inspecting the arguments being passed in.

···

On 8/18/05, Daniel Keep <daniel.keep.lists@gmail.com> wrote:

Hey. I'm currently working on a third year B.Comp.Sci. project which is
heavily using wxPython, and we're running into some strange problems.

The worst of these are seemingly non-deterministic crashes we're getting
in various places: trying to open certain dialogs, and closing the
application, mostly. It's also annoying in that the crashes aren't
predictable. Sometimes they happen, sometimes they don't.

It's at the point where I've resorted to tracing every last function
call and line of executed code. I may come up with more, but this is
the first I have noticed...

Here's the tail-end of the call stack:

          call
E:\Bin\Python24\Lib\site-packages\wx-2.6-msw-unicode\wx\_gdi.py:544 __init__
           call E:\Bin\Python24\lib\encodings\cp1252.py:20 decode
           return E:\Bin\Python24\lib\encodings\cp1252.py:22 decode ->
(u'F:\\Personal\\Documents\\Uni\\csci\\321\\repository\\Builder\\trunk\\src\\py-src\\res\\images\\builder-128.png',
97)

At this point, the program crashed with an access violation. The lines
of code executed looks like this:

E:\Bin\Python24\Lib\site-packages\wx-2.6-msw-unicode\wx\_gdi.py:550 __init__
E:\Bin\Python24\lib\encodings\cp1252.py:22 decode

I honestly don't know what to do with this. It looks like cp1252 is
decoding something, returning it to the method call in _gdi_ (which I
obviously can't debug), and then barfing. Any help whatsoever would be
greatly appreciated!

Also, if you need any extra information, just tell me what you need and
how to get it. I need this solved as soon as possible.

Just so you know, I'm using the latest binary installers for Python and
wxPython.

    -- Daniel