Message from discussion
Subscribe to MultiColumnList Events
Received: by 10.35.10.5 with SMTP id n5mr444090pyi.1170647873610;
Sun, 04 Feb 2007 19:57:53 -0800 (PST)
Received: from 76.19.122.139 by s48g2000cws.googlegroups.com with HTTP;
Mon, 05 Feb 2007 03:57:52 +0000 (UTC)
From: "Mike Handverger" <mike.handver...@gmail.com>
To: "Python Ogre Developers" <python-ogre-developers@googlegroups.com>
Subject: Re: Subscribe to MultiColumnList Events
Date: Sun, 04 Feb 2007 19:57:52 -0800
Message-ID: <1170647872.391646.118380@s48g2000cws.googlegroups.com>
In-Reply-To: <3ec55cef0702041917n7f9626f6tbd99b6e1f44b1456@mail.gmail.com>
References: <1170609693.148607.131650@a34g2000cwb.googlegroups.com>
<1170638791.332000.144760@k78g2000cwa.googlegroups.com>
<3ec55cef0702041802r4a747798t8b487f21ea28cd8e@mail.gmail.com>
<1170642751.882221.251700@m58g2000cwm.googlegroups.com>
<f27c5670702041839h71f9947enb1d6ad839b1cc47a@mail.gmail.com>
<3ec55cef0702041917n7f9626f6tbd99b6e1f44b1456@mail.gmail.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9,gzip(gfe),gzip(gfe)
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Odd! It works fine for me in Windows with 0.7 now too. I initially had
this problem in Windows with 0.6 or so. At that time, I commented out
all the resetLists in my code. I'll check into Lakin's suggestion. I
just recompiled CEGUI, but also recompiled the Python wrapper as well.
I'll do some more checking to make sure there aren't any old .so's
around.
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
>
> > On 2/4/07, Mike Handverger <mike.handver...@gmail.com> wrote:
>
> > > 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