5.1.5-0-10_14 eeschema hangs on open (macOS) (lp:#1854989)

[Original report](https://bugs.launchpad.net/bugs/1854989) created by **Andrew Keene (andrewkeene85)**
```
Can't open any .sch file, even a blank one without it hanging the system.

Application: KiCad
Version: (5.1.5-0-10_14), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1
Platform: Mac OS X (Darwin 18.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=ON
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON


Date/Time:       2019-12-03 10:55:40 -0800
End time:        2019-12-03 10:55:41 -0800
OS Version:      Mac OS X 10.14.6 (Build 18G1012)
Architecture:    x86_64h
Report Version:  28

Data Source:     Stackshots
Shared Cache:    0x32b2000 204F8335-99B6-3DDC-BF51-ECD97C8BE9A4

Command:         eeschema
Path:
/Applications/KiCad/KiCad.app/Contents/Applications/eeschema.app/Contents/MacOS/eeschema
Identifier:      org.kicad-pcb.eeschema
Version:         5.1.5 ()
Parent:          launchd [1]
PID:             47513

Event:           hang
Duration:        1.10s (process was unresponsive for 77 seconds before
sampling)
Steps:           11 (100ms sampling interval)

Hardware model:  MacBookPro15,1
Active cpus:     12

Time Awake Since Boot: 17000s
Time Since Wake: 4400s

--------------------------------------------------
Timeline format: stacks are sorted chronologically
Use -i and -heavy to re-report with count sorting
--------------------------------------------------

Heaviest stack for the main thread of the target process:
  11  start + 1 (libdyld.dylib + 91093) [0x7fff5abec3d5]
  11  main + 48 (eeschema + 17808) [0x109cbe590]
  11  wxEntry(int&, wchar_t**) + 58 (libwx_osx_cocoau-3.0.0.4.0.dylib +
480266) [0x109de640a]
  11  APP_SINGLE_TOP::OnRun() + 25 (eeschema + 24553) [0x109cbffe9]
  11  wxApp::OnRun() + 26 (libwx_osx_cocoau-3.0.0.4.0.dylib + 1624378)
[0x109efd93a]
  11  wxAppConsoleBase::MainLoop() + 99 (libwx_osx_cocoau-3.0.0.4.0.dylib +
42083) [0x109d7b463]
  11  wxEventLoopBase::Run() + 162 (libwx_osx_cocoau-3.0.0.4.0.dylib +
244594) [0x109dacb72]
  11  wxCFEventLoop::DoRun() + 49 (libwx_osx_cocoau-3.0.0.4.0.dylib +
975121) [0x109e5f111]
  11  wxGUIEventLoop::OSXDoRun() + 174 (libwx_osx_cocoau-3.0.0.4.0.dylib +
2045486) [0x109f6462e]
  11  -[NSApplication run] + 699 (AppKit + 79240) [0x7fff2c254588]
  11  -[NSApplication(NSEvent)
_nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361 (AppKit +
103531) [0x7fff2c25a46b]
  11  _DPSNextEvent + 1135 (AppKit + 108413) [0x7fff2c25b77d]
  11  _BlockUntilNextEventMatchingListInModeWithFilter + 64 (HIToolbox +
44150) [0x7fff2dec2c76]
  11  ReceiveNextEventCommon + 355 (HIToolbox + 44525) [0x7fff2dec2ded]
  11  RunCurrentEventLoopInMode + 292 (HIToolbox + 45483) [0x7fff2dec31ab]
  11  CFRunLoopRunSpecific + 455 (CoreFoundation + 239214) [0x7fff2ec6466e]
  11  __CFRunLoopRun + 1136 (CoreFoundation + 240944) [0x7fff2ec64d30]
  11  __CFRunLoopDoObservers + 451 (CoreFoundation + 624141)
[0x7fff2ecc260d]
  11  __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
(CoreFoundation + 624344) [0x7fff2ecc26d8]
  11  wxCFEventLoop::OSXCommonModeObserverCallBack(__CFRunLoopObserver*,
int, void*) + 66 (libwx_osx_cocoau-3.0.0.4.0.dylib + 972738) [0x109e5e7c2]
  11  wxAppConsoleBase::ProcessPendingEvents() + 215
(libwx_osx_cocoau-3.0.0.4.0.dylib + 45095) [0x109d7c027]
  11  wxEvtHandler::ProcessPendingEvents() + 478
(libwx_osx_cocoau-3.0.0.4.0.dylib + 1160574) [0x109e8c57e]
  11  wxEvtHandler::ProcessEvent(wxEvent&) + 100
(libwx_osx_cocoau-3.0.0.4.0.dylib + 1161428) [0x109e8c8d4]
  11  wxEvtHandler::ProcessEventLocally(wxEvent&) + 93
(libwx_osx_cocoau-3.0.0.4.0.dylib + 1161821) [0x109e8ca5d]
  11  wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 239
(libwx_osx_cocoau-3.0.0.4.0.dylib + 1156639) [0x109e8b61f]
  11  EDA_DRAW_PANEL_GAL::onPaint(wxPaintEvent&) + 822 (_eeschema.kiface +
4277350) [0x10f92f466]
  11  KIGFX::OPENGL_GAL::endDrawing() + 436 (_eeschema.kiface + 4348772)
[0x10f940b64]
  11  wxGLCanvas::SwapBuffers() + 45 (libwx_osx_cocoau_gl-3.0.0.4.0.dylib +
28845) [0x109d620ad]
  11  -[NSOpenGLContext flushBuffer] + 27 (AppKit + 4024680)
[0x7fff2c617968]
  11  CGLFlushDrawable + 59 (OpenGL + 55119) [0x7fff388c974f]
  11  glSwap_Exec + 97 (GLEngine + 112145) [0x7fff388e7611]
  11  gldPresentFramebufferData + 83 (AMDRadeonX4000GLDriver + 411287)
[0x1100e0697]
  11  glrATI_Hwl_SubmitPacketsWithToken + 110 (AMDRadeonX4000GLDriver +
43898) [0x110086b7a]
  11  gpusSubmitDataBuffers + 136 (libGPUSupportMercury.dylib + 13774)
[0x7fff49cd65ce]
  11  IOAccelContextSubmitDataBuffersExt2 + 258 (IOAccelerator + 11529)
[0x7fff4bfe1d09]
  11  IOConnectCallStructMethod + 38 (IOKit + 34219) [0x7fff3156e5ab]
  11  IOConnectCallMethod + 244 (IOKit + 32117) [0x7fff3156dd75]
  11  io_connect_method + 374 (IOKit + 32531) [0x7fff3156df13]
  11  mach_msg_trap + 10 (libsystem_kernel.dylib + 4650) [0x7fff5ad2122a]
 *11  hndl_mach_scall64 + 22 (kernel + 1429942) [0xffffff800035d1b6]
 *11  mach_call_munger64 + 599 (kernel + 2893527) [0xffffff80004c26d7]
 *11  mach_msg_overwrite_trap + 974 (kernel + 1720910) [0xffffff80003a424e]
 *11  ipc_kmsg_send + 209 (kernel + 1637169) [0xffffff800038fb31]
 *11  ipc_kobject_server + 300 (kernel + 1789372) [0xffffff80003b4dbc]
 *11  ??? (kernel + 2716854) [0xffffff80004974b6]
 *11  is_io_connect_method + 530 (kernel + 8973986) [0xffffff8000a8eea2]
 *11  IOUserClient::externalMethod(unsigned int,
IOExternalMethodArguments*, IOExternalMethodDispatch*, OSObject*, void*) +
832 (kernel + 8936288) [0xffffff8000a85b60]
 *11  shim_io_connect_method_structureI_structureO + 460 (kernel + 8943932)
[0xffffff8000a8793c]
 *11
IOAccelContext2::submit_data_buffers(IOAccelContextSubmitDataBuffersIn*,
IOAccelContextSubmitDataBuffersOut*, unsigned long long, unsigned long
long*) + 1224 (IOAcceleratorFamily2 + 22024) [0xffffff7f843c6608]
 *11  IOAccelGLContext2::processDataBuffers(unsigned int) + 173
(IOAcceleratorFamily2 + 59839) [0xffffff7f843cf9bf]
 *11  lck_mtx_sleep + 128 (kernel + 1833072) [0xffffff80003bf870]
 *11  thread_block_reason + 175 (kernel + 1884399) [0xffffff80003cc0ef]
 *11  ??? (kernel + 1890889) [0xffffff80003cda49]
 *11  machine_switch_context + 195 (kernel + 2980019) [0xffffff80004d78b3]

Process:         eeschema [47513]
UUID:            9B621BE5-B8FE-30C3-8149-09FF9B12920D
Path:
/Applications/KiCad/KiCad.app/Contents/Applications/eeschema.app/Contents/MacOS/eeschema
Architecture:    x86_64
Parent:          launchd [1]
UID:             503
Footprint:       189.52 MB
Start time:      2019-12-03 10:55:40 -0800
End time:        2019-12-03 10:55:41 -0800
Num samples:     11 (1-11)
CPU Time:        0.032s (70.8M cycles, 33.3M instructions, 2.12c/i)
Note:            Unresponsive for 77 seconds before sampling
Note:            1 idle work queue thread omitted

  Thread 0x3fbb3            DispatchQueue 1           11 samples (1-11)
priority 47 (base 47)     cpu time 0.032s (70.8M cycles, 33.3M
instructions, 2.12c/i)
  <process frontmost, thread QoS user interactive (requested user
interactive), process unclamped, IO tier 0>
  11  start + 1 (libdyld.dylib + 91093) [0x7fff5abec3d5] 1-11
    11  main + 48 (eeschema + 17808) [0x109cbe590] 1-11
      11  wxEntry(int&, wchar_t**) + 58 (libwx_osx_cocoau-3.0.0.4.0.dylib +
480266) [0x109de640a] 1-11
        11  APP_SINGLE_TOP::OnRun() + 25 (eeschema + 24553) [0x109cbffe9]
1-11
          11  wxApp::OnRun() + 26 (libwx_osx_cocoau-3.0.0.4.0.dylib +
1624378) [0x109efd93a] 1-11
            11  wxAppConsoleBase::MainLoop() + 99
(libwx_osx_cocoau-3.0.0.4.0.dylib + 42083) [0x109d7b463] 1-11
              11  wxEventLoopBase::Run() + 162
(libwx_osx_cocoau-3.0.0.4.0.dylib + 244594) [0x109dacb72] 1-11
                11  wxCFEventLoop::DoRun() + 49
(libwx_osx_cocoau-3.0.0.4.0.dylib + 975121) [0x109e5f111] 1-11
                  11  wxGUIEventLoop::OSXDoRun() + 174
(libwx_osx_cocoau-3.0.0.4.0.dylib + 2045486) [0x109f6462e] 1-11
                    11  -[NSApplication run] + 699 (AppKit + 79240)
[0x7fff2c254588] 1-11
                      11  -[NSApplication(NSEvent)
_nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361 (AppKit +
103531) [0x7fff2c25a46b] 1-11
                        11  _DPSNextEvent + 1135 (AppKit + 108413)
[0x7fff2c25b77d] 1-11
                          11
_BlockUntilNextEventMatchingListInModeWithFilter + 64 (HIToolbox + 44150)
[0x7fff2dec2c76] 1-11
                            11  ReceiveNextEventCommon + 355 (HIToolbox +
44525) [0x7fff2dec2ded] 1-11
                              11  RunCurrentEventLoopInMode + 292
(HIToolbox + 45483) [0x7fff2dec31ab] 1-11
                                11  CFRunLoopRunSpecific + 455
(CoreFoundation + 239214) [0x7fff2ec6466e] 1-11
                                  11  __CFRunLoopRun + 1136 (CoreFoundation
+ 240944) [0x7fff2ec64d30] 1-11
                                    11  __CFRunLoopDoObservers + 451
(CoreFoundation + 624141) [0x7fff2ecc260d] 1-11
                                      11
__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
(CoreFoundation + 624344) [0x7fff2ecc26d8] 1-11
                                        11
wxCFEventLoop::OSXCommonModeObserverCallBack(__CFRunLoopObserver*, int,
void*) + 66 (libwx_osx_cocoau-3.0.0.4.0.dylib + 972738) [0x109e5e7c2] 1-11
                                          11
wxAppConsoleBase::ProcessPendingEvents() + 215
(libwx_osx_cocoau-3.0.0.4.0.dylib + 45095) [0x109d7c027] 1-11
                                            11
wxEvtHandler::ProcessPendingEvents() + 478
(libwx_osx_cocoau-3.0.0.4.0.dylib + 1160574) [0x109e8c57e] 1-11
                                              11
wxEvtHandler::ProcessEvent(wxEvent&) + 100
(libwx_osx_cocoau-3.0.0.4.0.dylib + 1161428) [0x109e8c8d4] 1-11
                                                11
wxEvtHandler::ProcessEventLocally(wxEvent&) + 93
(libwx_osx_cocoau-3.0.0.4.0.dylib + 1161821) [0x109e8ca5d] 1-11
                                                  11
wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 239
(libwx_osx_cocoau-3.0.0.4.0.dylib + 1156639) [0x109e8b61f] 1-11
                                                    11
EDA_DRAW_PANEL_GAL::onPaint(wxPaintEvent&) + 822 (_eeschema.kiface +
4277350) [0x10f92f466] 1-11
                                                      11
KIGFX::OPENGL_GAL::endDrawing() + 436 (_eeschema.kiface + 4348772)
[0x10f940b64] 1-11
                                                        11
wxGLCanvas::SwapBuffers() + 45 (libwx_osx_cocoau_gl-3.0.0.4.0.dylib +
28845) [0x109d620ad] 1-11
                                                          11
-[NSOpenGLContext flushBuffer] + 27 (AppKit + 4024680) [0x7fff2c617968]
1-11
                                                            11
CGLFlushDrawable + 59 (OpenGL + 55119) [0x7fff388c974f] 1-11
                                                              11
glSwap_Exec + 97 (GLEngine + 112145) [0x7fff388e7611] 1-11
                                                                11
gldPresentFramebufferData + 83 (AMDRadeonX4000GLDriver + 411287)
[0x1100e0697] 1-11
                                                                  11
glrATI_Hwl_SubmitPacketsWithToken + 110 (AMDRadeonX4000GLDriver + 43898)
[0x110086b7a] 1-11
                                                                    11
gpusSubmitDataBuffers + 136 (libGPUSupportMercury.dylib + 13774)
[0x7fff49cd65ce] 1-11
                                                                      11
IOAccelContextSubmitDataBuffersExt2 + 258 (IOAccelerator + 11529)
[0x7fff4bfe1d09] 1-11
                                                                        11
IOConnectCallStructMethod + 38 (IOKit + 34219) [0x7fff3156e5ab] 1-11
                                                                          11
IOConnectCallMethod + 244 (IOKit + 32117) [0x7fff3156dd75] 1-11
                                                                            11
io_connect_method + 374 (IOKit + 32531) [0x7fff3156df13] 1-11
                                                                              11
mach_msg_trap + 10 (libsystem_kernel.dylib + 4650) [0x7fff5ad2122a] 1-11
                                                                               *11
hndl_mach_scall64 + 22 (kernel + 1429942) [0xffffff800035d1b6] 1-11
                                                                                 *11
mach_call_munger64 + 599 (kernel + 2893527) [0xffffff80004c26d7] 1-11
                                                                                   *11
mach_msg_overwrite_trap + 974 (kernel + 1720910) [0xffffff80003a424e] 1-11
                                                                                     *11
ipc_kmsg_send + 209 (kernel + 1637169) [0xffffff800038fb31] 1-11
                                                                                       *11
ipc_kobject_server + 300 (kernel + 1789372) [0xffffff80003b4dbc] 1-11
                                                                                         *11
??? (kernel + 2716854) [0xffffff80004974b6] 1-11
                                                                                           *11
is_io_connect_method + 530 (kernel + 8973986) [0xffffff8000a8eea2] 1-11
                                                                                             *11
IOUserClient::externalMethod(unsigned int, IOExternalMethodArguments*,
IOExternalMethodDispatch*, OSObject*, void*) + 832 (kernel + 8936288)
[0xffffff8000a85b60] 1-11
                                                                                               *11
shim_io_connect_method_structureI_structureO + 460 (kernel + 8943932)
[0xffffff8000a8793c] 1-11
                                                                                                 *11
IOAccelContext2::submit_data_buffers(IOAccelContextSubmitDataBuffersIn*,
IOAccelContextSubmitDataBuffersOut*, unsigned long long, unsigned long
long*) + 1224 (IOAcceleratorFamily2 + 22024) [0xffffff7f843c6608] 1-11
                                                                                                   *11
IOAccelGLContext2::processDataBuffers(unsigned int) + 173
(IOAcceleratorFamily2 + 59839) [0xffffff7f843cf9bf] 1-11
                                                                                                     *11
lck_mtx_sleep + 128 (kernel + 1833072) [0xffffff80003bf870] 1-11
                                                                                                       *11
thread_block_reason + 175 (kernel + 1884399) [0xffffff80003cc0ef] 1-11
                                                                                                         *11
??? (kernel + 1890889) [0xffffff80003cda49] 1-11
                                                                                                           *11
machine_switch_context + 195 (kernel + 2980019) [0xffffff80004d78b3] 1-11

  Thread 0x3fbfd            Thread name "com.apple.NSEventThread"
11 samples (1-11)         priority 47 (base 47)
  <process frontmost, thread QoS user interactive (requested user
interactive), process unclamped, IO tier 0>
  11  thread_start + 13 (libsystem_pthread.dylib + 9229) [0x7fff5addf40d]
1-11
    11  _pthread_start + 66 (libsystem_pthread.dylib + 25161)
[0x7fff5ade3249] 1-11
      11  _pthread_body + 126 (libsystem_pthread.dylib + 13035)
[0x7fff5ade02eb] 1-11
        11  _NSEventThread + 37 (AppKit + 140312) [0x7fff2c263418] 1-11
          11  _BeginEventReceiptOnThread + 159 (HIToolbox + 85080)
[0x7fff2deccc58] 1-11
            11  _dispatch_semaphore_wait_slow + 98 (libdispatch.dylib +
17311) [0x7fff5aba039f] 1-11
              11  semaphore_wait_trap + 10 (libsystem_kernel.dylib + 4710)
[0x7fff5ad21266] 1-11
               *11  semaphore_wait_continue + 0 (kernel + 1938768)
[0xffffff80003d9550] 1-11

  Thread 0x3fc19            Thread name "com.apple.CFSocket.private"
11 samples (1-11)         priority 47 (base 47)
  <process frontmost, thread QoS user interactive (requested user
interactive), process unclamped, IO tier 0>
  11  thread_start + 13 (libsystem_pthread.dylib + 9229) [0x7fff5addf40d]
1-11
    11  _pthread_start + 66 (libsystem_pthread.dylib + 25161)
[0x7fff5ade3249] 1-11
      11  _pthread_body + 126 (libsystem_pthread.dylib + 13035)
[0x7fff5ade02eb] 1-11
        11  __select + 10 (libsystem_kernel.dylib + 34330) [0x7fff5ad2861a]
1-11
         *11  ??? (kernel + 7176720) [0xffffff80008d8210] 1-11
```
Original tags: eeschema macos

Story points: 6.0