Mailing list archives : pcb-rnd

ID:6293
From:rn...@igor2.repo.hu
Date:Fri, 12 Jan 2024 16:03:52 +0100 (CET)
Subject:Re: [pcb-rnd] Polygon clip bug - valgrind
in-reply-to:6291 from Gabriel Paubert <pa...@iram.es>
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
 
--722076672-179981710-1705071832=:27953
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8BIT
 
Hi Gabriel,
 
On Fri, 12 Jan 2024, Gabriel Paubert wrote:
 
>To give examples, I've used "no shape" thermals for 2 purposes for which
>they were necessary:
>- having to transmit high frequency (up to ~20GHz) signals between top
>  and bottom layers on a 4 layer board (outer substrate layers being
>  Rogers 4350B 4mil thick, center layer standard FR4, ~250µm thick).
>  This was modelled for controlled impedance using 5 vias, 4 corners of
>  a square for the ground and the central one for signal.
>
>- routing signals on inner layers close to a large fixing hole for a
>  screw, but even much larger pad on outer layers. See the ttached
>  screen shot. There is one wide trace on layer 5 (light green) and lots
>  of traces on layer 4 (orange) using bus extended objects. This would
>  take quite some more area if the inner layers has the same 6.4mm
>  diameter pad as the external ones.
 
Nice buses too!
 
>Really the most frustrating recently has been lots of crashes, maybe
>beuase I've been heavily using extended objects. But the problem is
>that it was NTSC (never twice the same crash). Sometimes there was an
>error message (double free among them, but also some blurb about delayed
>drawing, and others I can't remember right now), but not always. And
>quite frequently the crashes happened right after saving (I used Ctrl-S a
>lot!), doing such "esoteric" things as panning or zooming. Most of the
>time, pcb-rnd dropped a PCB.xxx.save file in the directory which I could
>use to continue, but I've also once or twice created files which could
>not be loaded back.
 
Sounds like a memory handling problem.
 
An easy way to debug those: simply run pcb-rnd with valgrind and keep the 
terminal open with at least the last few lines visible. Whenever you see 
valgrind starting to print things, stop immediately and note down what the 
last few steps were (and save and restart before going on with the 
production work, because things are only going to get worse from that 
point).
 
 
Then later when you have the time try to reproduce triggering valgrind 
using your notes and maybe the saved file.
 
Rationale: valgrind usually catches these memory bugs much earlier than 
they start causing problems. Somtimes you may even be able to run for 
hours and quit gracefully, not even noticing there were a few invalid 
reads here and there.
 
(The drawback is that valgrind will slow things down a lot)
 
I am absolutely interested in recipes that trigger valgrind invalid reads, 
invalid writes, double frees, etc.
 
Best regards,
 
Igor2
 
--722076672-179981710-1705071832=:27953--
 

Reply subtree:
6293 Re: [pcb-rnd] Polygon clip bug - valgrind from rn...@igor2.repo.hu