Repository: flutter
Issue: [macos]EXC_BAD_ACCESS GrGLGpu::deleteSync
Labels: c: crash,engine,platform-mac,a: production,P2,needs repro info,team-engine,triaged-engine

this is a crash info from sentry with my app production

```
OS Version: macOS 10.13.6 (17G14042)
Report Version: 104

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: BUS_NOOP at 0x0000000000000058
Crashed Thread: 3

Application Specific Information:
Exception 1, Code 88, Subcode 8 >
Attempted to dereference garbage pointer 0x58.

Thread 3 Crashed:
0   FlutterMacOS                    0x10ce009bd         GrGLGpu::deleteSync
1   FlutterMacOS                    0x10ce09829         GrGLSemaphore::~GrGLSemaphore
2   FlutterMacOS                    0x10cc8aac5         SkNVRefCnt<T>::unref
3   FlutterMacOS                    0x10cc8abfa         GrBackendTextureImageGenerator::~GrBackendTextureImageGenerator
4   FlutterMacOS                    0x10cb8835e         SkImage_Lazy::~SkImage_Lazy
5   FlutterMacOS                    0x10cf3737c         flutter::DisposeOps
6   FlutterMacOS                    0x10cf37591         flutter::DisplayList::~DisplayList
7   FlutterMacOS                    0x10cf344a5         flutter::SkiaUnrefQueue::Drain
8   FlutterMacOS                    0x10c8fae60         fml::MessageLoopImpl::FlushTasks
9   FlutterMacOS                    0x10c90351c         fml::MessageLoopDarwin::OnTimerFire
10  CoreFoundation                  0xfffe55a46484      __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
11  CoreFoundation                  0xfffe55a46104      __CFRunLoopDoTimer
12  CoreFoundation                  0xfffe55a45bfa      __CFRunLoopDoTimers
13  CoreFoundation                  0xfffe55a3d39b      __CFRunLoopRun
14  CoreFoundation                  0xfffe55a3c787      CFRunLoopRunSpecific
15  FlutterMacOS                    0x10c90378e         fml::MessageLoopDarwin::Run
16  FlutterMacOS                    0x10c8fac74         fml::MessageLoopImpl::DoRun
17  FlutterMacOS                    0x10c9025ca         std::__1::__thread_proxy<T>
18  libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
19  libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
20  libsystem_pthread.dylib         0xfffea60dbbf9      thread_start

Thread 0
0   libsystem_kernel.dylib          0xfffea5d33a16      __psynch_cvwait
1   FlutterMacOS                    0x10d1edd7e         dart::Monitor::Wait
2   FlutterMacOS                    0x10d1631f0         dart::Dart::WaitForIsolateShutdown
3   FlutterMacOS                    0x10d1633fe         dart::Dart::Cleanup
4   FlutterMacOS                    0x10d0f1e3b         DartVMInitializer::Cleanup
5   FlutterMacOS                    0x10d0f0db7         flutter::DartVM::~DartVM
6   FlutterMacOS                    0x10d0f10c5         std::__1::__shared_ptr_pointer<T>::__on_zero_shared
7   FlutterMacOS                    0x10d0f22d1         flutter::DartVMRef::~DartVMRef
8   FlutterMacOS                    0x10cf5f03e         flutter::Shell::~Shell
9   FlutterMacOS                    0x10d11c01b         flutter::EmbedderEngine::CollectShell
10  FlutterMacOS                    0x10d10b433         FlutterEngineDeinitialize
11  FlutterMacOS                    0x10c8a90c8         -[FlutterEngine shutDownEngine]
12  FlutterMacOS                    0x10c8bea43         -[FlutterViewController applicationWillTerminate:]
13  CoreFoundation                  0xfffe55a5239c      __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
14  CoreFoundation                  0xfffe55a5226a      _CFXRegistrationPost
15  CoreFoundation                  0xfffe55a51fa1      ___CFXNotificationPost_block_invoke
16  CoreFoundation                  0xfffe55a10b32      -[_CFXNotificationRegistrar find:object:observer:enumerator:]
17  CoreFoundation                  0xfffe55a0fbc3      _CFXNotificationPost
18  Foundation                      0xfffe59cba047      -[NSNotificationCenter postNotificationName:object:userInfo:]
19  AppKit                          0xfffe50777ddc      -[NSApplication terminate:]
20  AppKit                          0xfffe50959008      -[NSApplication _terminateFromSender:askIfShouldTerminate:saveWindows:]
21  AppKit                          0xfffe508f3a8b      __79-[NSApplication _scheduleCheckForTerminateAfterLastWindowClosed]_block_invoke
22  CoreFoundation                  0xfffe55a46484      __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
23  CoreFoundation                  0xfffe55a46104      __CFRunLoopDoTimer
24  CoreFoundation                  0xfffe55a45bfa      __CFRunLoopDoTimers
25  CoreFoundation                  0xfffe55a3d39b      __CFRunLoopRun
26  CoreFoundation                  0xfffe55a3c787      CFRunLoopRunSpecific
27  HIToolbox                       0xfffe5404ed96      RunCurrentEventLoopInMode
28  HIToolbox                       0xfffe5404ea0f      ReceiveNextEventCommon
29  HIToolbox                       0xfffe5404e884      _BlockUntilNextEventMatchingListInModeWithFilter
30  AppKit                          0xfffe50596a3b      _DPSNextEvent
31  AppKit                          0xfffe50d2ce34      -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
32  AppKit                          0xfffe5058b84d      -[NSApplication run]
33  AppKit                          0xfffe5055aa3a      NSApplicationMain
34  label_pc                        0x20c56d0b9         <redacted>
35  libdyld.dylib                   0xfffea5aae015      start

Thread 1 name: io.flutter.ui
0   libsystem_kernel.dylib          0xfffea5d2a1fa      mach_msg_trap
1   CoreFoundation                  0xfffe55a3ddc5      __CFRunLoopServiceMachPort
2   CoreFoundation                  0xfffe55a3d117      __CFRunLoopRun
3   CoreFoundation                  0xfffe55a3c787      CFRunLoopRunSpecific
4   FlutterMacOS                    0x10c90378e         fml::MessageLoopDarwin::Run
5   FlutterMacOS                    0x10c8fac74         fml::MessageLoopImpl::DoRun
6   FlutterMacOS                    0x10c9025ca         std::__1::__thread_proxy<T>
7   libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
8   libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
9   libsystem_pthread.dylib         0xfffea60dbbf9      thread_start

Thread 2 name: io.flutter.raster
0   libsystem_kernel.dylib          0xfffea5d2a1fa      mach_msg_trap
1   CoreFoundation                  0xfffe55a3ddc5      __CFRunLoopServiceMachPort
2   CoreFoundation                  0xfffe55a3d117      __CFRunLoopRun
3   CoreFoundation                  0xfffe55a3c787      CFRunLoopRunSpecific
4   FlutterMacOS                    0x10c90378e         fml::MessageLoopDarwin::Run
5   FlutterMacOS                    0x10c8fac74         fml::MessageLoopImpl::DoRun
6   FlutterMacOS                    0x10c9025ca         std::__1::__thread_proxy<T>
7   libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
8   libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
9   libsystem_pthread.dylib         0xfffea60dbbf9      thread_start

Thread 3 name: io.flutter.io Crashed:
0   FlutterMacOS                    0x10ce009bd         GrGLGpu::deleteSync
1   FlutterMacOS                    0x10ce09829         GrGLSemaphore::~GrGLSemaphore
2   FlutterMacOS                    0x10cc8aac5         SkNVRefCnt<T>::unref
3   FlutterMacOS                    0x10cc8abfa         GrBackendTextureImageGenerator::~GrBackendTextureImageGenerator
4   FlutterMacOS                    0x10cb8835e         SkImage_Lazy::~SkImage_Lazy
5   FlutterMacOS                    0x10cf3737c         flutter::DisposeOps
6   FlutterMacOS                    0x10cf37591         flutter::DisplayList::~DisplayList
7   FlutterMacOS                    0x10cf344a5         flutter::SkiaUnrefQueue::Drain
8   FlutterMacOS                    0x10c8fae60         fml::MessageLoopImpl::FlushTasks
9   FlutterMacOS                    0x10c90351c         fml::MessageLoopDarwin::OnTimerFire
10  CoreFoundation                  0xfffe55a46484      __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
11  CoreFoundation                  0xfffe55a46104      __CFRunLoopDoTimer
12  CoreFoundation                  0xfffe55a45bfa      __CFRunLoopDoTimers
13  CoreFoundation                  0xfffe55a3d39b      __CFRunLoopRun
14  CoreFoundation                  0xfffe55a3c787      CFRunLoopRunSpecific
15  FlutterMacOS                    0x10c90378e         fml::MessageLoopDarwin::Run
16  FlutterMacOS                    0x10c8fac74         fml::MessageLoopImpl::DoRun
17  FlutterMacOS                    0x10c9025ca         std::__1::__thread_proxy<T>
18  libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
19  libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
20  libsystem_pthread.dylib         0xfffea60dbbf9      thread_start

Thread 4 name: io.worker.1
0   libsystem_kernel.dylib          0xfffea5d33a16      __psynch_cvwait
1   FlutterMacOS                    0x10c8c8d04         std::__1::condition_variable::wait
2   FlutterMacOS                    0x10c8f4ea3         fml::ConcurrentMessageLoop::WorkerMain
3   FlutterMacOS                    0x10c8f5bba         std::__1::__thread_proxy<T>
4   libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
5   libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
6   libsystem_pthread.dylib         0xfffea60dbbf9      thread_start

Thread 5 name: io.worker.2
0   libsystem_kernel.dylib          0xfffea5d33a16      __psynch_cvwait
1   FlutterMacOS                    0x10c8c8d04         std::__1::condition_variable::wait
2   FlutterMacOS                    0x10c8f4ea3         fml::ConcurrentMessageLoop::WorkerMain
3   FlutterMacOS                    0x10c8f5bba         std::__1::__thread_proxy<T>
4   libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
5   libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
6   libsystem_pthread.dylib         0xfffea60dbbf9      thread_start

Thread 6 name: io.worker.3
0   libsystem_kernel.dylib          0xfffea5d33a16      __psynch_cvwait
1   FlutterMacOS                    0x10c8c8d04         std::__1::condition_variable::wait
2   FlutterMacOS                    0x10c8f4ea3         fml::ConcurrentMessageLoop::WorkerMain
3   FlutterMacOS                    0x10c8f5bba         std::__1::__thread_proxy<T>
4   libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
5   libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
6   libsystem_pthread.dylib         0xfffea60dbbf9      thread_start

Thread 7 name: io.worker.4
0   libsystem_kernel.dylib          0xfffea5d33a16      __psynch_cvwait
1   FlutterMacOS                    0x10c8c8d04         std::__1::condition_variable::wait
2   FlutterMacOS                    0x10c8f4ea3         fml::ConcurrentMessageLoop::WorkerMain
3   FlutterMacOS                    0x10c8f5bba         std::__1::__thread_proxy<T>
4   libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
5   libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
6   libsystem_pthread.dylib         0xfffea60dbbf9      thread_start

Thread 8 name: dart:io EventHandler
0   libsystem_kernel.dylib          0xfffea5d34bea      kevent
1   FlutterMacOS                    0x10d0e4336         dart::bin::ThreadStart
2   libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
3   libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
4   libsystem_pthread.dylib         0xfffea60dbbf9      thread_start

Thread 9 name: com.apple.NSEventThread
0   libsystem_kernel.dylib          0xfffea5d2a1fa      mach_msg_trap
1   CoreFoundation                  0xfffe55a3ddc5      __CFRunLoopServiceMachPort
2   CoreFoundation                  0xfffe55a3d117      __CFRunLoopRun
3   CoreFoundation                  0xfffe55a3c787      CFRunLoopRunSpecific
4   AppKit                          0xfffe506d3fc4      _NSEventThread
5   libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
6   libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
7   libsystem_pthread.dylib         0xfffea60dbbf9      thread_start

Thread 10
0   libsystem_kernel.dylib          0xfffea5d33d82      __semwait_signal
1   libsystem_c.dylib               0xfffea5bc9586      sleep
2   Sentry                          0x10c5ca292         monitorCachedData
3   libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
4   libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
5   libsystem_pthread.dylib         0xfffea60dbbf9      thread_start

Thread 11 name: SentryCrash Exception Handler (Secondary)
0   libsystem_kernel.dylib          0xfffea5d2a1fa      mach_msg_trap
1   Sentry                          0x10c5d7727         handleExceptions
2   libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
3   libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
4   libsystem_pthread.dylib         0xfffea60dbbf9      thread_start

Thread 13 name: com.apple.NSURLConnectionLoader
0   libsystem_kernel.dylib          0xfffea5d2a1fa      mach_msg_trap
1   CoreFoundation                  0xfffe55a3ddc5      __CFRunLoopServiceMachPort
2   CoreFoundation                  0xfffe55a3d117      __CFRunLoopRun
3   CoreFoundation                  0xfffe55a3c787      CFRunLoopRunSpecific
4   CFNetwork                       0xfffe53af7158      -[__CoreSchedulingSetRunnable runForever]
5   Foundation                      0xfffe59ce29d8      __NSThread__start__
6   libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
7   libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
8   libsystem_pthread.dylib         0xfffea60dbbf9      thread_start

Thread 14
0   libsystem_kernel.dylib          0xfffea5d3428a      __workq_kernreturn
1   libsystem_pthread.dylib         0xfffea60dbbe9      start_wqthread

Thread 15
0   libsystem_kernel.dylib          0xfffea5d3428a      __workq_kernreturn
1   libsystem_pthread.dylib         0xfffea60dbbe9      start_wqthread

Thread 16
0   FlutterMacOS                    0x10cf9545b         minikin::LayoutCache::operator()
1   FlutterMacOS                    0x10cf9568e         android::LruCache<T>::clear
2   FlutterMacOS                    0x10cf951af         minikin::Layout::purgeCaches
3   FlutterMacOS                    0x10cf9aef1         txt::FontCollection::~FontCollection
4   FlutterMacOS                    0x10cfa5fba         txt::ParagraphTxt::~ParagraphTxt
5   FlutterMacOS                    0x10cfa603c         txt::ParagraphTxt::~ParagraphTxt
6   FlutterMacOS                    0x10d0ae3b8         flutter::Paragraph::~Paragraph
7   FlutterMacOS                    0x10d2d5fd8         dart::FinalizablePersistentHandle::Finalize
8   FlutterMacOS                    0x10d170cad         dart::IsolateGroup::~IsolateGroup
9   FlutterMacOS                    0x10d17151d         dart::IsolateGroup::Shutdown
10  FlutterMacOS                    0x10d234b88         dart::ThreadPool::WorkerLoop
11  FlutterMacOS                    0x10d234eaf         dart::ThreadPool::Worker::Main
12  FlutterMacOS                    0x10d1ed2a5         dart::ThreadStart
13  libsystem_pthread.dylib         0xfffea60dc661      _pthread_body
14  libsystem_pthread.dylib         0xfffea60dc50d      _pthread_start
15  libsystem_pthread.dylib         0xfffea60dbbf9      thread_start



EOF
```