pcb

rubberband

Bug #1654884 reported by Bert Timmerman
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pcb
Fix Released
Medium
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.

REMINDER:

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

BUGREPORT:

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.

Regards,

Igor2

Tags: core
Revision history for this message
Bert Timmerman (bert-timmerman) wrote :
Revision history for this message
Bert Timmerman (bert-timmerman) wrote :
tags: added: core
Revision history for this message
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.

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

Confirmed on 4.1.0

Changed in pcb:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
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.

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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