PCBnew fails to update zone nets when importing netlist after re-annotating

Bug #1609401 reported by Brian Piccioni
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Medium
Jeff Young

Bug Description

PCBnew fails to properly import netlist after changing annotation with pours

PCBnew 4.0.2-stable on Windows 10 downloaded binaries (see details below)

I discovered this bug while trying to track down an issue with my utility RenumKiCadPCB.

It is easy to replicate. Download this project https://github.com/FPGAwars/icezum/tree/master/src-kicad

With the original files you can generate a netlist in EESchema and import it via PCBNew with no errors in the import or DRC. However, if you change the reference designator of C67 in the schematic and PCB and regenerate the netlist and import it via PCBNew, you get an error on the netlist import and the DRC because the pour region is no longer associated with the net. If you type ‘B’ to repour, the pour becomes hatched.
This is easy to fix: the net is now Net-C267, but the pour wants Net-(C67-1). You just edit the zone properties and select Net-(C267-1) and enter ‘B’ again. The DRC errors disappear even if you reimport the netlist.

Application: kicad
Version: 4.0.2-stable release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.2.0,wx containers,compatible with 2.8)
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Boost version: 1.57.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Tags: pcbnew
Revision history for this message
Novak Tamas (novak-7) wrote :

Confirmed.
If the net name changes because the pin/label/whatever given the net name changes, concerning filled zones' net names are not following the change. (Must be manually re-connect to new net name)

Changed in kicad:
status: New → Confirmed
importance: Undecided → Low
Jeff Young (jeyjey)
summary: - PCBnew fails to properly import netlist after changing annotation with
- pours
+ PCBnew fails to update zone nets when importing netlist after re-
+ annotating
tags: added: 4.0.2
Revision history for this message
Maciej Suminski (orsonmmz) wrote :

Not only 4.0.2, just confirmed in 5d738dcb6. All you get is a warning about an unconnected zone.

tags: added: pcbnew
removed: 4.0.2
Revision history for this message
Brian Piccioni (br0an) wrote :

I have confirmed it with nightly recently, however because I am working on my RenumKiCadPCB utility I did not pursue it further and I couldn't figure out the "repair" method I described in the initial report in V5. (neither a Kicad guru nor a software guru).

Application: kicad
Version: (2018-02-09 revision 07fff6ed3)-makepkg, release build
Libraries:
    wxWidgets 3.0.3
    libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0 nghttp2/1.23.1 librtmp/2.3
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.60.0
    Curl: 7.54.1
    Compiler: GCC 7.1.0 with C++ ABI 1011

Build 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=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_SPICE=ON

Revision history for this message
Jeff Young (jeyjey) wrote :

Possible algorithm:

When importing netlist, first go through all zones, get their nets, and from that all items connected to the zone.

Build a map of zone -> list of references and a map of zone -> list of timestamps.

After import go through the zones and fetch the map that corresponds to the import setting (match-by-refdes or match-by-timestamp). Find the first item in the list that still exists and update the zone to that item's net.

Sound reasonable? Is there an easier way?

Revision history for this message
Maciej Suminski (orsonmmz) wrote :

This is more or less what Eagle importer does to match KiCad and Eagle nets, seems to work fine so far.

Jeff Young (jeyjey)
Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
importance: Low → Medium
Revision history for this message
jean-pierre charras (jp-charras) wrote :

The algo should work fine if the change is *only* a re-annotation, but is not necessary good when the connectivity has changed (I mean "the first item in the list that still exists" is not necessary the best, because this net can be modified, and no longer the right net for the zone).

Revision history for this message
Brian Piccioni (br0an) wrote : RE: [Bug 1609401] Re: PCBnew fails to update zone nets when importing netlist after re-annotating

I reported this bug.

For what it is worth it is mainly an issue when annotation and not connectivity has changed.

If you think about it, not filling in a zone without manual intervention after annotation is a disruption of connectivity as a result of annotation, despite no change to connectivity.

So you re-annotate and errors pop up which are connectivity related (due to the unfilled zone), not annotation related.

Moreover this only happens to a specific subset of zones, making it hard for the user to figure out a fix when it shows up.

I suspect that an unfilled zone which happened to be a result of changed connectivity would be "expected" by the user and easier to figure out a fix.

Brian Piccioni

-----Original Message-----
From: <email address hidden> <email address hidden> On Behalf Of jean-pierre charras
Sent: April 30, 2018 8:50 AM
To: <email address hidden>
Subject: [Bug 1609401] Re: PCBnew fails to update zone nets when importing netlist after re-annotating

The algo should work fine if the change is *only* a re-annotation, but is not necessary good when the connectivity has changed (I mean "the first item in the list that still exists" is not necessary the best, because this net can be modified, and no longer the right net for the zone).

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1609401

Title:
  PCBnew fails to update zone nets when importing netlist after re-
  annotating

Status in KiCad:
  Confirmed

Bug description:
  PCBnew fails to properly import netlist after changing annotation with
  pours

  PCBnew 4.0.2-stable on Windows 10 downloaded binaries (see details
  below)

  I discovered this bug while trying to track down an issue with my
  utility RenumKiCadPCB.

  It is easy to replicate. Download this project
  https://github.com/FPGAwars/icezum/tree/master/src-kicad

  With the original files you can generate a netlist in EESchema and import it via PCBNew with no errors in the import or DRC. However, if you change the reference designator of C67 in the schematic and PCB and regenerate the netlist and import it via PCBNew, you get an error on the netlist import and the DRC because the pour region is no longer associated with the net. If you type ‘B’ to repour, the pour becomes hatched.
  This is easy to fix: the net is now Net-C267, but the pour wants Net-(C67-1). You just edit the zone properties and select Net-(C267-1) and enter ‘B’ again. The DRC errors disappear even if you reimport the netlist.

  Application: kicad
  Version: 4.0.2-stable release build
  wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.2.0,wx containers,compatible with 2.8)
  Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
  Boost version: 1.57.0
           USE_WX_GRAPHICS_CONTEXT=OFF
           USE_WX_OVERLAY=OFF
           KICAD_SCRIPTING=ON
           KICAD_SCRIPTING_MODULES=ON
           KICAD_SCRIPTING_WXPYTHON=ON
           USE_FP_LIB_TABLE=HARD_CODED_ON
           BUILD_GITHUB_PLUGIN=ON

To manage notifications about this bug go to:
https://bugs.launchpad.net/kicad/+bug/1609401/+subscriptions

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 295941c14dc7d19d94ca0c2b2b3833d52e601239
https://git.launchpad.net/kicad/patch/?id=295941c14dc7d19d94ca0c2b2b3833d52e601239

Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
Jeff Young (jeyjey) wrote :

Thanks Orson, JP and Brian.

Brian, if you want to test the new version to make sure it meets your expectations that would be great.

Revision history for this message
Brian Piccioni (br0an) wrote :

I shall give it a try. May take a few day due to a medical issue.

-----Original Message-----
From: <email address hidden> <email address hidden> On Behalf Of Jeff Young
Sent: May 1, 2018 8:56 AM
To: <email address hidden>
Subject: [Bug 1609401] Re: PCBnew fails to update zone nets when importing netlist after re-annotating

Thanks Orson, JP and Brian.

Brian, if you want to test the new version to make sure it meets your expectations that would be great.

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1609401

Title:
  PCBnew fails to update zone nets when importing netlist after re-
  annotating

Status in KiCad:
  Fix Committed

Bug description:
  PCBnew fails to properly import netlist after changing annotation with
  pours

  PCBnew 4.0.2-stable on Windows 10 downloaded binaries (see details
  below)

  I discovered this bug while trying to track down an issue with my
  utility RenumKiCadPCB.

  It is easy to replicate. Download this project
  https://github.com/FPGAwars/icezum/tree/master/src-kicad

  With the original files you can generate a netlist in EESchema and import it via PCBNew with no errors in the import or DRC. However, if you change the reference designator of C67 in the schematic and PCB and regenerate the netlist and import it via PCBNew, you get an error on the netlist import and the DRC because the pour region is no longer associated with the net. If you type ‘B’ to repour, the pour becomes hatched.
  This is easy to fix: the net is now Net-C267, but the pour wants Net-(C67-1). You just edit the zone properties and select Net-(C267-1) and enter ‘B’ again. The DRC errors disappear even if you reimport the netlist.

  Application: kicad
  Version: 4.0.2-stable release build
  wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.2.0,wx containers,compatible with 2.8)
  Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
  Boost version: 1.57.0
           USE_WX_GRAPHICS_CONTEXT=OFF
           USE_WX_OVERLAY=OFF
           KICAD_SCRIPTING=ON
           KICAD_SCRIPTING_MODULES=ON
           KICAD_SCRIPTING_WXPYTHON=ON
           USE_FP_LIB_TABLE=HARD_CODED_ON
           BUILD_GITHUB_PLUGIN=ON

To manage notifications about this bug go to:
https://bugs.launchpad.net/kicad/+bug/1609401/+subscriptions

Revision history for this message
Brian Piccioni (br0an) wrote :
Download full text (3.2 KiB)

