Help me fix a bug: endless recursion in NSTextView?
Help me fix a bug: endless recursion in NSTextView?
- Subject: Help me fix a bug: endless recursion in NSTextView?
- From: Oleg Krupnov <email@hidden>
- Date: Fri, 08 Feb 2013 13:05:30 +0200
Hi,
I've received a few reports from users that my app hangs and consumes
100% CPU, and they have to force quit it. It usually happens on
MacBooks after they are awaken from sleep mode.
One user also sent the following crash report:
16 com.apple.CoreFoundation 0x00007fff8846547a
_CFXNotificationPost + 2554
17 com.apple.Foundation 0x00007fff85251846
-[NSNotificationCenter postNotificationName:object:userInfo:] + 64
18 com.apple.AppKit 0x00007fff8cb8821e -[NSView
_postFrameChangeNotification] + 259
19 com.apple.AppKit 0x00007fff8cb728f3 -[NSView
setFrameSize:] + 1352
20 com.apple.AppKit 0x00007fff8cc47c86
-[NSTextView(NSPrivate) _setFrameSize:forceScroll:] + 1367
21 com.apple.AppKit 0x00007fff8cc13d33
-[NSTextContainer setContainerSize:] + 193
22 com.apple.AppKit 0x00007fff8cc43ac9
-[NSTextContainer(NSPrivate) _resizeAccordingToTextView:] + 289
23 com.apple.CoreFoundation 0x00007fff8846547a
_CFXNotificationPost + 2554
24 com.apple.Foundation 0x00007fff85251846
-[NSNotificationCenter postNotificationName:object:userInfo:] + 64
25 com.apple.AppKit 0x00007fff8cb8821e -[NSView
_postFrameChangeNotification] + 259
26 com.apple.AppKit 0x00007fff8cb728f3 -[NSView
setFrameSize:] + 1352
27 com.apple.AppKit 0x00007fff8cc47c86
-[NSTextView(NSPrivate) _setFrameSize:forceScroll:] + 1367
28 com.apple.AppKit 0x00007fff8cc13d33
-[NSTextContainer setContainerSize:] + 193
29 com.apple.AppKit 0x00007fff8cc43ac9
-[NSTextContainer(NSPrivate) _resizeAccordingToTextView:] + 289
These few strings repeat forever, like if there was an endless
recursion. Finally, it ends with what looks like a stack overflow:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007fff57272d80
VM Regions Near 0x7fff57272d80:
MALLOC_SMALL 00007fc065000000-00007fc067000000 [ 32.0M]
rw-/rwx SM=PRV
-- STACK GUARD 00007fff53a73000-00007fff57273000 [ 56.0M]
---/rwx SM=NUL stack guard for thread 0
Stack 00007fff57273000-00007fff57a73000 [ 8192K]
rw-/rwx SM=COW thread 0
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x00007fff8842e477
_CFArrayReplaceValues + 23
1 com.apple.CoreFoundation 0x00007fff88470164
CFRunLoopRemoveTimer + 372
2 com.apple.CoreFoundation 0x00007fff8846ff2f
CFRunLoopTimerInvalidate + 383
3 com.apple.AppKit 0x00007fff8cca8132
-[NSScrollerImpPair _cancelOverlayScrollerHideTimer] + 45
4 com.apple.AppKit 0x00007fff8cb2969e
-[NSScrollerImpPair _rescheduleOverlayScrollerHideTimerWithDelay:] +
61
5 com.apple.AppKit 0x00007fff8cb28ab9
-[NSScrollerImpPair
_updateOverlayScrollersStateWithReason:forceAtLeastKnobsVisible:] +
3325
6 com.apple.AppKit 0x00007fff8cc4cc95
-[NSClipView _immediateScrollToPoint:] + 467
7 com.apple.AppKit 0x00007fff8cc4ca12
-[NSClipView scrollToPoint:] + 268
8 com.apple.AppKit 0x00007fff8cd1557d
-[NSScrollView scrollClipView:toPoint:] + 426
9 com.apple.AppKit 0x00007fff8cc4c79c
-[NSClipView _scrollTo:animateScroll:flashScrollerKnobs:] + 1626
10 com.apple.AppKit 0x00007fff8cc4bf60
-[NSClipView _reflectDocumentViewFrameChange] + 127
11 com.apple.AppKit 0x00007fff8cb881f3 -[NSView
_postFrameChangeNotification] + 216
12 com.apple.AppKit 0x00007fff8cb728f3 -[NSView
setFrameSize:] + 1352
13 com.apple.AppKit 0x00007fff8cc47c86
-[NSTextView(NSPrivate) _setFrameSize:forceScroll:] + 1367
14 com.apple.AppKit 0x00007fff8cc13d33
-[NSTextContainer setContainerSize:] + 193
15 com.apple.AppKit 0x00007fff8cc43ac9
-[NSTextContainer(NSPrivate) _resizeAccordingToTextView:] + 289
16 com.apple.CoreFoundation 0x00007fff8846547a
_CFXNotificationPost + 2554
17 com.apple.Foundation 0x00007fff85251846
-[NSNotificationCenter postNotificationName:object:userInfo:] + 64
18 com.apple.AppKit 0x00007fff8cb8821e -[NSView
_postFrameChangeNotification] + 259
19 com.apple.AppKit 0x00007fff8cb728f3 -[NSView
setFrameSize:] + 1352
20 com.apple.AppKit 0x00007fff8cc47c86
-[NSTextView(NSPrivate) _setFrameSize:forceScroll:] + 1367
21 com.apple.AppKit 0x00007fff8cc13d33
-[NSTextContainer setContainerSize:] + 193
22 com.apple.AppKit 0x00007fff8cc43ac9
-[NSTextContainer(NSPrivate) _resizeAccordingToTextView:] + 289
The whole crash dump doesn't contain a single line from my own code -
only system libraries. Or maybe it's simply truncated at some point.
Anyway, it's hard to figure out where should I look for the case of
the problem.
Does anybody have some hints? Thanks!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden