ERC doesn't flag unnannotated "phantom" sheet V5

Bug #1750620 reported by Brian Piccioni on 2018-02-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Low
Jon Evans

Bug Description

I don’t know if this is a bug but it is somehow “not right”

eeSchema error check does not flag unannotated reference designations in a “phantom” second instantiation of a sheet.

In this project: https://github.com/OLIMEX/DIY-LAPTOP/tree/master/HARDWARE/A64-TERES/TERES-PCB1-A64-MAIN_Rev_C

LCD.sch is only present in 1 copy on the main sheet (zoom out: they are below the bottom of the sheet).

In the file there appears to be 2 instantiations:

$Comp
L TERES:RCLAMP0524P U?
U 1 1 57E655B9
P 12050 2500
AR Path="/56344A84/57E655B9" Ref="U?" Part="1"
AR Path="/57E60F97/57E655B9" Ref="U15" Part="1"
F 0 "U15" H 11870 2770 50 0000 L BNN
F 1 "RCLAMP0524P(SLP2510P8)" H 11700 2200 30 0000 L BNN
F 2 "OLIMEX_Devices-FP:SLP2510P8" H 12080 2650 20 0001 C CNN
F 3 "" H 12050 2500 60 0000 C CNN
 1 12050 2500
 1 0 0 -1
$EndComp

Note the U?, meaning there was no annotation. Running electrical rules check on the schematic shows no errors associated with no annotation (I get 6 warnings and 1 error not related to the lack of annotation).
I have no idea how this second instantiation happened – it does not appear to be in the PCB file – but essentially the lcd.sch file is corrupt and not flagged as such.

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

Wayne Stambaugh (stambaughw) wrote :

@Brian, did you at one point have the "eDP LCD" sheet in the "Power Supply, Extensions and MiPi-DSI" sheet and then move it to the root sheet? Judging by the time stamps, that appears to be the cause of the phantom hierarchical component definitions. I don't think this will cause any issues but I am curious as to how this happened. I've never seen this behavior before but then again I don't look at every schematic file after I create a schematic. @JP, have you ever seen this before and if so should we be concerned about it? I would think that any left over hierarchy definitions would get removed when the file either moved or saved.

Yes.
It happens when in a complex hierarchy, one sheet is deleted, or when copying sheets coming from a complex hierarchy from an project.

It creates no issues, and it is cleared only when clearing full annotation in a schematic project.

Download full text (3.4 KiB)

I didn't modify the files at github. Those are the original files of the board designer. I didn't use KiCad to modify the files at all.

I expect they screwed something up. My point is that the ERC or something should catch the bad file format.

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Wayne Stambaugh
Sent: February 21, 2018 8:44 AM
To: <email address hidden>
Subject: [Bug 1750620] Re: ERC doesn't flag unnannotated "phantom" sheet V5

@Brian, did you at one point have the "eDP LCD" sheet in the "Power Supply, Extensions and MiPi-DSI" sheet and then move it to the root sheet? Judging by the time stamps, that appears to be the cause of the phantom hierarchical component definitions. I don't think this will cause any issues but I am curious as to how this happened. I've never seen this behavior before but then again I don't look at every schematic file after I create a schematic. @JP, have you ever seen this before and if so should we be concerned about it? I would think that any left over hierarchy definitions would get removed when the file either moved or saved.

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

Title:
  ERC doesn't flag unnannotated "phantom" sheet V5

Status in KiCad:
  New

Bug description:
  I don’t know if this is a bug but it is somehow “not right”

  eeSchema error check does not flag unannotated reference designations
  in a “phantom” second instantiation of a sheet.

  In this project: https://github.com/OLIMEX/DIY-
  LAPTOP/tree/master/HARDWARE/A64-TERES/TERES-PCB1-A64-MAIN_Rev_C

  LCD.sch is only present in 1 copy on the main sheet (zoom out: they
  are below the bottom of the sheet).

  In the file there appears to be 2 instantiations:

  $Comp
  L TERES:RCLAMP0524P U?
  U 1 1 57E655B9
  P 12050 2500
  AR Path="/56344A84/57E655B9" Ref="U?" Part="1"
  AR Path="/57E60F97/57E655B9" Ref="U15" Part="1"
  F 0 "U15" H 11870 2770 50 0000 L BNN
  F 1 "RCLAMP0524P(SLP2510P8)" H 11700 2200 30 0000 L BNN
  F 2 "OLIMEX_Devices-FP:SLP2510P8" H 12080 2650 20 0001 C CNN
  F 3 "" H 12050 2500 60 0000 C CNN
   1 12050 2500
   1 0 0 -1
  $EndComp

  Note the U?, meaning there was no annotation. Running electrical rules check on the schematic shows no errors associated with no annotation (I get 6 warnings and 1 error not related to the lack of annotation).
  I have no idea how this second instantiation happened – it does not appear to be in the PCB file – but essentially the lcd.sch file is corrupt and not flagged as such.

  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_SCRIPTI...

