Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode crashes when I select my iPhone 5s as target #14

Closed
usq opened this issue Apr 8, 2014 · 6 comments · Fixed by #22
Closed

Xcode crashes when I select my iPhone 5s as target #14

usq opened this issue Apr 8, 2014 · 6 comments · Fixed by #22
Labels
Milestone

Comments

@usq
Copy link

usq commented Apr 8, 2014

Everything works with the simulator, but as soon as I select my 5s as the target, Xcode crashes, apparently nil gets inserted in a dictionary -[PLYVariableManager colorForVariable:inWorkspace:]

this is the stack trace

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

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
ProductBuildVersion: 5B130a
UNCAUGHT EXCEPTION (NSInvalidArgumentException): *** setObjectForKey: key cannot be nil
UserInfo: (null)
Hints: None
Backtrace:
  0  0x00007fff8db22244 __exceptionPreprocess (in CoreFoundation)
  1  0x0000000109866da0 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
  2  0x00007fff9348ae75 objc_exception_throw (in libobjc.A.dylib)
  3  0x00007fff8da1d46e -[__NSDictionaryM setObject:forKey:] (in CoreFoundation)
  4  0x000000011294c568 -[PLYVariableManager colorForVariable:inWorkspace:] (in Polychromatic)
  5  0x000000011294b16f -[DVTTextStorage(PLYHighlightingHook) ply_colorAtCharacterIndex:effectiveRange:context:] (in Polychromatic)
  6  0x0000000109ceb145 -[DVTSourceTextView layoutManager:shouldUseTemporaryAttributes:forDrawingToScreen:atCharacterIndex:effectiveRange:] (in DVTKit)
  7  0x00007fff8c99c6f1 -[NSLayoutManager(NSPrivate) _drawBackgroundForGlyphRange:atPoint:parameters:] (in AppKit)
  8  0x0000000109cea823 -[DVTLayoutManager drawBackgroundForGlyphRange:atPoint:] (in DVTKit)
  9  0x00007fff8c99a9f7 -[NSTextView drawRect:] (in AppKit)
 10  0x0000000109ce961c -[DVTCompletingTextView drawRect:] (in DVTKit)
 11  0x0000000109ce92c9 -[DVTSourceTextView drawRect:] (in DVTKit)
 12  0x00007fff8ca3fe25 -[NSTextView _drawRect:clip:] (in AppKit)
 13  0x0000000109ce91b8 -[DVTCompletingTextView _drawRect:clip:] (in DVTKit)
 14  0x00007fff8c91a15c -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 15  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 16  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 17  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 18  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 19  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 20  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 21  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 22  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 23  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 24  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 25  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 26  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 27  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 28  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 29  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 30  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 31  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 32  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 33  0x00007fff8c91ace4 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 34  0x00007fff8c918fd1 -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] (in AppKit)
 35  0x00007fff8c915fbf -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] (in AppKit)
 36  0x00007fff8c8f542a -[NSView displayIfNeeded] (in AppKit)
 37  0x00007fff8c95a85e _handleWindowNeedsDisplayOrLayoutOrUpdateConstraints (in AppKit)
 38  0x00007fff8f4c40f4 __NSFireTimer (in Foundation)
 39  0x00007fff8da89564 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ (in CoreFoundation)
 40  0x00007fff8da8909f __CFRunLoopDoTimer (in CoreFoundation)
 41  0x00007fff8dafa5aa __CFRunLoopDoTimers (in CoreFoundation)
 42  0x00007fff8da448e5 __CFRunLoopRun (in CoreFoundation)
 43  0x00007fff8da440b5 CFRunLoopRunSpecific (in CoreFoundation)
 44  0x00007fff93659a0d RunCurrentEventLoopInMode (in HIToolbox)
 45  0x00007fff936597b7 ReceiveNextEventCommon (in HIToolbox)
 46  0x00007fff936595bc _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
 47  0x00007fff8c7be3de _DPSNextEvent (in AppKit)
 48  0x00007fff8c7bda2b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
 49  0x0000000109dcbe31 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
 50  0x00007fff8c7b1b2c -[NSApplication run] (in AppKit)
 51  0x00007fff8c79c913 NSApplicationMain (in AppKit)
 52  0x00007fff894225fd start (in libdyld.dylib)
 53  0x0000000000000001
@fjcaetano
Copy link

It's crashing like crazy for me too.

@kolinkrewinkel
Copy link
Owner

Will have to pick through for whatever scenarios cause these bugs. I think the complexity of the tool lends itself to a lot of well... variation and opens up the potential for plenty of crashes. I'll check this one out specifically.

@usq
Copy link
Author

usq commented Apr 9, 2014

I should mention I copied the provided theme, changed the font and some color values
screen shot 2014-04-09 at 09 58 15

My iPhone doesn't have to be connected for xcode to crash, it appears to crash when switching from device (iOS Device or a connected on) to any simulator and vice versa. Switching between the simulators works for me.

@jonsterling
Copy link

(reproduced)

@usq usq closed this as completed Apr 9, 2014
@usq usq reopened this Apr 9, 2014
@kolinkrewinkel
Copy link
Owner

I think @usq's fix for this may be the best route, because oftentimes Xcode just passes bizarre parameters (or at least, to us on the outside, there's reason the condition should occur.)

I have to do a similar thing in the text storage swizzled-method because sometimes no IDEIndex is passed. With the coloring, since live parsing is going on, I think checking for the right parameters, as @usq's done, is about the only thing we can get.

@kolinkrewinkel kolinkrewinkel added this to the 1.0.1 milestone Apr 9, 2014
@Isuru-Nanayakkara
Copy link

Switching between simulators crashed Xcode 5.1 left and right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants