www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2017/01/18/01:43:03

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Wed, 18 Jan 2017 07:50:18 +0100 (CET)
X-X-Sender: igor2 AT igor2priv
To: geda-user AT delorie DOT com
X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu"
From: gedau AT igor2 DOT repo DOT hu
Subject: [geda-user] [pcb] bugreport for 4.0.0
Message-ID: <alpine.DEB.2.00.1701180741180.7286@igor2priv>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
Reply-To: geda-user AT delorie DOT com

Hi all,

John Griessen reported a few bugs for pcb-rnd recently, from which one 
seems to affect all versions of mainline from 4.0.0 back to 2011 (the 
fork) and maybe even earlier.

Reproduction:

1. start the program without a file name, let it create an empty design

2. switch to the silk layer

3. draw a rectangle

4. go back to arrow mode (F11)

5. drag & drop the rectanlge to move it a bit

Expected result: rectangle moved, just like on any copper layer

What we get instead: rectangle disappears.


Below I'm sharing the result of my debugging so far in hope that mainline 
developers will share a patch with me if they decide to fix this sooner 
than I do.


The move code calls InitClip on the poly after moving the coords, and the 
new state of the poly becomes seemingly inconsistent: .NoHoles is left 
NULL, while .NoHolesValid is 1. Later on in the draw code, we look at 
.NoHolesValid and decide we don't need to recalculate .NoHoles, which 
means we think what we need to draw is empty.

I don't yet fully understand .NoHolesValid; is the above combination 
valid? e.g. "valid=1 NoHoles=NULL" means "we have a valid empty poly". Or 
is it invalid, e.g. valid should be 1 only if we have an up to date, 
non-empty NoHoles? It's the InitClip() code that first resets .NoHoles and 
then can return in two different ways without setting valid to 0.

TIA,

Igor2

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019