Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Crashs periodically on Lion #28

Open
yyyc514 opened this Issue · 12 comments

4 participants

@yyyc514

Another person with same issue:
https://gist.github.com/1184968

Always the same stack track of NSTokenField respondsToSelector:... spoke with Allan Osgard and he said Textmate doesn't even use a NSTokenField and since AckMate did there is a good chance the crash could fall on AckMate's shoulders... can anyone else seeing this problem please jump in here.

My log:

Process:         TextMate [34526]
Path:            /Applications/TextMate.app/Contents/MacOS/TextMate
Identifier:      com.macromates.textmate
Version:         1.5.10 (1631)
Code Type:       X86 (Native)
Parent Process:  launchd [179]

Date/Time:       2011-08-31 23:33:14.336 -0400
OS Version:      Mac OS X 10.7.1 (11B2118)
Report Version:  9

Interval Since Last Report:          14321 sec
Crashes Since Last Report:           1
Per-App Interval Since Last Report:  14313 sec
Per-App Crashes Since Last Report:   1
Anonymous UUID:                      005762D1-9097-4963-A23D-6411890272E0

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000d0141aa1

VM Regions Near 0xd0141aa1:
    CG shared images       00000000c2b47000-00000000c2b4f000 [   32K] r--/r-- SM=SHM  
--> 
    Submap                 00000000ffff0000-00000000ffff2000          r-x/r-x process-only submap

Application Specific Information:
objc_msgSend() selector name: respondsToSelector:
objc[34526]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib                 0x96406d47 objc_msgSend + 23
1   com.apple.AppKit                0x977302f1 -[NSTokenField respondsToSelector:] + 416
2   com.apple.AppKit                0x97731bc9 -[NSTokenFieldCell _attributedStringForRepresentedObjects:] + 105
3   com.apple.AppKit                0x97735d46 -[NSTokenFieldCell _unformattedAttributedStringValue:] + 103
4   com.apple.AppKit                0x970e7e5c -[NSCell _attributedStringValue:invalid:] + 269
5   com.apple.AppKit                0x970e7d20 -[NSCell attributedStringValue] + 172
6   com.apple.AppKit                0x970f5a5b __NSGetStringAndAttributesFromTextCell + 86
7   com.apple.AppKit                0x970f47a9 _NSDrawTextCell + 257
8   com.apple.AppKit                0x970f3f53 -[NSTextFieldCell drawInteriorWithFrame:inView:] + 776
9   com.apple.AppKit                0x970f3c40 -[NSTextFieldCell drawWithFrame:inView:] + 893
10  com.apple.AppKit                0x970eba0c -[NSControl drawRect:] + 373
11  com.apple.AppKit                0x970b497a -[NSView _drawRect:clip:] + 3717
12  com.apple.AppKit                0x970e46e3 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1958
13  com.apple.AppKit                0x970b22db -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 708
14  com.apple.AppKit                0x970b3448 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 5169
15  com.apple.AppKit                0x970b3448 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 5169
16  com.apple.AppKit                0x970b3448 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 5169
17  com.apple.AppKit                0x970b3448 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 5169
18  com.apple.AppKit                0x970b3448 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 5169
19  com.apple.AppKit                0x970b18e5 -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 259
20  com.apple.AppKit                0x970acf59 -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 4817
21  com.apple.AppKit                0x970a5e5d -[NSView displayIfNeeded] + 1365
22  com.apple.AppKit                0x970a2c35 -[NSWindow displayIfNeeded] + 316
23  com.apple.AppKit                0x970a572c _handleWindowNeedsDisplayOrLayoutOrUpdateConstraints + 804
24  com.apple.CoreFoundation        0x9be4faad _runLoopObserverWithBlockContext + 29
25  com.apple.CoreFoundation        0x9be1c07e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
26  com.apple.CoreFoundation        0x9be1bfbd __CFRunLoopDoObservers + 413
27  com.apple.CoreFoundation        0x9bdee994 __CFRunLoopRun + 1044
28  com.apple.CoreFoundation        0x9bdee1ec CFRunLoopRunSpecific + 332
29  com.apple.CoreFoundation        0x9bdee098 CFRunLoopRunInMode + 120
30  com.apple.HIToolbox             0x93e37487 RunCurrentEventLoopInMode + 318
31  com.apple.HIToolbox             0x93e3ecee ReceiveNextEventCommon + 168
32  com.apple.HIToolbox             0x93e3ec32 BlockUntilNextEventMatchingListInMode + 88
33  com.apple.AppKit                0x970656c0 _DPSNextEvent + 678
34  com.apple.AppKit                0x97064f2d -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 113
35  com.apple.AppKit                0x9706129f -[NSApplication run] + 904
36  com.apple.AppKit                0x972f4928 NSApplicationMain + 1054
37  com.macromates.textmate         0x0012e4f2 main + 168
38  com.macromates.textmate         0x0000610e _start + 216
39  com.macromates.textmate         0x00006035 start + 41
@protocool
Owner

Is there any more context you can add to this, such as what you're doing just prior to the crash?

@yyyc514

It feels very repetitive (at least once day?) but I can't ever quite pin down what I was doing at the time... perhaps trying to close a project or switch to or from Textmate (or to or from one Textmate window)... I did glance at the source... could it be that perhaps cleanupImmediately is not working properly? Thinking specifically of notePreferences and line 154... perhaps on Lion the window or field is deconstructed earlier than you're expecting so it's already gone at the point you're trying to get the value from it?

Just a very wild guess...

@protocool
Owner

I wish it was as straight forward as that... notePreferences isn't anywhere in the call stack so it's not involved.

What the stack trace seems to be saying is that an on-screen cell is trying draw but its associated control has been deallocated. As I type this out, I'm beginning to wonder if it's the window's field editor.

I'll dig around a bit.

@yyyc514
  1. Open a folder in Textmate
  2. Open AckMate window, run search for something (must have results I think)
  3. Click on Textmate window for folder (bring it back to focus)
  4. Close window
  5. Textmate crashes

I can reproduce 100% of the time.

@schneems

100% of the time it crashes, every time for me. Fresh install using Lion

@yyyc514

Protocol, can you reproduce?

@protocool
Owner

I haven't been able to reproduce but I've been running 10.7.2 (pre-release) to verify that one of my open bugs with apple was, in fact, fixed.

I'll be revving back to 10.7.1 later today.

Trev

@schneems

May be a different problem, i'm not able to get a stack trace, it doesn't actually crash, it just beach-balls indefinitely. I'm able to do this every time by following the steps you outlined above 100% of the time. If the app does ever become responsive again (rarely) then clicking on the AckMate window and clicking back to text mate gives me another beach-ball.

@yyyc514

Ping, this is still driving me nuts. Any news?

@protocool
Owner

Found it.

Got distracted by the fact that it didn't happen for me if I used the keyboard to switch back to the main window.

Ended up missing a dangling garbage pointer to a delegate during window tear-down - surprised it wasn't a source of crashes on earlier OSX releases really...

Checked in the fix, won't be doing a release until I have a chance to review other possible changes (like the stupid UTF8 thing).

Trev

@slowernet

For those looking for a build with this fix: https://github.com/mirell/AckMate/downloads

@schneems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.