[wxPython] Prot error Problem in wxwindows/wxpython.

I tryed to track down a really odd problem, so I decided to build debug builds of

python (2.0)
wxWindows (2.2.5)
wxPython (2.2.5)

If you execute this code in the debug python shell python_d.exe

import sys
sys.path.append( sys.prefix + r'\wxPython\demo' )
import Main
Main.main()

-> wxPython demo crashes instantly with following Info:

MSC++ DEBUG LIBRARY
DEBUG ASSERTION FAILED
File: dbgdel.cpp
Line: 47

_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)

···

----------------------------------------------------------------------------
This occurs after the file in wxwindows which does this is:

crash in file src\msw\image.cpp in function _wrap_new_wxImage() in (at the end):
    if (_obj0)
        delete _arg0; <--- here

----------------------------------

with this stack traceback:

Stack traceback:
operator delete(void * 0x01240808) line 47 + 81 bytes
wxString::`scalar deleting destructor'(unsigned int 1) + 35 bytes
_wrap_new_wxImage(_object * 0x00000000, _object * 0x0175d8b4, _object *
0x0079b4f4) line 909 + 43 bytes
call_builtin(_object * 0x01320db8, _object * 0x0175d8b4, _object *
0x0079b4f4) line 2644 + 15 bytes
PyEval_CallObjectWithKeywords(_object * 0x01320db8, _object * 0x0175d8b4,
_object * 0x0079b4f4) line 2618 + 17 bytes
builtin_apply(_object * 0x00000000, _object * 0x0175d90c) line 88 + 17 bytes
call_builtin(_object * 0x00793de0, _object * 0x0175d90c, _object *
0x00000000) line 2650 + 11 bytes
PyEval_CallObjectWithKeywords(_object * 0x00793de0, _object * 0x0175d90c,
_object * 0x00000000) line 2618 + 17 bytes
eval_code2(PyCodeObject * 0x0163adb8, _object * 0x0162b2d4, _object *
0x00000000, _object * * 0x01730580, int 3, _object * * 0x00000000, int 0,
_object * * 0x00000000, int 0, _object * 0x01640774) line 1953 + 26 bytes
call_function(_object * 0x01640844, _object * 0x0173056c, _object *
0x00000000) line 2778 + 73 bytes
PyEval_CallObjectWithKeywords(_object * 0x0079b49c, _object * 0x0175c87c,
_object * 0x00000000) line 2616 + 17 bytes
PyInstance_New(_object * 0x01640774, _object * 0x0175c87c, _object *
0x00000000) line 463 + 17 bytes
call_builtin(_object * 0x01640774, _object * 0x0175c87c, _object *
0x00000000) line 2653 + 17 bytes
PyEval_CallObjectWithKeywords(_object * 0x01640774, _object * 0x0175c87c,
_object * 0x00000000) line 2618 + 17 bytes
eval_code2(PyCodeObject * 0x0137a8a0, _object * 0x0137cb3c, _object *
0x00000000, _object * * 0x014ee738, int 1, _object * * 0x014ee73c, int 0,
_object * * 0x00000000, int 0, _object * 0x00000000) line 1953 + 26 bytes
eval_code2(PyCodeObject * 0x0170f360, _object * 0x0137cb3c, _object *
0x00000000, _object * * 0x01731250, int 2, _object * * 0x017431f8, int 3,
_object * * 0x013b8a38, int 6, _object * 0x0137ce94) line 1853 + 88 bytes
call_function(_object * 0x0137cf64, _object * 0x0173123c, _object *
0x007b53ac) line 2778 + 73 bytes
PyEval_CallObjectWithKeywords(_object * 0x0173a1ec, _object * 0x007c92b4,
_object * 0x007b53ac) line 2616 + 17 bytes
PyInstance_New(_object * 0x0137ce94, _object * 0x007c92b4, _object *
0x007b53ac) line 463 + 17 bytes
call_builtin(_object * 0x0137ce94, _object * 0x007c92b4, _object *
0x007b53ac) line 2653 + 17 bytes
PyEval_CallObjectWithKeywords(_object * 0x0137ce94, _object * 0x007c92b4,
_object * 0x007b53ac) line 2618 + 17 bytes
eval_code2(PyCodeObject * 0x007fea40, _object * 0x007c9a9c, _object *
0x00000000, _object * * 0x007c8c40, int 1, _object * * 0x00000000, int 0,
_object * * 0x00000000, int 0, _object * 0x01729b4c) line 1953 + 26 bytes
call_function(_object * 0x01710564, _object * 0x007c8c2c, _object *
0x00000000) line 2778 + 73 bytes
PyEval_CallObjectWithKeywords(_object * 0x007f1ecc, _object * 0x0079ae8c,
_object * 0x00000000) line 2616 + 17 bytes
__wxStart(_object * 0x00000000, _object * 0x007c3eac) line 184 + 16 bytes
call_builtin(_object * 0x00807b40, _object * 0x007c3eac, _object *
0x00000000) line 2644 + 15 bytes
PyEval_CallObjectWithKeywords(_object * 0x00807b40, _object * 0x007c3eac,
_object * 0x00000000) line 2618 + 17 bytes
eval_code2(PyCodeObject * 0x013789a8, _object * 0x01376664, _object *
0x00000000, _object * * 0x01730e18, int 2, _object * * 0x00000000, int 0,
_object * * 0x0167b120, int 2, _object * 0x015c82ac) line 1953 + 26 bytes
call_function(_object * 0x015c850c, _object * 0x01730e04, _object *
0x00000000) line 2778 + 73 bytes
PyEval_CallObjectWithKeywords(_object * 0x007b365c, _object * 0x007bcb9c,
_object * 0x00000000) line 2616 + 17 bytes
PyInstance_New(_object * 0x01729b4c, _object * 0x007bcb9c, _object *
0x00000000) line 463 + 17 bytes
call_builtin(_object * 0x01729b4c, _object * 0x007bcb9c, _object *
0x00000000) line 2653 + 17 bytes
PyEval_CallObjectWithKeywords(_object * 0x01729b4c, _object * 0x007bcb9c,
_object * 0x00000000) line 2618 + 17 bytes
eval_code2(PyCodeObject * 0x008002c0, _object * 0x007c9a9c, _object *
0x00000000, _object * * 0x007cae80, int 0, _object * * 0x007cae80, int 0,
_object * * 0x00000000, int 0, _object * 0x00000000) line 1953 + 26 bytes
eval_code2(PyCodeObject * 0x0173cb88, _object * 0x007b5344, _object *
0x007b5344, _object * * 0x00000000, int 0, _object * * 0x00000000, int 0,
_object * * 0x00000000, int 0, _object * 0x00000000) line 1853 + 88 bytes
PyEval_EvalCode(PyCodeObject * 0x0173cb88, _object * 0x007b5344, _object *
0x007b5344) line 324 + 31 bytes
run_node(_node * 0x017431f8, char * 0x1e1e69ec, _object * 0x007b5344,
_object * 0x007b5344) line 886 + 17 bytes
PyRun_InteractiveOne(_iobuf * 0x10261828 __iob, char * 0x1e1e69ec) line 532
+ 21 bytes
PyRun_InteractiveLoop(_iobuf * 0x10261828 __iob, char * 0x1e1e69ec) line 478
+ 13 bytes
PyRun_AnyFileEx(_iobuf * 0x10261828 __iob, char * 0x1e1e69ec, int 0) line
453 + 13 bytes
Py_Main(int 1, char * * 0x00792580) line 292 + 44 bytes
main(int 1, char * * 0x00792580) line 10 + 13 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e892a6()

---------

Any bugfix for this available?

Cheers
Harald

I tryed to track down a really odd problem, so I decided to build debug

builds of

python (2.0)
wxWindows (2.2.5)
wxPython (2.2.5)

If you execute this code in the debug python shell python_d.exe

import sys
sys.path.append( sys.prefix + r'\wxPython\demo' )
import Main
Main.main()

-> wxPython demo crashes instantly with following Info:

Does it make any difference if the demo directory is the current working
directory? Try:

import sys, os
os.chdir( sys.prefix + r'\wxPython\demo' )
import Main
Main.main()

Since it is probably the splash screen image it is having troubles with, can
you try this also?:

import sys, os
from wxPython.wx import *
os.chdir( sys.prefix + r'\wxPython\demo' )
wxInitAllImageHandlers()
img = wxImage("bitmaps/splash.gif", wxBITMAP_TYPE_GIF)
print img.Ok()

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!