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

gEDA-bug: Adding slot creates core dump



Full_Name: John Fisher
Version: 20040111
OS: NetBSD 2.0_BETA
Submission from: (NULL) (24.106.70.24)


To reproduce the problem, create a file (part.sym) with these lines:
v 20040111 1
P 0 100 300 100 1 0 0
L 300 200 300 0 3 0 0 0 -1 -1
L 600 200 600 0 3 0 0 0 -1 -1

Then run 'gschem part.sym' and then select the pin, right click for the popup
menu, and select edit.  For the name choose slot, and set the value to 1.
Press the Add button and the program core dumps.

The gdb output is:
(gdb) where
#0  0x480be28d in o_attrib_search_numslots (object=0x0, return_found=0x8409f20)
    at o_attrib.nw:2075
#1  0x08069a63 in o_slot_end ()
#2  0x0808a9fb in multi_attrib_edit_add ()
#3  0x485d3b37 in g_cclosure_marshal_VOID__VOID ()
   from /usr/pkg/lib/libgobject-2.0.so.400
#4  0x485c289e in g_closure_invoke () from /usr/pkg/lib/libgobject-2.0.so.400
..... (cut out the rest) .....

The problem seems to be in libgeda.so.20.0 in file src/o_attrib.c line 1722.
I am not sure if this will cause more problems down the road, but my fix was:
diff -ur src/o_attrib.c.original src/o_attrib.c
          
--- src/o_attrib.c.original     2004-01-11 21:06:29.000000000 -0500
+++ src/o_attrib.c      2004-09-29 12:37:32.000000000 -0400
@@ -1718,7 +1718,7 @@
   char *return_value;
 
   /* search for numslots attribute buried inside the complex */
-  return_value = o_attrib_search_name(object->complex->prim_objs,
+  return_value = o_attrib_search_name(NULL, /* object->complex->prim_objs, 
(JDF)*/
                                      "numslots", 0);
 
   if (return_value) {


The comment above the function o_attrib_search_name says:
/* the list is the top level list... don't pass it an object_head list */
/* unless you know what you are doing... */

If I have missed something please let me know.

Thanks,
John Fisher
jdf@rse.com