pcb

pcb crashes when pressing "v" while the cursor is over a via

Bug #850311 reported by Ivan Stankovic on 2011-09-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gEDA project
Critical
Unassigned
pcb
Medium
Unassigned

Bug Description

Steps to reproduce:

1. open the board attached to this bug report
2
. press "Tab" to switch to the solder side view
3. position the cursor above the via and press "v"

Sometimes pcb crashes on step 2, but it always crashes on step 3.

Backtrace:

#0 0x00007ffff38b6725 in raise () from /lib/libc.so.6
#1 0x00007ffff38b7b9b in abort () from /lib/libc.so.6
#2 0x00007ffff38af4de in ?? () from /lib/libc.so.6
#3 0x00007ffff38af582 in __assert_fail () from /lib/libc.so.6
#4 0x00000000004c95f5 in __r_search (node=0x95aac0, query=0x7fffffffdc50, arg=0x7fffffffdae0) at rtree.c:467
#5 0x00000000004c9b87 in r_search (rtree=0x931f90, query=0x7fffffffdc50, check_region=0,
    found_rectangle=0x466b1c <name_callback>, cl=0x7fffffffdbb8) at rtree.c:575
#6 0x0000000000467be3 in DrawEverything (drawn_area=0x7fffffffdc50) at draw.c:665
#7 0x000000000046abe8 in hid_expose_callback (hid=0x82d860, region=0x7fffffffdc50, item=0x0) at draw.c:1758
#8 0x0000000000521a0c in ghid_drawing_area_expose_cb (widget=0xa454e0, ev=0x7fffffffe1a0, port=0x82daa0)
    at hid/gtk/gtkhid-gl.c:958
#9 0x00007ffff67000d8 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#10 0x00007ffff4b6f1fe in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#11 0x00007ffff4b8008b in ?? () from /usr/lib/libgobject-2.0.so.0
#12 0x00007ffff4b8956b in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#13 0x00007ffff4b89952 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#14 0x00007ffff6819081 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#15 0x00007ffff66fe8f7 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#16 0x00007ffff635aea4 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#17 0x00007ffff6355e43 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#18 0x00007ffff6357fe1 in gdk_window_process_all_updates () from /usr/lib/libgdk-x11-2.0.so.0
#19 0x00007ffff6681b21 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#20 0x00007ffff6335526 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#21 0x00007ffff6c3a29d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#22 0x00007ffff6c3aa78 in ?? () from /usr/lib/libglib-2.0.so.0
#23 0x00007ffff6c3b0ba in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#24 0x00007ffff66fd687 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#25 0x000000000051be16 in ghid_do_export (options=0x0) at hid/gtk/gui-top-window.c:1771
#26 0x0000000000487d7e in main (argc=2, argv=0x7fffffffe5e8) at main.c:1948

#4 0x00000000004c95f5 in __r_search (node=0x95aac0, query=0x7fffffffdc50, arg=0x7fffffffdae0) at rtree.c:467
467 assert (query->X1 < query->X2 && query->Y1 < query->Y2);
(gdb) p *query
$1 = {X1 = 0, Y1 = 0, X2 = 26416000, Y2 = 0}

Ivan Stankovic (istankovic) wrote :
Peter Clifton (pcjc2) wrote :

I'm not sure about the crash, but the fact that the view flip does not work on the back side of the board, that is almost certainly a bug of my making when I reworked the GTK HID's viewport handling - sorry, I'll look at it.

Peter Clifton (pcjc2) wrote :

I can't confirm the crash here (it could be due to overflowed coordinates due to the bad view), but I can confirm the view problem.

Changed in pcb:
importance: Undecided → Critical
milestone: none → next-bug-release
status: New → Confirmed

A commit was made which affects this bug
git master commit c8e0f875155405bdcdb6835e8439a2c2fd4fb4a0
http://git.gpleda.org/?p=pcb.git;a=commit;h=c8e0f875155405bdcdb6835e8439a2c2fd4fb4a0

commit c8e0f875155405bdcdb6835e8439a2c2fd4fb4a0
Author: Peter Clifton <email address hidden>
Commit: Peter Clifton <email address hidden>

    gtk: Fix ghid_zoom_view_fit() to work when the board is flipped.

    Affects-bug: lp-850311

Peter Clifton (pcjc2) wrote :

I'm going to mark this as fix committed - although the assert in the rtree search is clearly being "fragile" to bad coordinates.

Changed in pcb:
status: Confirmed → Fix Committed
Ivan Stankovic (istankovic) wrote :

Heh, my pcb was configured with --enable-debug so that's why I was seeing failed assertions (=crashes).
I can confirm that the fix solves the "press v over a via" problem, but I'm still able to get
a failed assertion when I switch to the solder side view.

Of course, if I don't enable the debug mode, assertions are disabled and pcb runs fine.

Peter Clifton (pcjc2) wrote :

Ok, re-opening whilst I investigate the assertion failure.

Changed in pcb:
importance: Critical → Medium
status: Fix Committed → In Progress
Peter Clifton (pcjc2) wrote :

It would appear that GTK is giving us a zero-width expose event. I'm not yet sure why, but it might be worth changing the assertion test to allow the zero-width case in an r-tree search.

Peter Clifton (pcjc2) on 2011-09-21
Changed in pcb:
status: In Progress → Confirmed
Traumflug (mah-jump-ing) on 2015-09-27
Changed in geda-project:
importance: Undecided → Critical
status: New → Confirmed
Traumflug (mah-jump-ing) wrote :

Hmm. Can't reproduce this with current Git, also no assertion failure. Looks like this got solved at some point over the last 4 years.

Marking this a 'fix released'. In case the problem persists, please open a new bug. Thanks for reporting!

Changed in geda-project:
status: Confirmed → Fix Released
tags: added: crash
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments