KiCad segfaults while opening Eeschema (lp:#1752724)

[Original report](https://bugs.launchpad.net/bugs/1752724) created by **Robert Foss (robertfoss)**
```
This crash occurs when opening eeschema.
And happens on kicad-nightly, as well as the git version e3c71efbe


GDB Backtrace:

#0  0x00007ffff5705987 in __strncasecmp_l_avx () at
../sysdeps/x86_64/multiarch/strcmp-sse42.S:198
#1  0x00007fffe19c04e2 in strCompare(char const*, char const*, char
const**) (aString=0x7fffe1c89588 "Eeschema Schematic File Version",
aLine=0x0, aOutput=0x7fffffffbaf8) at
/home/robertfoss/tmp/kicad/eeschema/sch_legacy_plugin.cpp:116
#2  0x00007fffe19c3d33 in SCH_LEGACY_PLUGIN::loadHeader(FILE_LINE_READER&,
SCH_SCREEN*) (this=0x55555733bfb0, aReader=..., aScreen=0x5555572bd900) at
/home/robertfoss/tmp/kicad/eeschema/sch_legacy_plugin.cpp:787
#3  0x00007fffe19c3892 in SCH_LEGACY_PLUGIN::loadFile(wxString const&,
SCH_SCREEN*) (this=0x55555733bfb0, aFileName=..., aScreen=0x5555572bd900)
at /home/robertfoss/tmp/kicad/eeschema/sch_legacy_plugin.cpp:743
#4  0x00007fffe19c32f2 in SCH_LEGACY_PLUGIN::loadHierarchy(SCH_SHEET*)
(this=0x55555733bfb0, aSheet=0x5555571fc770) at
/home/robertfoss/tmp/kicad/eeschema/sch_legacy_plugin.cpp:688
#5  0x00007fffe19c2c1e in SCH_LEGACY_PLUGIN::Load(wxString const&, KIWAY*,
SCH_SHEET*, PROPERTIES const*) (this=0x55555733bfb0, aFileName=...,
aKiway=0x5555559126a0 <Kiway>, aAppendToMe=0x0, aProperties=0x0) at
/home/robertfoss/tmp/kicad/eeschema/sch_legacy_plugin.cpp:629
#6  0x00007fffe18e4da3 in
SCH_EDIT_FRAME::OpenProjectFiles(std::vector<wxString,
std::allocator<wxString> > const&, int) (this=0x5555571fab30,
aFileSet=std::vector of length 1, capacity 1 = {...}, aCtl=0) at
/home/robertfoss/tmp/kicad/eeschema/files-io.cpp:293
#7  0x00005555555f22d0 in KICAD_MANAGER_FRAME::RunEeschema(wxString const&)
(this=0x555555a708d0, aProjectSchematicFileName=...) at
/home/robertfoss/tmp/kicad/kicad/mainframe.cpp:325
#8  0x00005555555f26ca in
KICAD_MANAGER_FRAME::OnRunEeschema(wxCommandEvent&) (this=0x555555a708d0,
event=...) at /home/robertfoss/tmp/kicad/kicad/mainframe.cpp:347
#9  0x00007ffff69bb7ee in
wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) () at /usr/lib/x86_64-linux-
gnu/libwx_baseu-3.0.so.0
#10 0x00007ffff69bb8f3 in wxEventHashTable::HandleEvent(wxEvent&,
wxEvtHandler*) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#11 0x00007ffff69bbcbb in wxEvtHandler::TryHereOnly(wxEvent&) () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#12 0x0000555555632d08 in EDA_BASE_FRAME::ProcessEvent(wxEvent&)
(this=0x555555a708d0, aEvent=...) at
/home/robertfoss/tmp/kicad/common/eda_base_frame.cpp:191
#13 0x00007ffff69bbab3 in wxEvtHandler::DoTryChain(wxEvent&) () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#14 0x00007ffff69bbda5 in wxEvtHandler::ProcessEvent(wxEvent&) () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#15 0x00007ffff70a634b in wxWindowBase::TryAfter(wxEvent&) () at
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#16 0x00007ffff70a634b in wxWindowBase::TryAfter(wxEvent&) () at
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#17 0x00007ffff69bbb07 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#18 0x00007ffff6f24eb7 in  () at /usr/lib/x86_64-linux-
gnu/libwx_gtk2u_core-3.0.so.0
#19 0x00007ffff4a4df9d in g_closure_invoke () at /usr/lib/x86_64-linux-
gnu/libgobject-2.0.so.0
#20 0x00007ffff4a60b55 in  () at /usr/lib/x86_64-linux-
gnu/libgobject-2.0.so.0
#21 0x00007ffff4a694b5 in g_signal_emit_valist () at /usr/lib/x86_64-linux-
gnu/libgobject-2.0.so.0
#22 0x00007ffff4a69ecf in g_signal_emit () at /usr/lib/x86_64-linux-
gnu/libgobject-2.0.so.0
#23 0x00007ffff4fd4475 in  () at /usr/lib/x86_64-linux-
gnu/libgtk-x11-2.0.so.0
#24 0x00007ffff4a4df9d in g_closure_invoke () at /usr/lib/x86_64-linux-
gnu/libgobject-2.0.so.0
#25 0x00007ffff4a60dae in  () at /usr/lib/x86_64-linux-
gnu/libgobject-2.0.so.0
#26 0x00007ffff4a694b5 in g_signal_emit_valist () at /usr/lib/x86_64-linux-
gnu/libgobject-2.0.so.0
#27 0x00007ffff4a69ecf in g_signal_emit () at /usr/lib/x86_64-linux-
gnu/libgobject-2.0.so.0
#28 0x00007ffff4fd33f9 in  () at /usr/lib/x86_64-linux-
gnu/libgtk-x11-2.0.so.0
#29 0x00007ffff5078b7b in  () at /usr/lib/x86_64-linux-
gnu/libgtk-x11-2.0.so.0
#30 0x00007ffff4a4df9d in g_closure_invoke () at /usr/lib/x86_64-linux-
gnu/libgobject-2.0.so.0
#31 0x00007ffff4a60758 in  () at /usr/lib/x86_64-linux-
gnu/libgobject-2.0.so.0
#32 0x00007ffff4a68e4f in g_signal_emit_valist () at /usr/lib/x86_64-linux-
gnu/libgobject-2.0.so.0
#33 0x00007ffff4a69ecf in g_signal_emit () at /usr/lib/x86_64-linux-
gnu/libgobject-2.0.so.0
#34 0x00007ffff518ef9c in  () at /usr/lib/x86_64-linux-
gnu/libgtk-x11-2.0.so.0
#35 0x00007ffff507731c in gtk_propagate_event () at /usr/lib/x86_64-linux-
gnu/libgtk-x11-2.0.so.0
#36 0x00007ffff507771b in gtk_main_do_event () at /usr/lib/x86_64-linux-
gnu/libgtk-x11-2.0.so.0
#37 0x00007ffff4cecf0c in  () at /usr/lib/x86_64-linux-
gnu/libgdk-x11-2.0.so.0
#38 0x00007ffff4302fb7 in g_main_context_dispatch () at /lib/x86_64-linux-
gnu/libglib-2.0.so.0
#39 0x00007ffff43031f0 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007ffff4303502 in g_main_loop_run () at /lib/x86_64-linux-
gnu/libglib-2.0.so.0
#41 0x00007ffff5076727 in gtk_main () at /usr/lib/x86_64-linux-
gnu/libgtk-x11-2.0.so.0
#42 0x00007ffff6ec4905 in wxGUIEventLoop::DoRun() () at
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#43 0x00007ffff6877a73 in wxEventLoopBase::Run() () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#44 0x00007ffff683ef96 in wxAppConsoleBase::MainLoop() () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#45 0x00005555555f0131 in APP_KICAD::OnRun() (this=0x55555599e5f0) at
/home/robertfoss/tmp/kicad/kicad/kicad.cpp:233
#46 0x00007ffff68c9d69 in wxEntry(int&, wchar_t**) () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#47 0x00005555555eebdb in main(int, char**) (argc=1, argv=0x7fffffffe178)
at /home/robertfoss/tmp/kicad/kicad/kicad.cpp:265
```
Original tags: eeschema

Story points: 6.0