pcb

PCB crash on undoing trace moving

Bug #1617165 reported by Yu - Sian , Liu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pcb
Fix Released
Undecided
Unassigned

Bug Description

I move the trace and undo. PCB crashes. The gdb stack print is listed below.

PCB is compile from git repo.
pcb --version
PCB version 1.99z

(gdb) run
Starting program: /usr/local/bin/pcb
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb419db40 (LWP 19776)]
[New Thread 0xb37ffb40 (LWP 19777)]
[New Thread 0xb2ffeb40 (LWP 19778)]
[New Thread 0xb11aab40 (LWP 19786)]
[New Thread 0xb09a9b40 (LWP 19787)]
[Thread 0xb11aab40 (LWP 19786) exited]
[New Thread 0xb11aab40 (LWP 19791)]
[New Thread 0xadca8b40 (LWP 19792)]
[New Thread 0xad4a7b40 (LWP 19793)]
[New Thread 0xacca6b40 (LWP 19794)]
[New Thread 0xac4a5b40 (LWP 19795)]
[New Thread 0xabca4b40 (LWP 19796)]
[Thread 0xabca4b40 (LWP 19796) exited]
[Thread 0xac4a5b40 (LWP 19795) exited]
[Thread 0xb11aab40 (LWP 19791) exited]
[Thread 0xb09a9b40 (LWP 19787) exited]
[Thread 0xadca8b40 (LWP 19792) exited]
[Thread 0xacca6b40 (LWP 19794) exited]

Thread 1 "pcb" received signal SIGSEGV, Segmentation fault.
0x080caf9c in r_delete_entry (rtree=0x2d9d329, box=0x87510a8) at rtree.c:1180
1180 r = __r_delete (rtree->root, box);
(gdb) tree
Undefined command: "tree". Try "help".
(gdb) bt
#0 0x080caf9c in r_delete_entry (rtree=0x2d9d329, box=0x87510a8) at rtree.c:1180
#1 0x0808e9e5 in EraseText (Layer=0x8751088, Text=0x87510a8) at draw.c:1381
#2 0x0808ecd2 in EraseObject (type=<optimized out>, lptr=<optimized out>, ptr=0x87510a8) at draw.c:1455
#3 0x080d5cb8 in UndoFlag (Entry=0x8aa6464) at undo.c:529
#4 PerformUndo (ptr=ptr@entry=0x8aa6464) at undo.c:1056
#5 0x080d5e71 in Undo (draw=true) at undo.c:974
#6 0x0806f71d in ActionUndo (argc=0, argv=0x0, x=0, y=0) at action.c:6380
#7 0x080d8e3c in hid_actionv (name=0x88d2c78 "Undo", argc=0, argv=0x0) at hid/common/actions.c:243
#8 0x080d937c in hid_parse_actionstring (rstr=rstr@entry=0x8450990 "Undo()", require_parens=require_parens@entry=1 '\001') at hid/common/actions.c:327
#9 0x080d940e in hid_parse_actions (str_=0x8450990 "Undo()") at hid/common/actions.c:415
#10 0x081072ca in ghid_menu_cb (node=0x8450968, action=<optimized out>) at hid/gtk/gui-top-window.c:365
#11 0xb74387ec in g_cclosure_marshal_VOID__VOID () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#12 0xb7436b6b in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#13 0xb7448ffc in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#14 0xb7451c96 in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#15 0xb7451fc5 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#16 0xb78d8897 in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#17 0xb78d912e in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#18 0xb7436b6b in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#19 0xb7448ffc in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#20 0xb745188c in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#21 0xb7451fc5 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#22 0xb78d348b in gtk_accel_group_activate () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#23 0xb78d4920 in gtk_accel_groups_activate () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#24 0xb7ad5627 in gtk_window_activate_key () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#25 0xb7ad56b0 in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#26 0xb799df0b in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#27 0xb7435404 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#28 0xb7436b6b in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#29 0xb74495d4 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#30 0xb745188c in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#31 0xb7451fc5 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#32 0xb7abdfc4 in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#33 0xb799c395 in gtk_propagate_event () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#34 0xb799c6fd in gtk_main_do_event () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#35 0xb780ffa9 in ?? () from /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#36 0xb7db8ed9 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#37 0xb7db9179 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#38 0xb7db9529 in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#39 0xb799b485 in gtk_main () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#40 0x08108be7 in ghid_do_export (options=0x0) at hid/gtk/gui-top-window.c:1833
#41 0x0806477a in main (argc=1, argv=0xbffff074) at main.c:2151

Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Hi Liu,

I can't reproduce this bug with the current git HEAD on a Fedora-13 32-bit linux kernel 2.6.34.9-69.fc13.i686.PAE dual cpu installation, neither with the gtk or the lesstif UI.

Do you have some more information (OS, distro, hardware, etc.) regarding this bug ?

AFAICT, it looks like you started with an empty layout, does the bug persist with an existing layout ?

Kind regards,

Bert Timmerman.

Changed in pcb:
status: New → Incomplete
Revision history for this message
Yu - Sian , Liu (thomasysliu) wrote :

Hi Timmerman,
  I use the attached board. And I start with existed layout. (In previous scenario I start pcb and open existed layout.)
  Open the pcb board using the following command. select the trace and element around L1. move left. And press "u"(undo) TWICE and it crashes.

  gdb --args pcb test.pcb

  I use two machines two 32 bit and one 64 bit.
computer #1 [lubuntu 16.04.1]
$ cat /proc/version
Linux version 4.4.0-34-generic (buildd@lgw01-33) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2.1) ) #53-Ubuntu SMP Wed Jul 27 16:06:28 UTC 2016
$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial

computer #2 [ubuntu 16.04.1]
$cat /proc/version
Linux version 4.4.0-34-generic (buildd@lgw01-33) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2.1) ) #53-Ubuntu SMP Wed Jul 27 16:06:28 UTC 2016
$cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial

computer #3 [ubuntu 16.04.1, 64-bit, VM]
$cat /proc/version
Linux version 4.4.0-31-generic (buildd@lgw01-16) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2.1) ) #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016
$cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial

Revision history for this message
Yannis (orions-belts1) wrote :

Hi all,

exactly same behavior here, with current git HEAD.
Also, Ubuntu 16.04.2

Kind Regards,
Yannis

Revision history for this message
Yannis (orions-belts1) wrote :

It seems the bug was introduced in commit 4b4cd0eb0182766cfca040b1c146d4e1f713b139 (2016-08-03 20:20:35 (GMT))

, i checked with this commit 94876c326fd3f45e125bb5bb6f2299c698d668cc (2016-07-28 07:53:11 (GMT)) and seems ok.

Kind Regards,
Yannis

Revision history for this message
Yannis (orions-belts1) wrote :

Seems to be fixed in Bug #1631059

Regards,
Yannis

Revision history for this message
Chad Parker (parker-charles) wrote :

Since appears to have 1631059 fixed this (can't reproduce it anymore), and that fix is release, I'm marking this as fix released.

Changed in pcb:
status: Incomplete → Fix Released
Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

OK

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.