Read more...

Wayne Stambaugh (stambaughw) wrote :

I'm not sure what we could do about the deleted sheet but we could clear
the annotation for copied sheets which should clean up any phantom sheet
path information. Otherwise we would have to create some code that
would check for invalid sheet paths and remove the phantom sheet paths
left over from the copied sheet.

On 2/21/2018 9:29 AM, jean-pierre charras wrote:
> Yes.
> It happens when in a complex hierarchy, one sheet is deleted, or when copying sheets coming from a complex hierarchy from an project.
>
> It creates no issues, and it is cleared only when clearing full
> annotation in a schematic project.
>

Wayne Stambaugh (stambaughw) wrote :
Download full text (4.0 KiB)

On 2/21/2018 9:55 AM, Brian Piccioni wrote:
> I didn't modify the files at github. Those are the original files of the
> board designer. I didn't use KiCad to modify the files at all.
>
> I expect they screwed something up. My point is that the ERC or
> something should catch the bad file format.

This information is ignored because it has no meaning when the netlist
is generated which is used to perform the ERC . It is merely extra
information left over from a sheet copy or including a sheet from
another project so it's technically not a bad file format. We should
remove this to prevent any unexpected surprises should the user ever
look at the files and for users who use vcs.

>
> -----Original Message-----
> From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Wayne Stambaugh
> Sent: February 21, 2018 8:44 AM
> To: <email address hidden>
> Subject: [Bug 1750620] Re: ERC doesn't flag unnannotated "phantom" sheet V5
>
> @Brian, did you at one point have the "eDP LCD" sheet in the "Power
> Supply, Extensions and MiPi-DSI" sheet and then move it to the root
> sheet? Judging by the time stamps, that appears to be the cause of the
> phantom hierarchical component definitions. I don't think this will
> cause any issues but I am curious as to how this happened. I've never
> seen this behavior before but then again I don't look at every schematic
> file after I create a schematic. @JP, have you ever seen this before
> and if so should we be concerned about it? I would think that any left
> over hierarchy definitions would get removed when the file either moved
> or saved.
>
> --
> You received this bug notification because you are subscribed to the bug report.
> https://bugs.launchpad.net/bugs/1750620
>
> Title:
> ERC doesn't flag unnannotated "phantom" sheet V5
>
> Status in KiCad:
> New
>
> Bug description:
> I don’t know if this is a bug but it is somehow “not right”
>
> eeSchema error check does not flag unannotated reference designations
> in a “phantom” second instantiation of a sheet.
>
> In this project: https://github.com/OLIMEX/DIY-
> LAPTOP/tree/master/HARDWARE/A64-TERES/TERES-PCB1-A64-MAIN_Rev_C
>
> LCD.sch is only present in 1 copy on the main sheet (zoom out: they
> are below the bottom of the sheet).
>
> In the file there appears to be 2 instantiations:
>
> $Comp
> L TERES:RCLAMP0524P U?
> U 1 1 57E655B9
> P 12050 2500
> AR Path="/56344A84/57E655B9" Ref="U?" Part="1"
> AR Path="/57E60F97/57E655B9" Ref="U15" Part="1"
> F 0 "U15" H 11870 2770 50 0000 L BNN
> F 1 "RCLAMP0524P(SLP2510P8)" H 11700 2200 30 0000 L BNN
> F 2 "OLIMEX_Devices-FP:SLP2510P8" H 12080 2650 20 0001 C CNN
> F 3 "" H 12050 2500 60 0000 C CNN
> 1 12050 2500
> 1 0 0 -1
> $EndComp
>
> Note the U?, meaning there was no annotation. Running electrical rules check on the schematic shows no errors associated with no annotation (I get 6 warnings and 1 error not related to the lack of annotation).
> I have no idea how this second instantiation happened – it does not appear to be in the PCB file – but essentially the lcd.sch file is corrupt and not flagged as suc...

Read more...

Brian Piccioni (br0an) wrote :

The thing is with stuff like this is spurious information in the file could cause issues down the road. For example the netlist parser might be changed in the future and the file, and all files based on it, would break.

Anyhow you folks know a lot more about this than I do. I figured I'd bring it to your attention.

Still I think it is dangerous to leave garbage in a source file, even if that garbage has no effect currently.

Jeff Young (jeyjey) on 2018-03-06
Changed in kicad:
status: New → Triaged
importance: Undecided → Low
Jon Evans (craftyjon) on 2018-03-08
Changed in kicad:
assignee: nobody → Jon Evans (craftyjon)
milestone: none → 6.0.0-rc1
tags: added: eeschema erc
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers