Bug #1654884 reported by Bert Timmerman on 2017-01-08
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Chad Parker

Bug Description

On November 24th, 2016, Igor2 wrote to the geda-user mailing list:

Hi all,

I managed to separate the rubber band code and moved it all in an optional
feature plugin in pcb-rnd. After that, we started to test whether I
broke something in the cleanup and Evan found an interesting bug that
affects mainline too.


we are having a test sprint on Saturday, to hunt & fix bugs like the below one.

Event summary: http://repo.hu/cgi-bin/pcb-rnd-people.cgi?event=tsprint3

Join us on IRC (any time): http://repo.hu/projects/pcb-rnd/irc.html


It is easy to reproduce with the attached minimal board. Grab the top 45 degree short line and move it (rubber band is on). Make sure you grab the line, not its endpoints - this can be done by clicking near the middle of the 45 degree edge of the line (zoom in!). Also make sure the line is not selected.

Once the line segment is grabbed, there's no xor-drawn attached-lines and when the operation ends, the endpoints of the attached lines are thrown 2x further than necessary.

Repeat the same with the bottom 45 degree line segment and it won't happen there.

The only difference is that the top line is short while the bottom line is long. Because of a bug in rubber_callback() this results in finding and adding the same objects twice; this cancels in the xor-draw and multiplies the endpoint moves.

The fix is commited in pcb-rnd r5265.



Bert Timmerman (bert-timmerman) wrote :
Bert Timmerman (bert-timmerman) wrote :
tags: added: core
Bert Timmerman (bert-timmerman) wrote :

Tried to apply r5265.diff to no avail ...

rubberband.c: In function ‘rubber_callback’:
rubberband.c:100: error: ‘rbnd’ undeclared (first use in this function)
rubberband.c:100: error: (Each undeclared identifier is reported only once
rubberband.c:100: error: for each function it appears in.)
rubberband.c:102: error: ‘PCB_R_DIR_NOT_FOUND’ undeclared (first use in this function)

Kind regards,

Bert Timmerman.

Chad Parker (parker-charles) wrote :

Confirmed on 4.1.0

Changed in pcb:
importance: Undecided → Medium
status: New → Confirmed
Chad Parker (parker-charles) wrote :

When I see this, I do see XOR draws for the 45 degree and lower segments, just not the the upper segment.

I understand Igor2's description, and I think I can probably fix this when I have a few moments to dig into it.

Chad Parker (parker-charles) wrote :

Igor2's solution is essentially to check the list to make sure that the item we're about to add isn't already in it.

I've implemented this solution in branch LP1654884. It seems to work (for me) on the test board provided.

Changed in pcb:
assignee: nobody → Chad Parker (parker-charles)
milestone: none → pcb-4.1.1
status: Confirmed → In Progress
Changed in pcb:
status: In Progress → Fix Committed
Changed in pcb:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments