2.8.0 Gtk2: Assert on wxListBox::SetString()
Thomas Zehbe
tz at ingenion.de
Wed Apr 11 03:49:14 PDT 2007
Hi,
I have al wxListBox with multiple entries of which one is selected. When I do
a SetString(i, str) where i points to the selected item, I get the following
assert:
/misc/wxWidgets-2.8.0/src/gtk/listbox.cpp(638): assert "IsValid(n)" failed in
DoGetItemClientData(): Invalid index passed to GetItemClientData
I added a backtrace. The assert happens during trying to Delete() in wxListBox
as the new string has to replace the currently selected.
Is it a known bug?
Regards,
Thomas
(gdb) bt
#0 0xffffe410 in __kernel_vsyscall ()
#1 0x40c23611 in raise () from /lib/tls/libpthread.so.0
#2 0x409cd6b1 in wxTrap ()
at /misc/wxWidgets-2.8.0/src/common/appbase.cpp:672
#3 0x40672185 in wxGUIAppTraits::ShowAssertDialog (this=0x8120518,
msg=@0xbfffce60) at /misc/wxWidgets-2.8.0/src/gtk/utilsgtk.cpp:425
#4 0x409cdb49 in ShowAssertDialog (szFile=0x4080061c, nLine=638,
szFunc=0x8360f2c, szCond=0x40800da4, szMsg=0x40800cfc, traits=0x8120518)
at /misc/wxWidgets-2.8.0/src/common/appbase.cpp:839
#5 0x409cd18b in wxAppConsole::OnAssertFailure (this=0x80f83a8,
file=0x4080061c, line=638, func=0x8360f2c, cond=0x40800da4, msg=0x40800cfc)
at /misc/wxWidgets-2.8.0/src/common/appbase.cpp:443
#6 0x406448ca in wxApp::OnAssertFailure (this=0x80f83a8, file=0x4080061c,
line=638, func=0x8360f2c, cond=0x40800da4, msg=0x40800cfc)
at /misc/wxWidgets-2.8.0/src/gtk/app.cpp:624
#7 0x409cd76f in wxOnAssert (szFile=0x4080061c, nLine=638, szFunc=0x40800ce8
"DoGetItemClientData", szCond=0x40800da4, szMsg=0x40800cfc)
at /misc/wxWidgets-2.8.0/src/common/appbase.cpp:712
#8 0x406d20e3 in wxListBox::DoGetItemClientData (this=0x8347008,
n=4294967295) at /misc/wxWidgets-2.8.0/src/gtk/listbox.cpp:637
#9 0x4071118f in wxItemContainer::GetClientData (this=0x834715c,
n=4294967295) at /misc/wxWidgets-2.8.0/src/common/ctrlsub.cpp:172
#10 0x080689bc in wxControlWithItems::GetClientData (this=0x8347008,
n=4294967295) at /misc/wxWidgets-2.8.0/include/wx/ctrlsub.h:185
#11 0x0807f6b4 in fMatart::OnListboxSelected (this=0x834dc78,
event=@0xbfffd210) at src/fmatart.cpp:193
#12 0x409cce56 in wxAppConsole::HandleEvent (this=0x80f83a8,
handler=0x834dc78, func={__pfn = 0x807f650
<fMatart::OnListboxSelected(wxCommandEvent&)>, __delta = 0},
event=@0xbfffd210) at /misc/wxWidgets-2.8.0/src/common/appbase.cpp:320
#13 0x40a8c10c in wxEvtHandler::ProcessEventIfMatches (entry=@0x80cf480,
handler=0x834dc78, event=@0xbfffd210)
at /misc/wxWidgets-2.8.0/src/common/event.cpp:1203
#14 0x40a8afb6 in wxEventHashTable::HandleEvent (this=0x80cf458,
event=@0xbfffd210, self=0x834dc78)
at /misc/wxWidgets-2.8.0/src/common/event.cpp:877
#15 0x40a8c31a in wxEvtHandler::ProcessEvent (this=0x834dc78,
event=@0xbfffd210) at /misc/wxWidgets-2.8.0/src/common/event.cpp:1265
#16 0x40794e20 in wxWindowBase::TryParent (this=0x83880b0, event=@0xbfffd210)
at /misc/wxWidgets-2.8.0/src/common/wincmn.cpp:2580
#17 0x40a8c37f in wxEvtHandler::ProcessEvent (this=0x83880b0,
event=@0xbfffd210) at /misc/wxWidgets-2.8.0/src/common/event.cpp:1278
#18 0x40794e20 in wxWindowBase::TryParent (this=0x8347008, event=@0xbfffd210)
at /misc/wxWidgets-2.8.0/src/common/wincmn.cpp:2580
#19 0x40a8c37f in wxEvtHandler::ProcessEvent (this=0x8347008,
event=@0xbfffd210) at /misc/wxWidgets-2.8.0/src/common/event.cpp:1278
#20 0x406d0c02 in gtk_listitem_changed_callback (selection=0x83748b8,
listbox=0x8347008) at /misc/wxWidgets-2.8.0/src/gtk/listbox.cpp:190
#21 0x4112c8a6 in g_cclosure_marshal_VOID__VOID ()
from /opt/gnome/lib/libgobject-2.0.so.0
#22 0x4111f8db in g_closure_invoke () from /opt/gnome/lib/libgobject-2.0.so.0
#23 0x4112f339 in g_signal_chain_from_overridden ()
from /opt/gnome/lib/libgobject-2.0.so.0
#24 0x4113013b in g_signal_emit_valist ()
from /opt/gnome/lib/libgobject-2.0.so.0
#25 0x41130545 in g_signal_emit_by_name ()
from /opt/gnome/lib/libgobject-2.0.so.0
#26 0x40f3bcea in gtk_tree_view_create_row_drag_icon ()
from /opt/gnome/lib/libgtk-x11-2.0.so.0
#27 0x4112bf13 in g_cclosure_marshal_VOID__BOXED ()
from /opt/gnome/lib/libgobject-2.0.so.0
#28 0x4111f8db in g_closure_invoke () from /opt/gnome/lib/libgobject-2.0.so.0
#29 0x4112ed8b in g_signal_chain_from_overridden ()
from /opt/gnome/lib/libgobject-2.0.so.0
#30 0x4113013b in g_signal_emit_valist ()
from /opt/gnome/lib/libgobject-2.0.so.0
#31 0x41130626 in g_signal_emit () from /opt/gnome/lib/libgobject-2.0.so.0
#32 0x40f26ae3 in gtk_tree_model_row_deleted ()
from /opt/gnome/lib/libgtk-x11-2.0.so.0
#33 0x40e706e1 in gtk_list_store_remove ()
from /opt/gnome/lib/libgtk-x11-2.0.so.0
#34 0x406d1f9c in wxListBox::Delete (this=0x8347008, n=0)
at /misc/wxWidgets-2.8.0/src/gtk/listbox.cpp:600
#35 0x406d23e1 in wxListBox::SetString (this=0x8347008, n=0,
--
Dipl.-Ing. Thomas Zehbe
INGENION GmbH
Kuhweide 6
31552 Apelern
Fon: 05043 / 40 57 90 4
Fax: 05043 / 40 57 90 7
www.ingenion.de
More information about the wx-users
mailing list