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

gEDA-bug: [ geda-Patches-1531802 ] Bugfix for segfault when adding a global attribute



Patches item #1531802, was opened at 2006-07-31 17:08
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=818428&aid=1531802&group_id=161080

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Tomaz Solc (avian1)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bugfix for segfault when adding a global attribute

Initial Comment:
CVS version of gschem will segfault if a global
attribute is added when another global attribute is
already selected. 

The crash is caused because a NULL object pointer is
passed to scheme functions that are connected to the
"add-attribute-hook" (line 490 in o_attrib.c)

The attached patch fixes this problem.

How to reproduce the crash:

Open a new page in gschem. Right click, "Add
attribute", enter some values, click "OK". The added
attribute is automatically selected. Again right click
in empty part of the window, "Add attribute", enter
values, click "OK".

Backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1487394304 (LWP 5515)]
0x080557b6 in g_get_object_pins
(object_smob=0xa7375638) at g_hook.c:442
442       if (object->complex &&
object->complex->prim_objs) {
(gdb) bt
#0  0x080557b6 in g_get_object_pins
(object_smob=0xa7375638) at g_hook.c:442
#1  0xa7eaa09a in scm_ceval () from /usr/lib/libguile.so.12
#2  0xa7ea91a6 in scm_ceval () from /usr/lib/libguile.so.12
#3  0xa7ea7b3f in scm_apply () from /usr/lib/libguile.so.12
#4  0xa7ea80ed in scm_apply_0 () from
/usr/lib/libguile.so.12
#5  0xa7ebed76 in scm_c_run_hook () from
/usr/lib/libguile.so.12
#6  0xa7ebee1d in scm_run_hook () from
/usr/lib/libguile.so.12
#7  0x08061d2c in o_attrib_add_attrib (w_current=0x2974,
    text_string=0x833bfd0 "asd=asd", visibility=0,
show_name_value=0,
    object=0x8348ca0) at o_attrib.c:488
#8  0x0809121f in attrib_edit_dialog_ok (w=0x8133ce8,
w_current=0x813f6f0)
    at x_attribedit.c:238
#9  0xa7c49d7b in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/libgobject-2.0.so.0
#10 0xa7c3ca0b in g_closure_invoke () from
/usr/lib/libgobject-2.0.so.0
#11 0xa7c4ce83 in g_signal_chain_from_overridden ()
   from /usr/lib/libgobject-2.0.so.0
#12 0xa7c4e379 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#13 0xa7c4e529 in g_signal_emit () from
/usr/lib/libgobject-2.0.so.0
#14 0xa784aaa1 in gtk_button_clicked () from
/usr/lib/libgtk-x11-2.0.so.0
#15 0xa784c518 in _gtk_button_set_depressed ()
   from /usr/lib/libgtk-x11-2.0.so.0
#16 0xa7c49d7b in g_cclosure_marshal_VOID__VOID ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/libgobject-2.0.so.0
#17 0xa7c3afc9 in g_value_set_boxed () from
/usr/lib/libgobject-2.0.so.0
#18 0xa7c3ca0b in g_closure_invoke () from
/usr/lib/libgobject-2.0.so.0
#19 0xa7c4d308 in g_signal_chain_from_overridden ()
   from /usr/lib/libgobject-2.0.so.0
#20 0xa7c4e379 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#21 0xa7c4e529 in g_signal_emit () from
/usr/lib/libgobject-2.0.so.0
#22 0xa784aa11 in gtk_button_released () from
/usr/lib/libgtk-x11-2.0.so.0
#23 0xa784bac1 in _gtk_button_paint () from
/usr/lib/libgtk-x11-2.0.so.0
#24 0xa7918aa0 in _gtk_marshal_BOOLEAN__BOXED ()
   from /usr/lib/libgtk-x11-2.0.so.0
#25 0xa7c3afc9 in g_value_set_boxed () from
/usr/lib/libgobject-2.0.so.0
#26 0xa7c3ca0b in g_closure_invoke () from
/usr/lib/libgobject-2.0.so.0
#27 0xa7c4d4bf in g_signal_chain_from_overridden ()
   from /usr/lib/libgobject-2.0.so.0
#28 0xa7c4e158 in g_signal_emit_valist () from
/usr/lib/libgobject-2.0.so.0
#29 0xa7c4e529 in g_signal_emit () from
/usr/lib/libgobject-2.0.so.0
#30 0xa7a0a624 in gtk_widget_activate () from
/usr/lib/libgtk-x11-2.0.so.0
#31 0xa7916ecd in gtk_propagate_event () from
/usr/lib/libgtk-x11-2.0.so.0
#32 0xa7917343 in gtk_main_do_event () from
/usr/lib/libgtk-x11-2.0.so.0
#33 0xa7df1bfa in _gdk_events_queue () from
/usr/lib/libgdk-x11-2.0.so.0
#34 0xa7bc8e2c in g_main_context_dispatch () from
/usr/lib/libglib-2.0.so.0
#35 0xa7bcc176 in g_main_context_check () from
/usr/lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#36 0xa7bcc537 in g_main_loop_run () from
/usr/lib/libglib-2.0.so.0
#37 0xa79164e1 in gtk_main () from
/usr/lib/libgtk-x11-2.0.so.0
#38 0x08059f68 in main_prog (closure=0x0, argc=1,
argv=0xafc9a8a4)
    at gschem.c:355
#39 0xa7ebf808 in scm_boot_guile () from
/usr/lib/libguile.so.12
#40 0x0805a2be in main (argc=0, argv=0x0) at gschem.c:382

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=818428&aid=1531802&group_id=161080


_______________________________________________
geda-bug mailing list
geda-bug@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-bug