I downloaded the May 1 nightly. Does this have the fix (I can't find the revision number listed in the email May 1, 2018 8:56AM.

For what it is worth it seems to work but I want to go through the entire process I described in the bug report before confirming that.

This is what I downloaded

Application: kicad
Version: (5.0.0-rc2-dev-623-g26197c333), release build
Libraries:
    wxWidgets 3.0.3
    libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0 nghttp2/1.23.1 librtmp/2.3
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.60.0
    Curl: 7.54.1
    Compiler: GCC 7.1.0 with C++ ABI 1011

Build 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=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_SPICE=ON

-----Original Message-----
From: <email address hidden> <email address hidden> On Behalf Of Jeff Young
Sent: May 1, 2018 8:56 AM
To: <email address hidden>
Subject: [Bug 1609401] Re: PCBnew fails to update zone nets when importing netlist after re-annotating

Thanks Orson, JP and Brian.

Brian, if you want to test the new version to make sure it meets your expectations that would be great.

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1609401

Title:
  PCBnew fails to update zone nets when importing netlist after re-
  annotating

Status in KiCad:
  Fix Committed

Bug description:
  PCBnew fails to properly import netlist after changing annotation with
  pours

  PCBnew 4.0.2-stable on Windows 10 downloaded binaries (see details
  below)

  I discovered this bug while trying to track down an issue with my
  utility RenumKiCadPCB.

  It is easy to replicate. Download this project
  https://github.com/FPGAwars/icezum/tree/master/src-kicad

  With the original files you can generate a netlist in EESchema and import it via PCBNew with no errors in the import or DRC. However, if you change the reference designator of C67 in the schematic and PCB and regenerate the netlist and import it via PCBNew, you get an error on the netlist import and the DRC because the pour region is no longer associated with the net. If you type ‘B’ to repour, the pour becomes hatched.
  This is easy to fix: the net is now Net-C267, but the pour wants Net-(C67-1). You just edit the zone properties and select Net-(C267-1) and enter ‘B’ again. The DRC errors disappear even if you reimport the netlist.

  Application: kicad
  Version: 4.0.2-stable release build
  wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.2.0,wx containers,compatible with 2.8)
  Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
  Boost version: 1.57.0
           USE_WX_GRAPHICS_CONTEXT=OFF
           USE_WX_OVERLAY=OFF
           KICAD_SCRIPTING=ON
           KICAD_SCRIPTING_MODULES=ON
           KICAD_SCRIPTING_WXPYTHON=ON
           USE_FP_LIB_TABLE=HARD_CODED_ON
           BUILD_GITHUB_PLUGIN=ON

To manage not...

Read more...

Revision history for this message
Jeff Young (jeyjey) wrote :
Download full text (6.4 KiB)

Yes, that has the fix in it. (Specifically it’s one commit ahead of the fix.)

commit 26197c333ef7ba2c0d1542fbb103ea80b1387d0c
Author: Shivpratap Chauhan <email address hidden>
Date: Tue May 1 13:44:23 2018 +0530

    At very first launch, old settings/config does not exist

    KiCad read incorrect value for window position and it's size at very
    first launch, which results in invisble/inaccessible window on Mac OSX.
    Set correct default values for these settings fixes this issue.
    And fix a typo in comment.

commit 295941c14dc7d19d94ca0c2b2b3833d52e601239
Author: Jeff Young <email address hidden>
Date: Tue May 1 13:52:11 2018 +0100

    Don't leave Zones with "dead" nets.

    When reading netlist or updating board from schematic, if the
    changes leave a zone with a net with no pads then change the
    zone's net to the new net of one of it's connections.

    Also improves update-board-from-schematic's dry run reporting
    to include zone nets and single-pad nets.

    Fixes: lp:1609401
    * https://bugs.launchpad.net/kicad/+bug/1609401

Cheers,
Jeff.

> On 1 May 2018, at 20:59, Brian Piccioni <email address hidden> wrote:
>
> I downloaded the May 1 nightly. Does this have the fix (I can't find the
> revision number listed in the email May 1, 2018 8:56AM.
>
> For what it is worth it seems to work but I want to go through the
> entire process I described in the bug report before confirming that.
>
> This is what I downloaded
>
> Application: kicad
> Version: (5.0.0-rc2-dev-623-g26197c333), release build
> Libraries:
> wxWidgets 3.0.3
> libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0 nghttp2/1.23.1 librtmp/2.3
> Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
> Build Info:
> wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
> Boost: 1.60.0
> Curl: 7.54.1
> Compiler: GCC 7.1.0 with C++ ABI 1011
>
> Build 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=ON
> BUILD_GITHUB_PLUGIN=ON
> KICAD_USE_OCE=ON
> KICAD_SPICE=ON
>
>
> -----Original Message-----
> From: <email address hidden> <email address hidden> On Behalf Of Jeff Young
> Sent: May 1, 2018 8:56 AM
> To: <email address hidden>
> Subject: [Bug 1609401] Re: PCBnew fails to update zone nets when importing netlist after re-annotating
>
> Thanks Orson, JP and Brian.
>
> Brian, if you want to test the new version to make sure it meets your
> expectations that would be great.
>
> --
> You received this bug notification because you are subscribed to the bug report.
> https://bugs.launchpad.net/bugs/1609401
>
> Title:
> PCBnew fails to update zone nets when importing netlist after re-
> annotating
>
> Status in KiCad:
> Fix Committed
>
> Bug description:
> PCBnew fails to properly import netlist after changing annotation with
> pours
>
> PCBnew 4.0.2-stable on Windows 10 downloaded binaries (see details
> below)
>
> I discovered this bug while trying to track down an issue with my
> utility RenumKiCadPCB.
>
> It is easy ...

Read more...

Revision history for this message
Brian Piccioni (br0an) wrote :

The issue still seems to be there, at least when the files are modified by renumkicadPCB. (It beats the hell out of manual annotation). I used my program to update the netlist, then got the same result using eeSchema to derive the netlist. Same results.

I have attached the complete project set which includes the modified/annotated Icezum project as well as the original.

The error is now on U-SW2 and the +3V3 rail, but previously the error was associated with a capacitor, not this switch.

Sorry if I am incoherent/not answering correctly. I am drugged due to medical treatment and I’ll be like this for a few days.

Brian

Revision history for this message
Brian Piccioni (br0an) wrote :
Download full text (9.0 KiB)

Jeff

I haven't figured out how this mail list thing works (it doesn't like attachments) but did you see I posted a reply on the bug page that the problem seems to still be present?

