Segfault opening eeschema on old project (lp:#1782661)

[Original report](https://bugs.launchpad.net/bugs/1782661) created by **Fabián Inostroza (fabianinostroza)**
```
Tried to open the schematic in the attached project and kicad segfaults.

I can reproduce the segfault with other projects made with kicad 4.0.7.

Application: kicad
Version: (6.0.0-rc1-dev-86-g1132b3fa4), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.60.0 GnuTLS/3.5.18 zlib/1.2.11 libidn2/2.0.4 libpsl/0.20.2
(+libidn2/2.0.4) libssh2/1.8.0 nghttp2/1.32.0 librtmp/2.3
Platform: Linux 4.16.0-2-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.62.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.60.0
    Compiler: GCC 7.3.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=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=OFF

This is the backtrace
#0  0x00007fffdf17292e in wxWindowBase::GetParent() const (this=0x0) at
/usr/include/wx-3.0/wx/window.h:802
#1  0x00007fffdf439f95 in DIALOG_SHIM::DIALOG_SHIM(wxWindow*, int, wxString
const&, wxPoint const&, wxSize const&, long, wxString const&)
(this=0x7fffffffc280, aParent=0x0, id=-1, title=..., pos=..., size=...,
style=536877120, name=...) at /media/Datos/kicad/common/dialog_shim.cpp:68
#2  0x00007fffdf3ece31 in
DIALOG_DISPLAY_HTML_TEXT_BASE::DIALOG_DISPLAY_HTML_TEXT_BASE(wxWindow*,
int, wxString const&, wxPoint const&, wxSize const&, long)
(this=0x7fffffffc280, parent=0x0, id=-1, title=..., pos=..., size=...,
style=536877120) at
/media/Datos/kicad/common/dialogs/dialog_display_info_HTML_base.cpp:12
#3  0x00007fffdf4892c0 in HTML_MESSAGE_BOX::HTML_MESSAGE_BOX(wxWindow*,
wxString const&) (this=0x7fffffffc280, parent=0x0, aTitle=...) at
/media/Datos/kicad/common/html_messagebox.cpp:32
#4  0x00007fffdf399ebb in PROJECT::SchLibs() (this=0x55555571ffb0
<Kiway+144>) at /media/Datos/kicad/eeschema/sch_edit_frame.cpp:177
#5  0x00007fffdf26e6ab in
SCH_EDIT_FRAME::OpenProjectFiles(std::vector<wxString,
std::allocator<wxString> > const&, int) (this=0x555557157220,
aFileSet=std::vector of length 1, capacity 1 = {...}, aCtl=0) at
/media/Datos/kicad/eeschema/files-io.cpp:273
#6  0x00005555555f3006 in KICAD_MANAGER_FRAME::RunEeschema(wxString const&)
(this=0x555555885e20, aProjectSchematicFileName=...) at
/media/Datos/kicad/kicad/mainframe.cpp:326
#7  0x00005555555f3366 in
KICAD_MANAGER_FRAME::OnRunEeschema(wxCommandEvent&) (this=0x555555885e20,
event=...) at /media/Datos/kicad/kicad/mainframe.cpp:348
#8  0x00007ffff65338ce in
wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&) () at /usr/lib/x86_64-linux-
gnu/libwx_baseu-3.0.so.0
#9  0x00007ffff65339d3 in wxEventHashTable::HandleEvent(wxEvent&,
wxEvtHandler*) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#10 0x00007ffff6533d9b in wxEvtHandler::TryHereOnly(wxEvent&) () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#11 0x00007ffff6533e23 in wxEvtHandler::ProcessEventLocally(wxEvent&) () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#12 0x00007ffff6533e85 in wxEvtHandler::ProcessEvent(wxEvent&) () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#13 0x000055555562652d in EDA_BASE_FRAME::ProcessEvent(wxEvent&)
(this=0x555555885e20, aEvent=...) at
/media/Datos/kicad/common/eda_base_frame.cpp:192
#14 0x00007ffff6534ff2 in wxEvtHandler::ProcessPendingEvents() () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#15 0x00007ffff63b5df7 in wxAppConsoleBase::ProcessPendingEvents() () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#16 0x00007ffff6c7c78d in wxApp::DoIdle() (this=0x5555557af160) at
../src/gtk/app.cpp:157
#17 0x00007ffff6c7c893 in wxapp_idle_callback(gpointer) () at
../src/gtk/app.cpp:107
#18 0x00007ffff1fd50f5 in g_main_context_dispatch () at
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff1fd54c0 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff1fd57d2 in g_main_loop_run () at /usr/lib/x86_64-linux-
gnu/libglib-2.0.so.0
#21 0x00007ffff330a987 in IA__gtk_main () at ./gtk/gtkmain.c:1270
#22 0x00007ffff6c9c6d5 in wxGUIEventLoop::DoRun() (this=0x5555559daca0) at
../src/gtk/evtloop.cpp:65
#23 0x00007ffff63efea3 in wxEventLoopBase::Run() () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#24 0x00007ffff63b74b6 in wxAppConsoleBase::MainLoop() () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#25 0x00005555555f0c9e in APP_KICAD::OnRun() (this=0x5555557af160) at
/media/Datos/kicad/kicad/kicad.cpp:256
#26 0x00007ffff6441ef9 in wxEntry(int&, wchar_t**) () at
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#27 0x00005555555ef813 in main(int, char**) (argc=1, argv=0x7fffffffe1d8)
at /media/Datos/kicad/kicad/kicad.cpp:287
```

Story points: 6.0