segmentation with Glib::RefPtr<Pixbuf>
- From: oedipus <alexander arnoldt gmx de>
- To: gtkmm-list gnome org
- Subject: segmentation with Glib::RefPtr<Pixbuf>
- Date: Fri, 2 Mar 2007 10:57:27 -0800 (PST)
Hi,
I am creating a pixelbuffer with Gdk::Pixbuf::create(...) an empty
pixelbuffer and put in the pixelvalues later in some loops and than load up
the created image in a Gtk::Image. So far it works fine, but when I want to
write new data into the very same pixelbuffer my program crashes with a
segmentation fault. I tried already the valgrind but couldn't realy get
anything helpfull out of it. I append in the end the debug messages.
I am thankfull for any help, thx Alex
Breakpoint 2, Data::set_image (this=0x8292200, rw_measurement=0x82b1788,
file= 0xbfedbaec) at
/home/alex/Projects/Kotsbak-Consulting/image_viewer_v03/src/data.cpp:128
/home/alex/Projects/Kotsbak-Consulting/image_viewer_v03/src/data.cpp:128:2735:beg:0x806ded4
(gdb) info thread
* 1 Thread -1223776592 (LWP 10436) Data::set_image (this=0x8292200,
rw_measurement=0x82b1788, file= 0xbfedbaec) at
/home/alex/Projects/Kotsbak-Consulting/image_viewer_v03/src/data.cpp:128
(gdb) backtrace
#0 Data::set_image (this=0x8292200, rw_measurement=0x82b1788,
file= 0xbfedbaec) at
/home/alex/Projects/Kotsbak-Consulting/image_viewer_v03/src/data.cpp:128
#1 0x08062881 in main_window::load_file (this=0xbfedc834, cur_page=0,
choosen_file= 0xbfedbb30) at
/home/alex/Projects/Kotsbak-Consulting/image_viewer_v03/src/main_window.cc:230
#2 0x080629b9 in main_window::load_file (this=0xbfedc834, cur_page=0) at
/home/alex/Projects/Kotsbak-Consulting/image_viewer_v03/src/main_window.cc:204
#3 0x08062f4c in main_window::on_open1_activate (this=0xbfedc834) at
/home/alex/Projects/Kotsbak-Consulting/image_viewer_v03/src/main_window.cc:36
#4 0x080605d1 in sigc::bound_mem_functor0<void,
main_window_glade>::operator() (this=0x8246b1c) at
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:1787
#5 0x080605e8 in sigc::adaptor_functor<sigc::bound_mem_functor0<void,
main_window_glade> >::operator() (this=0x8246b18) at
/usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:251
#6 0x08060604 in sigc::internal::slot_call0<s
igc::bound_mem_functor0<void, main_window_glade>, void>::call_it
(rep=0x8246b00) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:103
#7 0xb77d14da in Glib::SignalProxyNormal::slot0_void_callback () from
/usr/lib/libglibmm-2.4.so.1
#8 0x08246b00 in ?? ()
#9 0x08246b48 in ?? ()
#10 0xbfedbc08 in ?? ()
#11 0xb74e50b2 in g_closure_ref () from /usr/lib/libgobject-2.0.so.0
#12 0xb74f3b29 in g_cclosure_marshal_VOID__VOID () from
/usr/lib/libgobject-2.0.so.0
#13 0xb74e679b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#14 0xb74f6b93 in g_signal_chain_from_overridden () from
/usr/lib/libgobject-2.0.so.0
#15 0xb74f80b7 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#16 0xb74f8279 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#17 0xb7a7c994 in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#18 0xb79717d8 in gtk_menu_shell_activate_item () from
/usr/lib/libgtk-x11-2.0.so.0
#19 0xb7972da2 in gtk_menu_shell_append () from /usr/lib/libgtk-x11-2.0.so.0
#20 0xb796a995 in gtk_menu_reorder_child () from
/usr/lib/libgtk-x11-2.0.so.0
#21 0xb7e2224d in Gtk::Widget_Class::button_release_event_callback () from
/usr/lib/libgtkmm-2.4.so.1
#22 0x08149160 in ?? ()
#23 0x08288020 in ?? ()
#24 0x08080860 in typeinfo for Glib::Object ()
#25 0xffffffff in ?? ()
#26 0xbfedc35c in ?? ()
#27 0x080c1bc8 in ?? ()
#28 0xbfedc118 in ?? ()
#29 0xb7b74b90 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#30 0xb7e221c0 in Gtk::Widget_Class::scroll_event_callback () from
/usr/lib/libgtkmm-2.4.so.1
#31 0xb7964b00 in _gtk_marshal_BOOLEAN__BOXED () from
/usr/lib/libgtk-x11-2.0.so.0
#32 0xb74e4fb9 in g_value_set_boxed () from /usr/lib/libgobject-2.0.so.0
#33 0xb74e679b in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#34 0xb74f71e3 in g_signal_chain_from_overridden () from
/usr/lib/libgobject-2.0.so.0
#35 0xb74f7e7f in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#36 0xb74f8279 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#37 0xb7a785f8 in gtk_widget_get_default_style () from
/usr/lib/libgtk-x11-2.0.so.0
#38 0xb795def3 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#39 0xb795f0f7 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#40 0xb775b7ea in _gdk_events_init () from /usr/lib/libgdk-x11-2.0.so.0
#41 0xb746e802 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#42 0xb74717df in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#43 0xb7471b89 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#44 0xb795f574 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#45 0xb7da77c7 in Gtk::Main::run_impl () from /usr/lib/libgtkmm-2.4.so.1
#46 0xb7da77b9 in Gtk::Main::run_impl () from /usr/lib/libgtkmm-2.4.so.1
#47 0xb7f038ac in ?? () from /usr/lib/libgtkmm-2.4.so.1
#48 0xbfedc808 in ?? ()
#49 0xb7da860a in Gtk::Main::run () from /usr/lib/libgtkmm-2.4.so.1
#50 0xbfedc8f8 in ?? ()
#51 0x0825ff2c in ?? ()
#52 0x00000001 in ?? ()
#53 0x00000000 in ?? ()
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x0806de66 in
Data::set_image(read_write_measurement*, Glib::ustring) at
/home/alex/Projects/Kotsbak-Consulting/image_viewer_v03/src/data.cpp:124
breakpoint already hit 2 times
2 breakpoint keep y 0x0806ded4 in
Data::set_image(read_write_measurement*, Glib::ustring) at
/home/alex/Projects/Kotsbak-Consulting/image_viewer_v03/src/data.cpp:128
breakpoint already hit 2 times
3 breakpoint keep y 0x0806df37 in
Data::set_image(read_write_measurement*, Glib::ustring) at
/home/alex/Projects/Kotsbak-Consulting/image_viewer_v03/src/data.cpp:130
breakpoint already hit 1 time
(gdb) info args
this = (Data * const) 0x8292200
rw_measurement = (read_write_measurement *) 0x82b1788
file = (Glib::ustring &) @0xbfedbaec: {string_ = {_M_dataplus =
{<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data
fields>}, <No data fields>}, _M_p = 0x82dba7c
"/home/alex/Testfiles-various/data_matrix_0.imr"
}
}
}
(gdb) info local
pixel = (guint8 *) 0x28 <Address 0x28 out of bounds>
pixels = (guint8 *) 0x8079178 "r"
channels = 137759104
linelength = 1
pixels2 = (guint8 *) 0x258 <Address 0x258 out of bounds>
tempstr = 0x258 <Address 0x258 out of bounds>
help = "%\b"
result = 0xb77e7980 "Èv\004"
(gdb) continue
Stopped due to shared library event
(gdb) continue
Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
(gdb) info thread
* 1 Thread -1223776592 (LWP 10436) 0xffffe410 in __kernel_vsyscall ()
(gdb) backtrace
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7227770 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7228ef3 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb725cd0b in __fsetlocking () from /lib/tls/i686/cmov/libc.so.6
#4 0xb7264b4a in free () from /lib/tls/i686/cmov/libc.so.6
#5 0xb7475b51 in g_free () from /usr/lib/libglib-2.0.so.0
#6 0xb76e9edd in gdk_pixbuf_copy () from /usr/lib/libgdk_pixbuf-2.0.so.0
#7 0xb76e9980 in ?? () from /usr/lib/libgdk_pixbuf-2.0.so.0
#8 0xb5b96008 in ?? ()
#9 0x00000000 in ?? ()
(gdb) info args
No symbol table info available.
(gdb) info local
No symbol table info available.
--
View this message in context: http://www.nabble.com/segmentation-with-Glib%3A%3ARefPtr%3CPixbuf%3E-tf3335281.html#a9275333
Sent from the Gtkmm mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]