gtk::combobox problems



Hi again,

I did't solve the problem with attaching a
Gtk::ComboBox to a Gtk::Table.
I still receive a segmentation fault. Here is the
message  from the debug operation: 

What makes me wonder is also the message "switching to
thread  -164267296". Where this value comes from ??

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -164267296 (LWP 4737)]
0xf67fd074 in g_type_create_instance () from
/usr/lib/libgobject-2.0.so.0
(gdb) up
#1  0xf67e45a1 in g_object_new () from
/usr/lib/libgobject-2.0.so.0
(gdb) up
#2  0xf67e383f in g_object_newv () from
/usr/lib/libgobject-2.0.so.0
(gdb) up
#3  0xf67e4459 in g_object_new_valist () from
/usr/lib/libgobject-2.0.so.0
(gdb) up
#4  0xf67e4578 in g_object_new () from
/usr/lib/libgobject-2.0.so.0
(gdb) up
#5  0x0070b6bb in pango_layout_new (context=0x9e436c8)
at pango-layout.c:210
/home/amitrica/Desktop/librairies/pango-1.7.0/pango/pango-layout.c:210:5286:beg:0x70b6bb
Current language:  auto; currently c
(gdb) up
#6  0xf6c3a232 in gtk_widget_create_pango_layout ()
from /usr/lib/libgtk-x11-2.0.so.0
(gdb) up
#7  0xf6a988d5 in gtk_cell_renderer_text_new () from
/usr/lib/libgtk-x11-2.0.so.0
(gdb) up
#8  0xf6a98ce3 in gtk_cell_renderer_text_new () from
/usr/lib/libgtk-x11-2.0.so.0
(gdb) up
#9  0xf6e9951a in
Gtk::CellRenderer_Class::get_size_vfunc_callback
(self=0x9e41b20, widget=0x9e418e0, cell_area=0x0,
x_offset=0x0, y_offset=0x0, width=0xfe400524,
height=0xfe400528) at cellrenderer.cc:155
/home/amitrica/Desktop/librairies/gtkmm-2.4.11/gtk/gtkmm/cellrenderer.cc:155:4682:beg:0xf6e9951a
Current language:  auto; currently c++
(gdb) up
#10 0xf6a94cf2 in gtk_cell_renderer_get_size () from
/usr/lib/libgtk-x11-2.0.so.0
(gdb) up
#11 0xf6a9a61b in gtk_cell_view_get_type () from
/usr/lib/libgtk-x11-2.0.so.0
(gdb) up
#12 0xf6a9bca9 in gtk_cell_view_get_size_of_row ()
from /usr/lib/libgtk-x11-2.0.so.0
(gdb) up
#13 0xf6abd040 in gtk_combo_box_set_model () from
/usr/lib/libgtk-x11-2.0.so.0
(gdb) up
#14 0xf6f1e935 in
Gtk::Widget_Class::size_request_callback
(self=0x9e41830, p0=0x9e4184c) at widget.cc:3301
/home/amitrica/Desktop/librairies/gtkmm-2.4.11/gtk/gtkmm/widget.cc:3301:93215:beg:0xf6f1e935
(gdb) up
#15 0xf67f8dcd in g_cclosure_marshal_VOID__BOXED ()
from /usr/lib/libgobject-2.0.so.0
(gdb) up
#16 0xf67e06b2 in g_cclosure_new_swap () from
/usr/lib/libgobject-2.0.so.0
(gdb) up
#17 0xf67e0347 in g_closure_invoke () from
/usr/lib/libgobject-2.0.so.0
(gdb) up
#18 0xf67f6432 in g_signal_has_handler_pending () from
/usr/lib/libgobject-2.0.so.0
(gdb) up
#19 0xf67f7cbc in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
(gdb) up
#20 0xf67f7e1c in g_signal_emit_by_name () from
/usr/lib/libgobject-2.0.so.0
(gdb) up
#21 0xf6b8ae53 in gtk_size_group_remove_widget () from
/usr/lib/libgtk-x11-2.0.so.0
(gdb) up
#22 0xf6b8b14d in gtk_size_group_remove_widget () from
/usr/lib/libgtk-x11-2.0.so.0
(gdb) up
#23 0xf6c35a3f in gtk_widget_size_request () from
/usr/lib/libgtk-x11-2.0.so.0
(gdb) up
#24 0xf6b11b6f in gtk_hbox_new () from
/usr/lib/libgtk-x11-2.0.so.0
(gdb) up
#25 0xf6f1e935 in
Gtk::Widget_Class::size_request_callback (self=0x0,
p0=0x9e41de4) at widget.cc:3301
/home/amitrica/Desktop/librairies/gtkmm-2.4.11/gtk/gtkmm/widget.cc:3301:93215:beg:0xf6f1e935
(gdb) up
#26 0xf67f8dcd in g_cclosure_marshal_VOID__BOXED ()
from /usr/lib/libgobject-2.0.so.0
(gdb) 


And the part of code that generates the seg fault is
the following: 

newParameterName = new Gtk::Label(parname);	
					newParameterType = new
Gtk::Label(Glib::ustring("(")+partype+Glib::ustring(")"));
				 	newParameterEntry = new Gtk::Entry();
							combParameter = new Gtk::ComboBox();
listtype = Gtk::ListStore::create(columns);
					combParameter->set_model(listtype);
					
//je remplis la list pour le combo avec les types HEX
qui se trouvent ds la hexlist
for(parseit =
hexlist.begin();parseit!=hexlist.end();parseit++){
						Gtk::TreeModel::Row row = *(listtype->append());
						row[columns.colName] = *parseit;
					}
					
combParameter->pack_start(columns.colName);					
combParameter->signal_changed().connect(sigc::mem_fun(*this,&DirWindow::on_Combo_Parameter));
					//combParameter->set_active(0); 
						
intable->attach(*newParameterName,0,1,paramTableRowNumber-1,paramTableRowNumber,Gtk::EXPAND,Gtk::EXPAND,0,0);
					
if(partype == "ENUM_HEX"){	
	hb = new Gtk::HBox();
	oxLabel = new Gtk::Label("0x");
						     hb->pack_start(*oxLabel,Gtk::PACK_SHRINK);
					
hb->pack_start(*newParameterEntry,Gtk::PACK_SHRINK);
					
intable->attach(*hb,1,2,paramTableRowNumber-1,paramTableRowNumber);
						//hb->show_all_children();
					
intable->attach(*combParameter,2,3,paramTableRowNumber-1,paramTableRowNumber,Gtk::FILL,Gtk::FILL,0,0);
						
					}else{
					
intable->attach(*newParameterEntry,1,2,paramTableRowNumber-1,paramTableRowNumber,Gtk::FILL,Gtk::FILL,0,0);
					
intable->attach(*newParameterType,2,3,paramTableRowNumber-1,paramTableRowNumber,Gtk::FILL,Gtk::FILL,0,0);
					}	

This code is put into a for loop, that makes the table
resize automatically.

Can anyone received this error since now, or has an
idea about resolving this?

Thank you.






Anca Mitrica


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]