I have a window that pops up from my main window when a button is pressed and in the window a timer runs (set to 250) to refresh a canvas (puts new text over a colored png file). I’m thinking the timer is still trying to run on close and trying to access an object or variable that has already been killed off by the close button. Does that sound right? should I check every control and property for nil in the timer’s action? Or might something else be causing this. Here is a partial crash report:
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
abort() called
*** error for object 0x7fe5d475eea8: incorrect checksum for freed object - object was probably modified after being freed.
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff7a26ab66 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff7a435080 pthread_kill + 333
2 libsystem_c.dylib 0x00007fff7a1c61ae abort + 127
3 libsystem_malloc.dylib 0x00007fff7a2cfad4 szone_error + 596
4 libsystem_malloc.dylib 0x00007fff7a2c4616 tiny_malloc_from_free_list + 1155
5 libsystem_malloc.dylib 0x00007fff7a2c33bf szone_malloc_should_clear + 422
6 libsystem_malloc.dylib 0x00007fff7a2c31bd malloc_zone_malloc + 103
7 libsystem_malloc.dylib 0x00007fff7a2c24c7 malloc + 24
8 com.apple.CoreGraphics 0x00007fff52709a24 std::__1::list<CG::Chunk, CG::Allocator<CG::Chunk> >::list(std::__1::list<CG::Chunk, CG::Allocator<CG::Chunk> > const&) + 70
9 com.apple.CoreGraphics 0x00007fff52709b11 std::__1::vector<CG::Path::Subpath, CG::Allocator<CG::Path::Subpath> >::__swap_out_circular_buffer(std::__1::__split_buffer<CG::Path::Subpath, CG::Allocator<CG::Path::Subpath>&>&) + 49
10 com.apple.CoreGraphics 0x00007fff5275e370 void std::__1::vector<CG::Path::Subpath, CG::Allocator<CG::Path::Subpath> >::__push_back_slow_path<CG::Path::Subpath const&>(CG::Path::Subpath const&&&) + 222
11 com.apple.CoreGraphics 0x00007fff5275e241 CG::Path::Sequence::append(CG::Path::Shape*, CGAffineTransform const*) + 161
12 com.apple.CoreGraphics 0x00007fff5275e001 CGPathAddRects + 200
13 com.apple.CoreGraphics 0x00007fff5275c23c CGContextClipToRects + 141
Another crash report gave me this:
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreGraphics 0x00007fff52709bbd std::__1::__list_imp<CG::Chunk, CG::Allocator<CG::Chunk> >::clear() + 31
1 com.apple.CoreGraphics 0x00007fff5272a072 std::__1::__vector_base<CG::Path::Subpath, CG::Allocator<CG::Path::Subpath> >::~__vector_base() + 40
2 com.apple.CoreGraphics 0x00007fff5272a03c CG::Path::Sequence::~Sequence() + 28
3 com.apple.CoreGraphics 0x00007fff5275e052 CGPathAddRects + 281
4 com.apple.CoreGraphics 0x00007fff5275c23c CGContextClipToRects + 141
5 com.apple.AppKit 0x00007fff4f9bb613 -[NSView _drawRect:clip:] + 1522
6 com.apple.AppKit 0x00007fff4f9ba598 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 4844
7 com.apple.AppKit 0x00007fff4f9b9ec5 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 3097
8 com.apple.AppKit 0x00007fff4f9b8ddb -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 327
9 com.apple.AppKit 0x00007fff501244e0 -[NSView _oldDisplayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2051
10 com.apple.AppKit 0x00007fff4f9b7e5d -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 253
11 com.apple.AppKit 0x00007fff4f9b40b4 -[NSView displayIfNeeded] + 1581
12 com.apple.AppKit 0x00007fff4f9b3a52 -[NSWindow displayIfNeeded] + 321
13 com.apple.AppKit 0x00007fff5015460d ___NSWindowGetDisplayCycleObserver_block_invoke.5902 + 308
14 com.apple.AppKit 0x00007fff4f9b355e __37+[NSDisplayCycle currentDisplayCycle]_block_invoke + 695