Running kicad with a .sch or .kicad_sch as parameter 1) asserts; 2) opens the project, but the GUI shows the .sch as project name
Description
Running kicad from the command line with a .sch, .kicad_sch or .kicad_pcb file opens the kicad project view, as if .kicad_pro had been opened. However, the project name is shown as the .kicad_pcb or .kicad_sch file. I think this is only cosmetic; saves still seem to go into the .kicad_pro file, but it is a bit scary. (Did KiCad 5 open the schematic or pcb directly when given it as an argument? I don't remember.) Before this, on a debug run, an assertion failure "kicad/common/project.cpp(103): assert "m_project_name.GetExt() == ProjectFileExtension" failed in setProjectFullName()." is shown.
Steps to reproduce
- Run 'kicad something.kicad_pcb' from the command line
- Observe the assertion failure (if on a debug build)
- Observe that the project name is shown as the .kicad_pcb
KiCad Version
Application: KiCad
Version: (5.99.0-8928-gc255dede17), debug build
Libraries:
wxWidgets 3.0.5
libcurl/7.75.0 OpenSSL/1.1.1i zlib/1.2.11 zstd/1.4.8 libidn2/2.3.0 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.41.0
Platform: Linux 5.10.5-arch1-1 x86_64, 64 bit, Little endian, wxGTK, KDE, x11
Build Info:
Date: Feb 7 2021 19:30:45
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.75.0
OCC: 7.5.0
Curl: 7.74.0
ngspice: 33
Compiler: GCC 10.2.0 with C++ ABI 1014
Build settings:
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
KICAD_SCRIPTING_ACTION_MENU=ON
KICAD_USE_OCC=ON
KICAD_SPICE=ON
KICAD_STDLIB_DEBUG=OFF
KICAD_STDLIB_LIGHT_DEBUG=OFF
KICAD_SANITIZE=OFF