www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2017/01/18/05:02:33

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=googlemail.com; s=20161025;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to;
bh=8+VvPxvi5jN4FvqsRuzIbWSqrgEgmF3f4vdtdDya8pw=;
b=BO6Tn2NxXAEmsuqYssu68iFyag1NUgjPXWD2l0b0nKuFh/XrN3NPxeKDdPEn71TWoJ
Y+4jIAxjmimcXTuaE56lvUyvDLslzuAGTPZuUjmpSDKbxM44ibJQSDuTqZuQkS8ECqAl
S2aTp/Ff+us4FPsP6W+KQcp0xQQA99cZ5dJdFyIVO6PghEEYRf7li98ek5QptfiTU8Ky
gFC/noJVLUW6iJGX8YOxkWAgncRbZyKv9S113/fdtKo2u8qnw2uDWSLQRtr2CSCkuKfb
UdNcgIlyd3rC4PFh2WcTsu5hmsqkjQ1wWfJLzzOXj5tmwBqIh3qZfzLtAV5AfiRCyddX
k24Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:in-reply-to:references:from:date
:message-id:subject:to;
bh=8+VvPxvi5jN4FvqsRuzIbWSqrgEgmF3f4vdtdDya8pw=;
b=i2l3oM1s4b2JjtU0uNqfhVutfodsT2pjB63OA7TPzY8w3K6FVEyBoLwLYjDeuqaFj3
xEdQROTksaoRKsI3ScPEf5q/k2LtAgdjYQR3zpb9/huCBp7d4+MKf3Ulqo7HOYsktH9K
JqbvVrpWPw2czgIv/k1nE01GsePOEQC8cF3oi7WwfmmRLcYB6pttkRESDgbTBxPzYEZO
0+ei/YsxX1H5uaGs4Lyaz0jleihGYUX8xXTdCmjI22xCEZ/0l1w9n9SvdZ1ajuNkYSbG
mlJL9JeeQ/qCjLoxvacDIdPGbJftVgZi+bShD7vLDa4MEY94BLneayFO5XXTOYd+ip9B
ZkwQ==
X-Gm-Message-State: AIkVDXJxKFGEzItFJXuvCkPgbxg7iJO7aaicjXuBLxYP5L9ktL5MhPX8Drh5CJs4CaazwrxEWszWTTYEFktP2A==
X-Received: by 10.55.45.129 with SMTP id t123mr1911741qkh.311.1484733649091;
Wed, 18 Jan 2017 02:00:49 -0800 (PST)
MIME-Version: 1.0
In-Reply-To: <CAJXU7q_UZiZJh2DFQMoX7OMR=E8vLRc=3vARWsSR_hf2sPu1ag@mail.gmail.com>
References: <alpine DOT DEB DOT 2 DOT 00 DOT 1701180741180 DOT 7286 AT igor2priv> <CAJXU7q9kVrXQhONbvxv+Frt=9hAqw8NyumT1tMtWV6wY-qywoQ AT mail DOT gmail DOT com>
<CAJXU7q81VZuXHD+1XAkQscr5f+_npca521AMN4KphcwF0F_1mQ AT mail DOT gmail DOT com>
<CAJXU7q9f-T5jy3mvGkLkwYO3HFTw4BfPVgaMxNYfMs53-cUqVg AT mail DOT gmail DOT com> <CAJXU7q_UZiZJh2DFQMoX7OMR=E8vLRc=3vARWsSR_hf2sPu1ag AT mail DOT gmail DOT com>
From: "Peter Clifton (petercjclifton AT googlemail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
Date: Wed, 18 Jan 2017 10:00:48 +0000
Message-ID: <CAJXU7q9T2t3_7-QvXi65D1tveN-+qDc3Q1DioV4gamv9MHJ_kA@mail.gmail.com>
Subject: Re: [geda-user] [pcb] bugreport for 4.0.0
To: gEDA User Mailing List <geda-user AT delorie DOT com>
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--001a114f42fcbd92d705465b7df9
Content-Type: text/plain; charset=UTF-8

Hi Igor,

Sorry for top posting (on my phone).

The NoHoles (cached clipped polygon for rendering) could theoretically be
null, with the valid flag set.

