> I did try setAutoDelete (both False and True) it didn't seem to make a
> difference unfortunately. I have a test program based on demos/CEGUI/
> blank_app.py:
> http://dev.mv3d.com/~mike/mv3d/python-ogre/ListTest.py
> If you comment/uncomment line 118, you should see the crash. I haven't
> tested the program in Windows, but I was definitely seeing the same
> crash there. I put everything in the init code for simplicity, but the
> same error occurs when resetList is called later.
> Uncommenting that line, when I quit the app, I get a stack trace from
> somewhere. It could be that the Python reference to the ListBoxItem is
> being freed, and then the CEGUI C++ pointer gets freed later as well--
> though I'd expect a 'double free' type error from glibc instead of
> invalid pointer free in that case.
> Reset List after Add... Ok
> *** glibc detected *** python: free(): invalid pointer: 0x0a9b2f20 ***
> ======= Backtrace: =========
> /lib/libc.so.6[0xa7e5a082]
> /lib/libc.so.6(__libc_free+0x84)[0xa7e5b704]
> /usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xa29b83b1]
> /usr/lib/python2.4/site-packages/CEGUI/
> _cegui_.so(_ZN23ListboxTextItem_wrapperD0
> Ev+0x2c)[0xa1af97fe]
> /usr/local/lib/libCEGUIBase.so.1(_ZN5CEGUI7Listbox14resetList_implEv
> +0x54)[0xa2b
> 05d28]
> /usr/local/lib/libCEGUIBase.so.1(_ZN5CEGUI7ListboxD0Ev+0x32)
> [0xa2b0688a]
> /usr/local/lib/libCEGUIBase.so.
> 1(_ZN5CEGUI14ListboxFactory13destroyWindowEPNS_6W
> indowE+0x15)[0xa2ae91f5]
> /usr/local/lib/libCEGUIBase.so.
> 1(_ZN5CEGUI13WindowManager13cleanDeadPoolEv+0x64)
> [0xa2ad6d30]
> /usr/local/lib/libCEGUIBase.so.1(_ZN5CEGUI6SystemD1Ev+0x279)
> [0xa2abbd41]
> /usr/lib/python2.4/site-packages/CEGUI/
> _cegui_.so(_ZN5boost6python7objects12valu
> e_holderIN5CEGUI6SystemEED1Ev+0x28)[0xa1c7e116]
> /usr/local/lib/libboost_python-gcc40-1_34.so.1.34.0[0xa2d01a2e]
> python[0x808b9f3]
> python(PyDict_DelItem+0xc9)[0x807ba99]
> python(PyObject_GenericSetAttr+0x2a1)[0x807f161]
> python(PyObject_SetAttr+0xaa)[0x807e2ba]
> python(PyEval_EvalFrame+0x2911)[0x80b7371]
> python(PyEval_EvalCodeEx+0x835)[0x80ba745]
> python[0x8100b59]
> python(PyObject_Call+0x27)[0x80589d7]
> python[0x805e28e]
> python(PyObject_Call+0x27)[0x80589d7]
> python(PyEval_CallObjectWithKeywords+0x6d)[0x80b3d2d]
> python[0x80942a9]
> python[0x808b859]
> python[0x807a599]
> python(PyDict_SetItem+0x65)[0x807bfc5]
> python(_PyModule_Clear+0x164)[0x8102384]
> python(PyImport_Cleanup+0x15d)[0x80d203d]
> python(Py_Finalize+0xae)[0x80dc60e]
> python(Py_Main+0x6e4)[0x8055824]
> python(main+0x22)[0x8055032]
> /lib/libc.so.6(__libc_start_main+0xdc)[0xa7e0c8cc]
> python[0x8054f81]
> Thanks,
> Mike
> On Feb 4, 9:02 pm, "Andy Miller" <nzmill...@gmail.com> wrote:
> > You could also look to use the *setAutoDelete* function on the list
> items -
> > perhaps set this to False which will stop the list from trying to delete
> the
> > item and instead rely on the user code to do so.
> > Cheers
> > Andy
> > On 05/02/07, Mike Handverger <mike.handver...@gmail.com> wrote:
> > > I seem to be having one more CEGUI problem. I can't remove items from
> > > a Listbox, Combobox or MultiColumnList without a crash. I get a crash
> > > in Windows as well, but here's what happens in Linux when trying
> > > either Listbox.resetList or Listbox.removeItem:
> > > *** glibc detected *** /usr/bin/python: free(): invalid pointer:
> > > 0x0b65d590 ***
> > > This code worked fine under PyOgre.
> > > If resetList is called and the Listbox is empty, there is no crash.
> > > This happens whether I let go of my reference to the Listbox items or
> > > not.
> > > Any ideas?
> > > Thanks,
> > > Mike
> > > On Feb 4, 12:21 pm, "Mike Handverger" <mike.handver...@gmail.com>
> > > wrote:
> > > > Hi guys,
> > > > Things are working very well over here. I noticed that there is no
> > > > custom event subscription code for MultiColumnList in CEGUI. Here's
> a
> > > > patch that provides it (tested on Linux):
> http://dev.mv3d.com/~mike/mv3d/python-ogre/cegui-MultiColumnList.patch
> > > > Thanks,
> > > > Mike