Unable to open sub schematic

I am using the nightly build version and I am aware that I am using work in progress and that it is possible to encounter problems. I just love the new libngspice feature a lot. A lot!

I have been using a schematic with hierarchical levels. That was working fine two or so weeks ago. This morning I tried to open the top level schematic and got this error:

Error loading schematic file ‘/home/mifi/Werk/KiCAD/Projects/802F/802-active.2/802-active.sch’.
Unable to open filename ‘/home/mifi/Werk/KiCAD/Projects/802F/802-active.2/symm-input.sch’ for reading

Eeschema seems to be looking in the wrong place when it tries to open the sublevel schematics,
In the 802-active.sch I have the following lines:

F0 “input&subsonic” 60
F1 “symm-input/symm-input.sch” 60

which used to work just fine. However, EEschema is looking in the top directory.

Then it even got weirder:
I started a new toplevel schematic, with a new hierarchical level pointing at symm-input/symm-input.sch. That was working fine. I could freely step down and up, no worries.
Then I saved my top level schematic and reopened it, expecting to have everything happy again, but it was not. Same error.

It seems I can tell EEschema were the sublevel schematic is, but it forgets to include the pathname when reopening it.

Does anyone have a clue as to what I am doing wrong?
m

P.S. My KiCAD version info:
Version info:
Application: kicad
Version: no-vcs-found-6cefb68~58~ubuntu16.04.1, release build
Libraries: wxWidgets 3.0.2
libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.4.0-77-generic x86_64, 64 bit, Little endian, wxGTK

  • Build Info -
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.58.0
    Curl: 7.47.0
    KiCad - Compiler: GCC 5.4.0 with C++ ABI 1009
    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

Possibly the “.2”?

I know that when I had issues, trying to fix it, not knowing exactly what to do, I only made things worse, much worse.

I read something on this forum about making things much worse… ^o^
I made a backup before anything, so I can, more or less, freely experiment.
I will give removing the .2 a try.
It is probably behaviour that has recently been introduced, because I have set up this structure some time ago without any problems in an older version of KiCAD and only last week changed to the nightly builds.

m

1 Like

Nope. Removing the “.2” made no difference.
Can anyone else offer any hope or would it be better to abandon sub schematics completely?

I was planning on using 12 sub schematics in this project and I hate it when too many of files are all mixed into one single large directory, i.e. “.sch”, “.bak” etc etc, hence the subdivision into directories.

m

Well, so long as you have a backup…

I’d try to create a new sheet, maybe even with the same name.

Using a text EDITOR I would copy the TEXT of the original sheet schematic into the new sheet, HOWEVER, keeping the second sheets timestamp.

Then, again using the editor, I’d delete the first schematic name and timestamp from the main .sch file.

But I don’t make any promises that this will actually work; it is just what I would try.

ON EDIT: To be clear, I think the timestamp may be wrong for the sheet that appears to be correct. I think KiCad is looking at another sheet based upon the timestamp; not the sheet “you” think it is looking at.

ON EDIT 2: Don’t ask me how I even know about this…

That is exactly how it used to work for me too. And likewise, I was using an older version of KiCAD at that time.
Thanks.
m

If timestamps are the problem, I am in trouble.
I am moving back and forth between machines, taking a copy of the development tree with me when I move.

Scenario:
I set up the directory structure and schematics on machine A with a stable version of KiCAD.
I copied the directory structure to machine B, running a stable version of KiCAD.
I upgraded to nightly builds on machine B, but did not check navigating the hierarchy.
I copied the directory structure after doing some work and moved back to machine A.
On machine A I upgraded KiCAD also to the nightly builds.

The problem occurred when I came back to one of the earlier PC’s and ‘rsyncd’ the newer versions of the schematics onto the older directory structure. Perhaps this breaks some assumption about timestamps, as you suggest.

I could give up on the hierarchy and stick to a strictly modular design, that would work as a temporary workaround, but it would be a pity to loose the overall structure.

m

Just keep the subsheets in the same folder as the main project instead of having the subsheets in subfolders until it works as it used to.

1 Like

That would be an option too, yes.

m

For the record…
I reported a bug (#1689763), because it probably has something to do with pathname/filename processing in EEschema.
It is not a high priority bug and there is a workaround, but I figured it was better to get it into the bugs list than to forget about it.
Please correct me if I am wrong.

m

2 Likes

Reporting a bug with a complete report is absolutely the correct thing to do.

1 Like

And there is a fix. I just verified that, with this fix, all is well again.
I compiled from source, but I guess the fix will be in the nightly build very soon. (tonight probably?)
For anyone interested, there is more info in bug report #1683921. Mine was a duplicate.

m

1 Like