eeschema: Error occured when open hierarchical schematic

Bug #1748401 reported by Denis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Medium
Wayne Stambaugh

Bug Description

Eeschema can not open hierarchical schematic lists located in sub patch of project.
Error in path by cycling sub patch. Please, look at attached screenshot.

Project pach: C:\MyProgs\repos-git-svn-hg-cvs\adapter
Sub folder: C:\MyProgs\repos-git-svn-hg-cvs\adapter\building-blocks

As you can see on attached screenshot "building-blocks" added and repeated each time when eeschema trying to open some schematic.

KiCAD version:
http://downloads.kicad-pcb.org/windows/nightly/kicad-r9376.be70ce7d4-x86_64.exe

Application: kicad
Version: (2018-02-08 revision be70ce7d4)-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 7 (build 7601, Service Pack 1), 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

Tags: eeschema
Revision history for this message
Denis (denis-andreevich) wrote :
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Please attach the project to this bug report. I have a deeply nested test project and I have no issues so I need to see your subfolder structure and the file paths in your sheet definitions to reproduce the bug.

Revision history for this message
Denis (denis-andreevich) wrote :

Hello! I attached my project. Please check.
Also I tryed latest version of KiCAD:
http://downloads.kicad-pcb.org/windows/nightly/kicad-r9433.ac9fc949b-x86_64.exe
Bug also is present in this version.

Changed in kicad:
milestone: none → 5.0.0-rc2
Changed in kicad:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Wayne Stambaugh (stambaughw)
Changed in kicad:
status: Confirmed → In Progress
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: In Progress → Fix Committed
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Denis, thank you for the sample project so I could test this. It was immediately obvious what the issue was. There are two issues at play here. One is with kicad which I have already fixed. The other is with how you have defined nested sheets in your schematic. For example, in the root sheet you have a sheet named "DI16" which references schematic "building-blocks/DI16.sch". Once you enter that sheet, all subsequent sheet file paths are relative (assuming you used a relative path in the sheet file name) to the project path plus "/building-blocks". Inside sheet "DT16" you have 16 sub-sheets all referencing the same sheet file "building-blocks/Digital_Input_Iosl.sch". The problem is that they all are already referencing the "/building-blocks" path". When this gets appended to "project/path/building-blocks", the final path will end up being "project/path/building-blocks/building-blocks" which is wrong. For all nested sheets in a sheet that already references the "/building-blocks" path, you should not include another schematic file sub-path because the path hierarchy already references this path. The easiest way to think of it is to think about is is like walking up and down a directory tree. If this worked in the past, it was by shear dumb luck. I suppose I'm going to have to face the music for this when version 5 is released.

Revision history for this message
Denis (denis-andreevich) wrote :

Hello Wayne!
I understood my mistake. The sheets in the "building-blocks" folder should not have in their path a folder "building-blocks". It is obvious.
Such paths were left for the reason that I copied the "DI16.sch" file from the project root folder to the "building-blocks" folder. And it worked until a certain moment...
Thanks for the fix and for pointing out my mistake! :)

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Hi Dennis,

You are welcome. Thank you for providing a sample project to test. This is more helpful than most users realize and it allowed me to immediately identify the issue. Anything that cuts down on the amount of time to fix bugs is a good thing. I do need to document the hierarchical path behavior so users will understand how this works and it's on my todo list. Thank you for using KiCad.

Cheers,

Wayne

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.

Other bug subscribers

Remote bug watches

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