Also I emailed a feature request and a suggestion for a contribution I might make to the developers and it hasn't come across to me so I don't know if it went out.

If I am doing this wrong please let me know.

Brian.

-----Original Message-----
From: <email address hidden> <email address hidden> On Behalf Of Jeff Young
Sent: May 1, 2018 4:53 PM
To: <email address hidden>
Subject: Re: [Bug 1609401] Re: PCBnew fails to update zone nets when importing netlist after re-annotating

Yes, that has the fix in it. (Specifically it’s one commit ahead of the
fix.)

commit 26197c333ef7ba2c0d1542fbb103ea80b1387d0c
Author: Shivpratap Chauhan <email address hidden>
Date: Tue May 1 13:44:23 2018 +0530

    At very first launch, old settings/config does not exist

    KiCad read incorrect value for window position and it's size at very
    first launch, which results in invisble/inaccessible window on Mac OSX.
    Set correct default values for these settings fixes this issue.
    And fix a typo in comment.

commit 295941c14dc7d19d94ca0c2b2b3833d52e601239
Author: Jeff Young <email address hidden>
Date: Tue May 1 13:52:11 2018 +0100

    Don't leave Zones with "dead" nets.

    When reading netlist or updating board from schematic, if the
    changes leave a zone with a net with no pads then change the
    zone's net to the new net of one of it's connections.

    Also improves update-board-from-schematic's dry run reporting
    to include zone nets and single-pad nets.

    Fixes: lp:1609401
    * https://bugs.launchpad.net/kicad/+bug/1609401

Cheers,
Jeff.

