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
*** 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:
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
>
Thanks,
Mike
On Feb 4, 10:17 pm, "Andy Miller" <nzmill...@gmail.com> wrote:
> Happy to say it works for me under windows (no crash)..
>
> I'm using Python-Ogre 0.8 as well :)
>
> Cheers
>
> Andy
>
> On 05/02/07, Lakin Wecker <lakin.wec...@gmail.com> wrote:
>
>
>
> > *** glibc detected *** python: free(): invalid pointer: 0x0a9b2f20 ***
>
> > The two or three times that I've ever seen this error, it has been caused
> > by incorrect linking to libraries. I don't remember the exact situation,
> > but I had an older version of a library around that was being linked to at
> > some stage.
>
> > Lakin
>
Thanks,
Mike
On Feb 4, 10:57 pm, "Mike Handverger" <mike.handver...@gmail.com>
That would be me. I will give the app a try on my current setup which
is between 0.7 and 0.8. Then I will update to latest revision and
give another try.
#item.setAutoDeleted=False, should be either:
item.AutoDeleted=False
item.setAutoDeleted(False)
OR set in ctor:
item=cegui.ListboxTextItem(t,l.itemCount+1,None,False,False)
On Feb 6, 3:13 am, "Mike Handverger" <mike.handver...@gmail.com>
Thank you very much, that was it.