Opening top level schematic when sublevel fails

Hi all,

When opening a top level schematic that has sub schematics, EEschema tries to open all underlying sub level schematics. That’s fine.
But when something goes wrong in opening the sub level schematics, it generates an error message and fails to open the top level schematic. Instead, it presents a new, empty schematic.

As a consequence, once you loose a sub schematic, you loose everything that is in the top level too. This is a bit harsh.
I would like to propose that, whenever loading a sub schematic fails, the top level still opens, so that you can at least save whatever is in the top level and possibly correct pathnames etc.

How do you all feel about that?

I never had this issue, so I cannot give you advice about it.

But the good news is that your work is not lost. The .sch files of your project still have the information. Try to load them into a new project.

If you would like to reproduce the behaviour, try the following:

Create a project and a top level schematic.
Create two different sub level schematics.
Now save and quit kiCAD
Remove one of the SUB schematics from your disk.
Reopen the top level schematic in KiCAD. It now fails to open the TOP level schematic.

I know the .sch is not lost and I know how to repair the situation from backup. My suggestion is to change the way in which EEschema handles the error situation to be a little more friendly to the user.

OK, I see.
I think this issue showed up in this forum months ago. It had a workaround: create again a new file in your disk with the same name as the one removed, open the project and delete the sheet from inside the schematic.
i can’t test it right now anyway.

My nightly from February under Windows doesn’t crap out on that problem.
Just copied a project into a new project folder and removed some sub-sheets and EEschema told me that those sheets aren’t available like this:

But after hitting OK it loaded the top level sheet just fine.

PS: my KiCAD version info:

Application: kicad
Version: (2017-02-10 revision 1bcbbb4)-makepkg, release build
Libraries: wxWidgets 3.0.2
libcurl/7.51.0 OpenSSL/1.0.2j zlib/1.2.8 libssh2/1.8.0 nghttp2/1.16.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.2 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.62.0
    Curl: 7.51.0
    KiCad - Compiler: GCC 6.3.0 with C++ ABI 1010
    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_SCH_IO_MANAGER=OFF
    KICAD_USE_OCE=ON

Interesting.
The newer nightlies are different.

m

1 Like

That’s correct, just tried with the latest… won’t open the top level sheet and just give you an empty noname.sch instead.

Do you want to file the bugreport or shall I?

Please, be my guest Joan.

This is probably related, albeit not exactly the same, to bug reports #1683921 and #1689763.
If the older versions are behaving differently, it is probably regression.

Logged.

1 Like

Thanks. I noted it affects me.