> On 1 May 2018, at 20:59, Brian Piccioni <email address hidden> wrote:
>
> I downloaded the May 1 nightly. Does this have the fix (I can't find
> the revision number listed in the email May 1, 2018 8:56AM.
>
> For what it is worth it seems to work but I want to go through the
> entire process I described in the bug report before confirming that.
>
> This is what I downloaded
>
> Application: kicad
> Version: (5.0.0-rc2-dev-623-g26197c333), release build
> Libraries:
> wxWidgets 3.0.3
> libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0
> nghttp2/1.23.1 librtmp/2.3
> Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little
> endian, wxMSW Build Info:
> wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
> Boost: 1.60.0
> Curl: 7.54.1
> Compiler: GCC 7.1.0 with C++ ABI 1011
>
> Build 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=ON
> BUILD_GITHUB_PLUGIN=ON
> KICAD_USE_OCE=ON
> KICAD_SPICE=ON
>
>
> -----Original Message-----
> From: <email address hidden> <email address hidden> On Behalf Of Jeff
> Young
> Sent: May 1, 2018 8:56 AM
> To: <email address hidden>
> Subject: [Bug 1609401] Re: PCBnew fails to update zone nets when
> importing netlist after re-annotating
>
> Thanks Orson, JP and Brian...

Read more...

Revision history for this message
Jeff Young (jeyjey) wrote :
Download full text (11.3 KiB)

Hi Brian,

Yep, I saw it. I’m hoping to get back to that tomorrow.

Cheers,
Jeff.

> On 2 May 2018, at 22:48, Brian Piccioni <email address hidden> wrote:
>
> Jeff
>
> I haven't figured out how this mail list thing works (it doesn't like
> attachments) but did you see I posted a reply on the bug page that the
> problem seems to still be present?
>
> Also I emailed a feature request and a suggestion for a contribution I
> might make to the developers and it hasn't come across to me so I don't
> know if it went out.
>
> If I am doing this wrong please let me know.
>
> Brian.
>
> -----Original Message-----
> From: <email address hidden> <email address hidden> On Behalf Of Jeff Young
> Sent: May 1, 2018 4:53 PM
> To: <email address hidden>
> Subject: Re: [Bug 1609401] Re: PCBnew fails to update zone nets when importing netlist after re-annotating
>
> Yes, that has the fix in it. (Specifically it’s one commit ahead of the
> fix.)
>
> commit 26197c333ef7ba2c0d1542fbb103ea80b1387d0c
> Author: Shivpratap Chauhan <email address hidden>
> Date: Tue May 1 13:44:23 2018 +0530
>
> At very first launch, old settings/config does not exist
>
> KiCad read incorrect value for window position and it's size at very
> first launch, which results in invisble/inaccessible window on Mac OSX.
> Set correct default values for these settings fixes this issue.
> And fix a typo in comment.
>
> commit 295941c14dc7d19d94ca0c2b2b3833d52e601239
> Author: Jeff Young <email address hidden>
> Date: Tue May 1 13:52:11 2018 +0100
>
> Don't leave Zones with "dead" nets.
>
> When reading netlist or updating board from schematic, if the
> changes leave a zone with a net with no pads then change the
> zone's net to the new net of one of it's connections.
>
> Also improves update-board-from-schematic's dry run reporting
> to include zone nets and single-pad nets.
>
> Fixes: lp:1609401
> * https://bugs.launchpad.net/kicad/+bug/1609401
>
>
> Cheers,
> Jeff.
>
>> On 1 May 2018, at 20:59, Brian Piccioni <email address hidden> wrote:
>>
>> I downloaded the May 1 nightly. Does this have the fix (I can't find
>> the revision number listed in the email May 1, 2018 8:56AM.
>>
>> For what it is worth it seems to work but I want to go through the
>> entire process I described in the bug report before confirming that.
>>
>> This is what I downloaded
>>
>> Application: kicad
>> Version: (5.0.0-rc2-dev-623-g26197c333), release build
>> Libraries:
>> wxWidgets 3.0.3
>> libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0
>> nghttp2/1.23.1 librtmp/2.3
>> Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little
>> endian, wxMSW Build Info:
>> wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
>> Boost: 1.60.0
>> Curl: 7.54.1
>> Compiler: GCC 7.1.0 with C++ ABI 1011
>>
>> Build 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=ON
>> BUILD_GITHUB_PLUGIN=ON
>> KICAD_USE_OCE=ON
>> KICAD_SPICE=ON
>>
>>
>> -----Original Message-----
>> From: bounce...

Revision history for this message
Brian Piccioni (br0an) wrote :
Download full text (13.5 KiB)

OK, no rush! The longer you take the more time I have to recover ...

-----Original Message-----
From: <email address hidden> <email address hidden> On Behalf Of Jeff Young
Sent: May 2, 2018 7:23 PM
To: <email address hidden>
Subject: Re: [Bug 1609401] Re: PCBnew fails to update zone nets when importing netlist after re-annotating

Hi Brian,

Yep, I saw it. I’m hoping to get back to that tomorrow.

Cheers,
Jeff.

> On 2 May 2018, at 22:48, Brian Piccioni <email address hidden> wrote:
>
> Jeff
>
> I haven't figured out how this mail list thing works (it doesn't like
> attachments) but did you see I posted a reply on the bug page that the
> problem seems to still be present?
>
> Also I emailed a feature request and a suggestion for a contribution I
> might make to the developers and it hasn't come across to me so I
> don't know if it went out.
>
> If I am doing this wrong please let me know.
>
> Brian.
>
> -----Original Message-----
> From: <email address hidden> <email address hidden> On Behalf Of Jeff
> Young
> Sent: May 1, 2018 4:53 PM
> To: <email address hidden>
> Subject: Re: [Bug 1609401] Re: PCBnew fails to update zone nets when
> importing netlist after re-annotating
>
> Yes, that has the fix in it. (Specifically it’s one commit ahead of
> the
> fix.)
>
> commit 26197c333ef7ba2c0d1542fbb103ea80b1387d0c
> Author: Shivpratap Chauhan <email address hidden>
> Date: Tue May 1 13:44:23 2018 +0530
>
> At very first launch, old settings/config does not exist
>
> KiCad read incorrect value for window position and it's size at very
> first launch, which results in invisble/inaccessible window on Mac OSX.
> Set correct default values for these settings fixes this issue.
> And fix a typo in comment.
>
> commit 295941c14dc7d19d94ca0c2b2b3833d52e601239
> Author: Jeff Young <email address hidden>
> Date: Tue May 1 13:52:11 2018 +0100
>
> Don't leave Zones with "dead" nets.
>
> When reading netlist or updating board from schematic, if the
> changes leave a zone with a net with no pads then change the
> zone's net to the new net of one of it's connections.
>
> Also improves update-board-from-schematic's dry run reporting
> to include zone nets and single-pad nets.
>
> Fixes: lp:1609401
> * https://bugs.launchpad.net/kicad/+bug/1609401
>
>
> Cheers,
> Jeff.
>
>> On 1 May 2018, at 20:59, Brian Piccioni <email address hidden> wrote:
>>
>> I downloaded the May 1 nightly. Does this have the fix (I can't find
>> the revision number listed in the email May 1, 2018 8:56AM.
>>
>> For what it is worth it seems to work but I want to go through the
>> entire process I described in the bug report before confirming that.
>>
>> This is what I downloaded
>>
>> Application: kicad
>> Version: (5.0.0-rc2-dev-623-g26197c333), release build
>> Libraries:
>> wxWidgets 3.0.3
>> libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0
>> nghttp2/1.23.1 librtmp/2.3
>> Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little
>> endian, wxMSW Build Info:
>> wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
>> Boost: 1.60.0
>> Curl: 7.54.1
>> Compiler: GCC 7....

Revision history for this message
Jeff Young (jeyjey) wrote :

@Brian, I had a look, but I'm lost. I've found U_SW2 in the schematic and in the board, but I'm not sure which version of either I'm supposed to be using or what exactly triggers the bug.

Which one is the PCB /before/ the bug and the Netlist which creates the bug? (And does the +3V3 zone get left behind or the U_SW2 zone?)

Revision history for this message
Brian Piccioni (br0an) wrote :

Sorry - I had originally posted screen grabs of the 'pre-' and post annotation but the email bounced. I'll try via the bug website.

-----Original Message-----
From: <email address hidden> <email address hidden> On Behalf Of Jeff Young
Sent: May 3, 2018 10:56 AM
To: <email address hidden>
Subject: [Bug 1609401] Re: PCBnew fails to update zone nets when importing netlist after re-annotating

@Brian, I had a look, but I'm lost. I've found U_SW2 in the schematic and in the board, but I'm not sure which version of either I'm supposed to be using or what exactly triggers the bug.

Which one is the PCB /before/ the bug and the Netlist which creates the bug? (And does the +3V3 zone get left behind or the U_SW2 zone?)

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1609401

Title:
  PCBnew fails to update zone nets when importing netlist after re-
  annotating

Status in KiCad:
  Fix Committed

Bug description:
  PCBnew fails to properly import netlist after changing annotation with
  pours

  PCBnew 4.0.2-stable on Windows 10 downloaded binaries (see details
  below)

  I discovered this bug while trying to track down an issue with my
  utility RenumKiCadPCB.

  It is easy to replicate. Download this project
  https://github.com/FPGAwars/icezum/tree/master/src-kicad

  With the original files you can generate a netlist in EESchema and import it via PCBNew with no errors in the import or DRC. However, if you change the reference designator of C67 in the schematic and PCB and regenerate the netlist and import it via PCBNew, you get an error on the netlist import and the DRC because the pour region is no longer associated with the net. If you type ‘B’ to repour, the pour becomes hatched.
  This is easy to fix: the net is now Net-C267, but the pour wants Net-(C67-1). You just edit the zone properties and select Net-(C267-1) and enter ‘B’ again. The DRC errors disappear even if you reimport the netlist.

  Application: kicad
  Version: 4.0.2-stable release build
  wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.2.0,wx containers,compatible with 2.8)
  Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
  Boost version: 1.57.0
           USE_WX_GRAPHICS_CONTEXT=OFF
           USE_WX_OVERLAY=OFF
           KICAD_SCRIPTING=ON
           KICAD_SCRIPTING_MODULES=ON
           KICAD_SCRIPTING_WXPYTHON=ON
           USE_FP_LIB_TABLE=HARD_CODED_ON
           BUILD_GITHUB_PLUGIN=ON

