Netclass clearance resetting to zero

Bug #1711491 reported by Chris Pavlina on 2017-08-18
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
KiCad
Undecided
Maciej Suminski

Bug Description

Uh... I'm not really sure what's causing this, and I'm sorry to say I don't really have enough time to investigate well enough to file a _proper_ bug report... but running latest master (and first noticed a few days ago, so at least a few commits old), something keeps resetting my netclass clearance to zero. Not sure what's triggering this, but I'm noticing suddenly every few hours that pcbnew lets me route traces directly touching, check design rules and clearance is zero!

Application: kicad
Version: (2017-08-17 revision 667d32c4a)-master, debug build
Libraries: wxWidgets 3.0.3
           libcurl/7.54.1 OpenSSL/1.1.0f zlib/1.2.11 libpsl/0.17.0 (+libicu/59.1) libssh2/1.8.0 nghttp2/1.23.1
Platform: Linux 4.12.4-1-ARCH x86_64, 64 bit, Little endian, wxGTK
- Build Info -
wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.64.0
Curl: 7.54.1
KiCad - Compiler: GCC 7.1.1 with C++ ABI 1011
        Settings: USE_WX_GRAPHICS_CONTEXT=OFF
                  USE_WX_OVERLAY=OFF
                  KICAD_SCRIPTING=ON
                  KICAD_SCRIPTING_MODULES=ON
                  KICAD_SCRIPTING_WXPYTHON=ON
                  KICAD_SCRIPTING_ACTION_MENU=OFF
                  BUILD_GITHUB_PLUGIN=ON
                  KICAD_USE_OCE=ON

Wayne Stambaugh (stambaughw) wrote :

I thought I had inadvertently did something wrong yesterday while laying out a board but apparently this is a legitimate issue.

Changed in kicad:
status: New → Confirmed
Nicholas Savenlid (nicholas-z) wrote :

also did hit me in 2017-aug-18 release but i did not at the time understand it was a bug, i assumed it was my fault.

that 2017-aug-18 nigthly is scary

Marcos Chaparro (nitrousnrg) wrote :

I think this bug is fixed in latest nighty

No, the bug is still there and easy to reproduce:

1. In Pcbnew set a clearance >0 in "Design Rules"->Clearance for the default netclass
2. Open the footprint editor -> Clearance is set to zero in Pcbnew.

This is done in pcbnew/modulframe.cpp:244 ff :

244 SetBoard( new BOARD() );
245 // In modedit, the default net clearance is not known.
246 // (it depends on the actual board)
247 // So we do not show the default clearance, by setting it to 0
248 // The footprint or pad specific clearance will be shown
249 GetBoard()->GetDesignSettings().GetDefault()->SetClearance( 0 );

In line 249 the global defaults object is returned and its clearance attribute set to zero.

It is a regression introduced with commit 75cda5021d. Since then there is a global default NETCLASS object shared by all BOARD instances.

Changed in kicad:
assignee: nobody → Maciej Suminski (orsonmmz)
Maciej Suminski (orsonmmz) wrote :

Michael, thank you for such accurate investigation - it was really helpful.

I'm glad that I could help. Thank you for the fix.

Changed in kicad:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers