Pressing 'e' in eeschema causes crash frequently [OSX-specific] (lp:#1837225)

[Original report](https://bugs.launchpad.net/bugs/1837225) created by **ocb-hd-ccb (ocb-hd-ccb)**
```
I though this was originally related to
https://bugs.launchpad.net/kicad/+bug/1836673 but since learning how to
check the crash logs it appears to be different.

I am pressing 'e' over field references in eeschema and sometimes it works
and sometimes it crashes. But, once it crashes it crashes for a while. I
have to do an unknown procedure to get it to work again.

#Kicad Info
```
Application: KiCad
Version: (5.1.0-1318-gb5cc49614), debug 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.6.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:
    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
```

#Crash Report
```
Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [16850]

Application Specific Information:
Crashing on exception: -[NSAlert runModal] may not be invoked inside of
transaction begin/commit pair, or inside of transaction commit (usually
this means it was invoked inside of a view's -drawRect: method.)

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.AppKit                    0x00007fff47071a67 -[NSApplication
_crashOnException:] + 109
1   com.apple.AppKit                    0x00007fff46d6ec84
__65+[CATransaction(NSCATransaction)
NS_setFlushesWithDisplayRefresh]_block_invoke + 841
2   com.apple.CoreFoundation            0x00007fff49645928
__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
3   com.apple.CoreFoundation            0x00007fff4964585d
__CFRunLoopDoObservers + 451
4   com.apple.CoreFoundation            0x00007fff495e7f80 __CFRunLoopRun +
1136
5   com.apple.CoreFoundation            0x00007fff495e78be
CFRunLoopRunSpecific + 455
6   com.apple.HIToolbox                 0x00007fff488d396b
RunCurrentEventLoopInMode + 292
7   com.apple.HIToolbox                 0x00007fff488d35ad
ReceiveNextEventCommon + 355
8   com.apple.HIToolbox                 0x00007fff488d3436
_BlockUntilNextEventMatchingListInModeWithFilter + 64
9   com.apple.AppKit                    0x00007fff46c6d987 _DPSNextEvent +
965
10  com.apple.AppKit                    0x00007fff46c6c71f
-[NSApplication(NSEvent)
_nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361
11  libwx_osx_cocoau-3.0.0.4.0.dylib    0x000000010ac5167c
wxGUIEventLoop::OSXDoRun() + 220
12  libwx_osx_cocoau-3.0.0.4.0.dylib    0x000000010ab4c0e1
wxCFEventLoop::DoRun() + 49
13  libwx_osx_cocoau-3.0.0.4.0.dylib    0x000000010aa99b42
wxEventLoopBase::Run() + 162
14  _eeschema.kiface                    0x000000011432ce11
DIALOG_SHIM::ShowQuasiModal() + 673
15  _eeschema.kiface                    0x00000001141467b4
SCH_EDIT_TOOL::editComponentFieldText(SCH_FIELD*) + 420
16  _eeschema.kiface                    0x000000011414772f
SCH_EDIT_TOOL::Properties(TOOL_EVENT const&) + 1263
17  _eeschema.kiface                    0x0000000114156cd5 int
std::__1::__invoke_void_return_wrapper<int>::__call<std::__1::__bind<int
(SCH_EDIT_TOOL::*&)(TOOL_EVENT const&), SCH_EDIT_TOOL*,
std::__1::placeholders::__ph<1> const&>&, TOOL_EVENT
const&>(std::__1::__bind<int (SCH_EDIT_TOOL::*&)(TOOL_EVENT const&),
SCH_EDIT_TOOL*, std::__1::placeholders::__ph<1> const&>&&&, TOOL_EVENT
const&&&) + 645
18  _eeschema.kiface                    0x0000000114156999
std::__1::__function::__func<std::__1::__bind<int
(SCH_EDIT_TOOL::*&)(TOOL_EVENT const&), SCH_EDIT_TOOL*,
std::__1::placeholders::__ph<1> const&>,
std::__1::allocator<std::__1::__bind<int (SCH_EDIT_TOOL::*&)(TOOL_EVENT
const&), SCH_EDIT_TOOL*, std::__1::placeholders::__ph<1> const&> >, int
(TOOL_EVENT const&)>::operator()(TOOL_EVENT const&) + 57
19  _eeschema.kiface                    0x00000001144c803e
std::__1::function<int (TOOL_EVENT const&)>::operator()(TOOL_EVENT const&)
const + 142
20  _eeschema.kiface                    0x00000001144c7f8d COROUTINE<int,
TOOL_EVENT const&>::callerStub(long) + 109
21  _eeschema.kiface                    0x000000011440cd2a make_fcontext +
42
22  ???                                 0x00007ffee56bdd90 0 +
140732747472272

Thread 1:
0   libsystem_pthread.dylib             0x00007fff757093f0 start_wqthread +
0

Thread 2:
0   libsystem_pthread.dylib             0x00007fff757093f0 start_wqthread +
0

Thread 3:
0   libsystem_pthread.dylib             0x00007fff757093f0 start_wqthread +
0

Thread 4:: com.apple.CFSocket.private
0   libsystem_kernel.dylib              0x00007fff7565261a __select + 10
1   com.apple.CoreFoundation            0x00007fff49616572
__CFSocketManager + 635
2   libsystem_pthread.dylib             0x00007fff7570a2eb _pthread_body +
126
3   libsystem_pthread.dylib             0x00007fff7570d249 _pthread_start +
66
4   libsystem_pthread.dylib             0x00007fff7570940d thread_start +
13

Thread 5:: com.apple.NSEventThread
0   libsystem_kernel.dylib              0x00007fff7564b22a mach_msg_trap +
10
1   libsystem_kernel.dylib              0x00007fff7564b76c mach_msg + 60
2   com.apple.CoreFoundation            0x00007fff495e8bee
__CFRunLoopServiceMachPort + 328
3   com.apple.CoreFoundation            0x00007fff495e815c __CFRunLoopRun +
1612
4   com.apple.CoreFoundation            0x00007fff495e78be
CFRunLoopRunSpecific + 455
5   com.apple.AppKit                    0x00007fff46c756a6 _NSEventThread +
175
6   libsystem_pthread.dylib             0x00007fff7570a2eb _pthread_body +
126
7   libsystem_pthread.dylib             0x00007fff7570d249 _pthread_start +
66
8   libsystem_pthread.dylib             0x00007fff7570940d thread_start +
13

Thread 6:
0   libsystem_pthread.dylib             0x00007fff757093f0 start_wqthread +
0

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x00006000028bc230  rbx: 0x000060000329a220  rcx: 0x00007fa6edc471f0
rdx: 0x00007fff73d5ef18
  rdi: 0x00007fa6edc47000  rsi: 0x00007fff477f0bed  rbp: 0x0000000111a607b0
rsp: 0x0000000111a607a0
   r8: 0x0000000111a60340   r9: 0x0000000000000000  r10: 0x00007fffa4980390
r11: 0x00007fa6defb7190
  r12: 0x0000600000cfd860  r13: 0x00007fa6ed7612c0  r14: 0x00007fff73d3a680
r15: 0x00007fff49652f83
  rip: 0x00007fff47071a67  rfl: 0x0000000000010206  cr2: 0x000000010b31b3cc

Logical CPU:     3
Error Code:      0x00000000
Trap Number:     6
```
```
Original tags: eeschema macos

Story points: 6.0