To manage notifications about this bug go to:
https://bugs.launchpad.net/kicad/+bug/1609401/+subscriptions

Revision history for this message
Brian Piccioni (br0an) wrote :

The first image is the pre annotation. Note the U_SW2 pad (upper right) appears is +3V3.

This project is from the original files which is in the zipfile I posted subdirectory test\Original

C:\Users\Brian_17\Documents\RenumKiCadPCB\icezumMay22018.zip\Test\ICEZUM Original

Revision history for this message
Brian Piccioni (br0an) wrote :

This image is post annotation. It is from the files in the zip C:\Users\Brian_17\Documents\RenumKiCadPCB\icezumMay22018.zip\Test

Note how the upper right pad of U_SW2 is not +3V3 but is U_SW2.

does this explain the situation?

I'm sorry I'm still pretty dopped up.

Revision history for this message
Jeff Young (jeyjey) wrote :

Got it.

It's not the zone net that's getting lost, but rather that the netlist appears to have a glitch. The netlist assigns SW2's pins as:

    (net (code 44) (name U_SW2)
      ...
      (node (ref SW2) (pin 1))
      (node (ref SW2) (pin 3))
      ...)

    (net (code 82) (name +3V3)
      ...
      (node (ref SW2) (pin 3))
      (node (ref SW2) (pin 4))
      ...)

