Bus error when removing attributes

Bug #698568 reported by noqsi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gEDA
Fix Released
Undecided
Unassigned

Bug Description

When in gattrib I remove all editable attributes from a component instance, I get:

** (gattrib:16228): CRITICAL **: u_basic_breakup_string: assertion `(string != NULL)' failed
[2] Bus error gattrib chain.sch

upon an attempt to save the schematic.

gEDA/gattrib version 1.4.2.20081220

(from the Fink repository for MacOS 10.4)

Revision history for this message
Peter Clifton (pcjc2) wrote :

Hmm, there was a crash bug in gattrib when editing attributes with graphical attributes backported for 1.4.2, I wonder if those commits had anything to do with it:

http://git.gpleda.org/?p=gaf.git;a=commitdiff;h=ad0e3027a721132c12727e1806979dadfc4af731
http://git.gpleda.org/?p=gaf.git;a=commitdiff;h=4eee4ebea399b332179091a0679429015223f305

Gattrib needs some TLC unfortunately.

Revision history for this message
Peter Clifton (pcjc2) wrote :

John, could you provide a backtrace by running under gdb please.

Revision history for this message
noqsi (noqsi) wrote :
Download full text (4.0 KiB)

(gdb) [Tanuki:AE/minisys/schematic] jpd% gdb gattrib
GNU gdb 6.3.50-20050815 (Apple version gdb-573) (Fri Oct 20 15:54:33 GMT 2006)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-apple-darwin"...Reading symbols for shared libraries .......................... done

(gdb) run chain.sch
Starting program: /sw/bin/gattrib chain.sch
Reading symbols for shared libraries ................................................+................+++++...+.+.+.....+++.++++++++ done
gEDA/gattrib version 1.4.2.20081220
gEDA/gattrib comes with ABSOLUTELY NO WARRANTY; see COPYING for more details.
This is free software, and you are welcome to redistribute it under certain
conditions; please see the COPYING file for more details.

Reading symbols for shared libraries . done

** (gattrib:16271): CRITICAL **: u_basic_breakup_string: assertion `(string != NULL)' failed

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x90002f40 in strcmp ()
(gdb) bt
#0 0x90002f40 in strcmp ()
#1 0x000276c8 in s_attrib_name_in_list (name_value_list=0xfffffffc, name=0x2913c30 "device") at s_attrib.c:56
#2 0x00027e10 in s_toplevel_update_component_attribs_in_toplevel (o_current=0x29886c0, new_comp_attrib_list=0x2913df0) at s_toplevel.c:634
#3 0x0002843c in s_toplevel_sheetdata_to_toplevel (start_obj=0x1e75c70) at s_toplevel.c:429
#4 0x00028560 in s_toplevel_gtksheet_to_toplevel () at s_toplevel.c:158
#5 0x00022ecc in menu_file_save () at x_window.c:149
#6 0x013a9c08 in g_closure_invoke ()
#7 0x013ba9ec in signal_emit_unlocked_R ()
#8 0x013bbe00 in g_signal_emit_valist ()
#9 0x013bc060 in g_signal_emit ()
#10 0x003e29ac in _gtk_action_emit_activate ()
#11 0x003e3cbc in closure_accel_activate ()
#12 0x013a9c08 in g_closure_invoke ()
#13 0x013ba9ec in signal_emit_unlocked_R ()
#14 0x013bbe60 in g_signal_emit_valist ()
#15 0x013bc060 in g_signal_emit ()
#16 0x003dd764 in gtk_accel_group_activate ()
#17 0x003dedb0 in gtk_accel_groups_activate ()
#18 0x005c7914 in gtk_window_activate_key ()
#19 0x005c7954 in gtk_window_key_press_event ()
#20 0x004a2784 in _gtk_marshal_BOOLEAN__BOXED ()
#21 0x013a9c08 in g_closure_invoke ()
#22 0x013bac10 in signal_emit_unlocked_R ()
#23 0x013bbe60 in g_signal_emit_valist ()
#24 0x013bc060 in g_signal_emit ()
#25 0x005b2ed4 in gtk_widget_event_internal ()
#26 0x004a0950 in gtk_propagate_event ()
#27 0x004a100c in gtk_main_do_event ()
#28 0x0014c250 in gdk_event_dispatch ()
#29 0x01414310 in g_main_context_dispatch ()
#30 0x01416078 in g_main_context_iterate ()
#31 0x01416474 in g_main_loop_run ()
#32 0x004a00ac in gtk_main ()
#33 0x000291d0 in gattrib_main (closure=0xfffffffc, argc=2, argv=0xbfffed9c) at gattrib.c:217
#34 0x0156d1b8 in invoke_main_func (body_data=0xbfffec48) at init.c:367
#35 0x0153c6ec in c_body (d=0xbfffeb78) at continuations.c:350
#36 0x015b53ac in scm_c_catc...