"Clipped" could (should?) also be null, and if they are not NULL together,
that probably suggests a bug in the no holes dicing routine, or (perhaps
more likely) that the polygon data is invalid somehow.

Null clipped polygons might occur if say, the polygon is small, and gets
totally clipped away by other objects. Doesn't seem to apply in this case.

I'm not sure from memory if we even call into the renderer if clipped ==
NULL.

I'll take a poke what happens on my experimental GL branches, as they don't
use the NoHoles cache for rendering. Might give an extra data point.

Will let you know if I find anything.

Peter


On 18 Jan 2017 06:44, <gedau AT igor2 DOT repo DOT hu> wrote:

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

--001a114f42fcbd92d705465b7df9
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">Hi Igor,<div dir=3D"auto"><br></div><div dir=3D"auto">Sor=
ry for top posting (on my phone).</div><div dir=3D"auto"><br></div><div dir=
=3D"auto">The NoHoles (cached clipped polygon for rendering) could theoreti=
cally be null, with the valid flag set.</div><div dir=3D"auto"><br></div><d=
iv dir=3D"auto">&quot;Clipped&quot; could (should?) also be null, and if th=
ey are not NULL together, that probably suggests a bug in the no holes dici=
ng routine, or (perhaps more likely) that the polygon data is invalid someh=
ow.</div><div dir=3D"auto"><br></div><div dir=3D"auto">Null clipped polygon=
s might occur if say, the polygon is small, and gets totally clipped away b=
y other objects. Doesn&#39;t seem to apply in this case.</div><div dir=3D"a=
uto"><br></div><div dir=3D"auto">I&#39;m not sure from memory if we even ca=
ll into the renderer if clipped =3D=3D NULL.</div><div dir=3D"auto"><br></d=
iv><div dir=3D"auto">I&#39;ll take a poke what happens on my experimental G=
L branches, as they don&#39;t use the NoHoles cache for rendering. Might gi=
ve an extra data point.</div><div dir=3D"auto"><br></div><div dir=3D"auto">=
Will let you know if I find anything.</div><div dir=3D"auto"><br></div><div=
 dir=3D"auto">Peter</div><br><div class=3D"gmail_extra" dir=3D"auto"><br><d=
iv class=3D"gmail_quote">On 18 Jan 2017 06:44,  &lt;<a href=3D"mailto:gedau=
@igor2.repo.hu">gedau AT igor2 DOT repo DOT hu</a>&gt; wrote:<br type=3D"attribution">=
<blockquote class=3D"quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex">Hi all,<br>
<br>
John Griessen reported a few bugs for pcb-rnd recently, from which one seem=
s to affect all versions of mainline from 4.0.0 back to 2011 (the fork) and=
 maybe even earlier.<br>
<br>
Reproduction:<br>
<br>
1. start the program without a file name, let it create an empty design<br>
<br>
2. switch to the silk layer<br>
<br>
3. draw a rectangle<br>
<br>
4. go back to arrow mode (F11)<br>
<br>
5. drag &amp; drop the rectanlge to move it a bit<br>
<br>
Expected result: rectangle moved, just like on any copper layer<br>
<br>
What we get instead: rectangle disappears.<br>
<br>
<br>
Below I&#39;m sharing the result of my debugging so far in hope that mainli=
ne developers will share a patch with me if they decide to fix this sooner =
than I do.<br>
<br>
<br>
The move code calls InitClip on the poly after moving the coords, and the n=
ew state of the poly becomes seemingly inconsistent: .NoHoles is left NULL,=
 while .NoHolesValid is 1. Later on in the draw code, we look at .NoHolesVa=
lid and decide we don&#39;t need to recalculate .NoHoles, which means we th=
ink what we need to draw is empty.<br>
<br>
I don&#39;t yet fully understand .NoHolesValid; is the above combination va=
lid? e.g. &quot;valid=3D1 NoHoles=3DNULL&quot; means &quot;we have a valid =
empty poly&quot;. Or is it invalid, e.g. valid should be 1 only if we have =
an up to date, non-empty NoHoles? It&#39;s the InitClip() code that first r=
esets .NoHoles and then can return in two different ways without setting va=
lid to 0.<br>
<br>
TIA,<br>
<br>
Igor2<br>
</blockquote></div><br></div></div>

--001a114f42fcbd92d705465b7df9--

- Raw text -


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