(The U_SW2 assignments should be pins 1 and 2.)

Was this netlist generated from your app or from Kicad?

I also noticed that Switch_4p didn't make it from the original icezum.lib to icezum-rescue.lib. This might have something to do with the bad netlist. I assume this was a project that got mapped from legacy libraries?

Hope you're on the mend.

Revision history for this message
Jeff Young (jeyjey) wrote :

I tried generating a netlist with SW1 updated to the old Switch_4p library entry and SW2 left unresolved.

Kicad generated correct pins for SW1 and /no/ pins for SW2, so I don't think it's the missing symbol that would cause Kicad to generate wrong connections to pin 3.

Revision history for this message
Brian Piccioni (br0an) wrote :
Download full text (4.2 KiB)

I ran my program which updates the PCB, schematic, and netlist and got that result.

If I use the reannotated schematic and ask eeSchema to generate the netlist, then import the netlist to PCBNew (all using defaults) I get exactly the same result.

My early version of RenumKicadPCB did not modify the netlist, just the schematic, and I got similar results (albeit it was a capacitor but that was before your patch). I fully accept the possibility that my code fubars the files, however, with this singular exception on certain projects with pours this shows up. Even if my code did impact the netlist I would assume (perhaps incorrectly) that the eeSchema derived netlist would be coherent with the schematic.

This is an open source project somebody suggested I use to debug my code. I assume it uses legacy libraries and I first encountered it when I was running V4. I was able to recreate the issue entirely manually in the past (not using my software) simply by renaming the suspect part but I haven't tried that recently.

I also have a much larger project with similar issues (\A64-TERES\TERES-PCB1-A64-MAIN_Rev_C\TERES_PCB1-A64-MAIN_Rev.C.pro) but it is a bear to work with and, given my mental state not a good starting point.

I'm recovering from chemo and that knocks the hell out of your brain to it makes it hard for me to concentrate/focus.

Thanks

-----Original Message-----
From: <email address hidden> <email address hidden> On Behalf Of Jeff Young
Sent: May 3, 2018 2:22 PM
To: <email address hidden>
Subject: [Bug 1609401] Re: PCBnew fails to update zone nets when importing netlist after re-annotating

Got it.

It's not the zone net that's getting lost, but rather that the netlist appears to have a glitch. The netlist assigns SW2's pins as:

    (net (code 44) (name U_SW2)
      ...
      (node (ref SW2) (pin 1))
      (node (ref SW2) (pin 3))
      ...)

    (net (code 82) (name +3V3)
      ...
      (node (ref SW2) (pin 3))
      (node (ref SW2) (pin 4))
      ...)

(The U_SW2 assignments should be pins 1 and 2.)

Was this netlist generated from your app or from Kicad?

I also noticed that Switch_4p didn't make it from the original icezum.lib to icezum-rescue.lib. This might have something to do with the bad netlist. I assume this was a project that got mapped from legacy libraries?

Hope you're on the mend.

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1609401

Title:
  PCBnew fails to update zone nets when importing netlist after re-
  annotating

Status in KiCad:
  Fix Committed

Bug description:
  PCBnew fails to properly import netlist after changing annotation with
  pours

  PCBnew 4.0.2-stable on Windows 10 downloaded binaries (see details
  below)

  I discovered this bug while trying to track down an issue with my
  utility RenumKiCadPCB.

  It is easy to replicate. Download this project
  https://github.com/FPGAwars/icezum/tree/master/src-kicad

  With the original files you can generate a netlist in EESchema and import it via PCBNew with no errors in the import or DRC. However, if you change the reference designator of C67 in the schematic and PCB and rege...

Read more...

Revision history for this message
Brian Piccioni (br0an) wrote :

I'm sorry I don't understand.

Is this a vestige of the old library and therefore no longer an issue?

If so that is a good thing. When I can gather my wits I'll try to see if the new code works on the larger project. That also had some issues with the library if I recall.

Part of the problem with these public domain projects is that there are all kinds of errors which show up in DRC, etc., and were left unresolved. It makes it hard for a guy like me to figure out which are important and which are not. Still it can be useful for debugging code because you get exceptions.

-----Original Message-----
From: <email address hidden> <email address hidden> On Behalf Of Jeff Young
Sent: May 3, 2018 2:36 PM
To: <email address hidden>
Subject: [Bug 1609401] Re: PCBnew fails to update zone nets when importing netlist after re-annotating