Read more...

Revision history for this message
Peter Clifton (pcjc2) wrote :

Hmm, actually this might not have been a regression (it would be very very useful to confirm it it was or not though.. John, do you have 1.4.0 or 1.4.1 to test?

I recall seeing (and fixing) a similar sounding crash in the 1.5.x series. This is after the OBJECT list was migrated to GList, so not all of it might directly back-portable though - even if the crash occurs by a similar mechanism.

http://git.gpleda.org/?p=gaf.git;a=commit;h=0b87dfd3c9a4188d4112015bbc7f6f0a38e8fb34
http://git.gpleda.org/?p=gaf.git;a=commit;h=65a541a1f302454a8e9e7a7119a59323bb982912

Revision history for this message
Peter Clifton (pcjc2) wrote :

Having seen the backtrace, I'm led to a few more commits which might be relevant - which were committed in the 1.5.x branch:

http://git.gpleda.org/?p=gaf.git;a=commit;h=a6ec74886d5c7b291df6e05e8e7cb181452c4c22

There was also a commit by Patrick which rework the code you're seeing crash, and another by me reverting Patrick's changes as it introduced crashes saving certain schematics. Unfortunately it appears gattrib is pretty fragile in this area.

Revision history for this message
noqsi (noqsi) wrote :

1.4.0.20080127 on Ubuntu behaves the same. So it's not a new bug.

Revision history for this message
Peter Clifton (pcjc2) wrote :

Do you have either of those built from source, which could have the following patch applied:

http://git.gpleda.org/?p=gaf.git;a=commitdiff_plain;h=a6ec74886d5c7b291df6e05e8e7cb181452c4c22

If it fixed the issue _and_ we were to release another in the 1.4.x series, this ought to get backported. However I think Ales is right in not wanting to keep putting a lot of effort into 1.4.x, and insted focus in getting 1.6.0 released soon - and as good as we can make it!

Revision history for this message
Gareth Edwards (gareth-uk) wrote :

John, is this still an issue for you in 1.6.2/1.7.2?

Revision history for this message
John P. Doty (jpd-noqsi) wrote : Re: [Bug 698568] Re: Bus error when removing attributes

On Jan 2, 2012, at 9:50 AM, Gareth Edwards wrote:

> John, is this still an issue for you in 1.6.2/1.7.2?

Seems not to be a problem in 1.6, but I rarely use gattrib these days.

>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/698568
>
> Title:
> Bus error when removing attributes
>
> Status in GPL Electronic Design Automation tools:
> New
>
> Bug description:
> When in gattrib I remove all editable attributes from a component
> instance, I get:
>
> ** (gattrib:16228): CRITICAL **: u_basic_breakup_string: assertion `(string != NULL)' failed
> [2] Bus error gattrib chain.sch
>
> upon an attempt to save the schematic.
>
> gEDA/gattrib version 1.4.2.20081220
>
> (from the Fink repository for MacOS 10.4)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/geda/+bug/698568/+subscriptions
>

John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
<email address hidden>

Revision history for this message
Gareth Edwards (gareth-uk) wrote :

Believed fixed in 1.6.x.

Changed in geda:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.