I tried generating a netlist with SW1 updated to the old Switch_4p library entry and SW2 left unresolved.

Kicad generated correct pins for SW1 and /no/ pins for SW2, so I don't think it's the missing symbol that would cause Kicad to generate wrong connections to pin 3.

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1609401

Title:
  PCBnew fails to update zone nets when importing netlist after re-
  annotating

Status in KiCad:
  Fix Committed

Bug description:
  PCBnew fails to properly import netlist after changing annotation with
  pours

  PCBnew 4.0.2-stable on Windows 10 downloaded binaries (see details
  below)

  I discovered this bug while trying to track down an issue with my
  utility RenumKiCadPCB.

  It is easy to replicate. Download this project
  https://github.com/FPGAwars/icezum/tree/master/src-kicad

  With the original files you can generate a netlist in EESchema and import it via PCBNew with no errors in the import or DRC. However, if you change the reference designator of C67 in the schematic and PCB and regenerate the netlist and import it via PCBNew, you get an error on the netlist import and the DRC because the pour region is no longer associated with the net. If you type ‘B’ to repour, the pour becomes hatched.
  This is easy to fix: the net is now Net-C267, but the pour wants Net-(C67-1). You just edit the zone properties and select Net-(C267-1) and enter ‘B’ again. The DRC errors disappear even if you reimport the netlist.

  Application: kicad
  Version: 4.0.2-stable release build
  wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.2.0,wx containers,compatible with 2.8)
  Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
  Boost version: 1.57.0
           USE_WX_GRAPHICS_CONTEXT=OFF
           USE_WX_OVERLAY=OFF
           KICAD_SCRIPTING=ON
           KICAD_SCRIPTING_MODULES=ON
           KICAD_SCRIPTING_WXPYTHON=ON
           USE_FP_LIB_TABLE=HARD_CODED_ON
           BUILD_GITHUB_PLUGIN=ON

To manage notifications about this bug go to:
https://bugs.launchpad.net/kicad/+bug/1609401/+subscriptions

Revision history for this message
Jeff Young (jeyjey) wrote :

> Is this a vestige of the old library and therefore no longer an issue?

I don't know. My test produced conflicting results: either one of them is a false positive or the other is a false negative. Your guess is as good as mine. ;)

Note that I am pretty confident that none of this has anything to do with zone net assignments. But it does leave me wondering if there's another bug here....

Revision history for this message
Brian Piccioni (br0an) wrote :

When I recover a bit more I'll try exploring the laptop design. Maybe its more of the same, maybe its fixed, maybe its different.

-----Original Message-----
From: <email address hidden> <email address hidden> On Behalf Of Jeff Young
Sent: May 3, 2018 6:34 PM
To: <email address hidden>
Subject: [Bug 1609401] Re: PCBnew fails to update zone nets when importing netlist after re-annotating

> Is this a vestige of the old library and therefore no longer an issue?

I don't know. My test produced conflicting results: either one of them is a false positive or the other is a false negative. Your guess is as good as mine. ;)

Note that I am pretty confident that none of this has anything to do with zone net assignments. But it does leave me wondering if there's another bug here....

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1609401

Title:
  PCBnew fails to update zone nets when importing netlist after re-
  annotating

Status in KiCad:
  Fix Committed

Bug description:
  PCBnew fails to properly import netlist after changing annotation with
  pours

  PCBnew 4.0.2-stable on Windows 10 downloaded binaries (see details
  below)

  I discovered this bug while trying to track down an issue with my
  utility RenumKiCadPCB.

  It is easy to replicate. Download this project
  https://github.com/FPGAwars/icezum/tree/master/src-kicad

  With the original files you can generate a netlist in EESchema and import it via PCBNew with no errors in the import or DRC. However, if you change the reference designator of C67 in the schematic and PCB and regenerate the netlist and import it via PCBNew, you get an error on the netlist import and the DRC because the pour region is no longer associated with the net. If you type ‘B’ to repour, the pour becomes hatched.
  This is easy to fix: the net is now Net-C267, but the pour wants Net-(C67-1). You just edit the zone properties and select Net-(C267-1) and enter ‘B’ again. The DRC errors disappear even if you reimport the netlist.

  Application: kicad
  Version: 4.0.2-stable release build
  wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.2.0,wx containers,compatible with 2.8)
  Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
  Boost version: 1.57.0
           USE_WX_GRAPHICS_CONTEXT=OFF
           USE_WX_OVERLAY=OFF
           KICAD_SCRIPTING=ON
           KICAD_SCRIPTING_MODULES=ON
           KICAD_SCRIPTING_WXPYTHON=ON
           USE_FP_LIB_TABLE=HARD_CODED_ON
           BUILD_GITHUB_PLUGIN=ON

To manage notifications about this bug go to:
https://bugs.launchpad.net/kicad/+bug/1609401/+subscriptions

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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