3 Replies
      Latest reply on Dec 6, 2019 7:55 AM by Claude31
      anishkr0101 Level 1 Level 1 (0 points)

        Xcode is crashing every time I try to click on the text field of a text view or button after switching Title to Attributed style.

         

        Xcode Version 11.2.1 (11B500)

         

        Steps to reproduce:

        1. Add a button through IB
        2. Type a multiline text for the button text
        3. Change the Title style to Attributed
        4. Click on the text field, and Xcode crashes asking me to send a report to Apple.

         

        Is this a known issue or is there a workaround to fix this issue?

        I am facing a lot of issues in development due to this crash. This also happens while using attributed text with text view.

        • Re: Xcode 11 crashes while using attributed text in IB
          Claude31 Level 8 Level 8 (7,245 points)

          I tested the following, on MacOS 10.14.6 and XCode 11.2.1 :

          - create a system button

          - set text on 2 lines : button [-option return] long text

          - set line break to charcacter wrap

          - set title to attributed

          - typed in button text to make it

               button with

                long text

          - run

           

          No crash, button appears on 2 lines.

           

          Tested as well on XCode 11.3ß. No crash either.

          Tested with 11.2ß2 on a different iMac, with also OSX 10.14.6.

           

          What's your OS version ?

            • Re: Xcode 11 crashes while using attributed text in IB
              bzjoowan22 Level 1 Level 1 (0 points)

              macOS 10.15.1 Xcode 11.2.1 :

               

              - create uilabel

              - change text color to custom

              - set text to attributed

              - click text on uilabel

              - Crash

               

              Application Specific Information:

              ProductBuildVersion: 11B500

              UNCAUGHT EXCEPTION (NSInvalidArgumentException): -[IBUIColor colorUsingColorSpaceName:]: unrecognized selector sent to instance 0x7ffada751c00

                • Re: Xcode 11 crashes while using attributed text in IB
                  Claude31 Level 8 Level 8 (7,245 points)

                  You're right.

                   

                  It occurs as well with OSX 10.14.6.

                  It occurs if you click on text either in Inspector or in the canvas.

                  Does not occur with system color.

                   

                  And you notice that

                  - select a custom color (red), not a system color

                  - when select attributed, the text is displayed in red both in canvas and Inspector (with large font)

                  - when you reopen, text is black in Inspector, but colored in canvas, until you reset it with the color picker just below attributed.

                  - after this, it does not crash.

                   

                  But, if you set attributed first, no crash.

                   

                  So it appears that when transitioning to attributed with a custom color set, something is not correctly initialized.

                   

                  Did you file a bug ?

                   

                  For those interested, a more complete crash report

                   

                  Process:               Xcode [96294]

                  Path:                  /Applications/Xcode11.3-beta.app/Contents/MacOS/Xcode

                  Identifier:            com.apple.dt.Xcode

                  Version:               11.3 (15710)

                  Build Info:            IDEFrameworks-15710000000000000~27

                  Code Type:             X86-64 (Native)

                  Parent Process:        ??? [1]

                  Responsible:           Xcode [96294]

                  User ID:               501

                   

                  Date/Time:             2019-12-06 16:52:46.234 +0100

                  OS Version:            Mac OS X 10.14.6 (18G95)

                  Report Version:        12

                  Bridge OS Version:     3.0 (14Y904)

                  Anonymous UUID:        CA86F88E-841A-B935-419B-D9C89834C6BC

                   

                  Sleep/Wake UUID:       3BCEA3A5-7416-4549-900C-9DAD1FCC0F32

                   

                  Time Awake Since Boot: 1700000 seconds

                  Time Since Wake:       1800 seconds

                   

                  System Integrity Protection: enabled

                   

                  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:

                  ProductBuildVersion: 11C24b

                  UNCAUGHT EXCEPTION (NSInvalidArgumentException): -[IBUIColor colorUsingColorSpaceName:]: unrecognized selector sent to instance 0x7fd3ec8cbed0

                  UserInfo: (null)

                  Hints:

                   

                  Backtrace:

                    0   __exceptionPreprocess (in CoreFoundation)

                    1   DVTFailureHintExceptionPreprocessor (in DVTFoundation)

                    2   objc_exception_throw (in libobjc.A.dylib)

                    3   -[NSObject(NSObject) __retain_OA] (in CoreFoundation)

                    4   ___forwarding___ (in CoreFoundation)

                    5   _CF_forwarding_prep_0 (in CoreFoundation)

                    6   -[NSTouchBarColorListPicker selectedColorKey] (in AppKit)

                    7   -[NSTouchBarColorListPicker _effectiveSelectedColorIndex] (in AppKit)

                    8   -[NSTouchBarColorListPicker _setCurrentColor:updateScrubber:] (in AppKit)

                    9   -[NSTouchBarColorListPicker setCurrentColor:] (in AppKit)

                  10   -[NSObject(NSKeyValueCoding) setValue:forKey:] (in Foundation)

                  11   -[NSObjectParameterBinder _updateObject:observedController:observedKeyPath:context:] (in AppKit)

                  12   NSKeyValueNotifyObserver (in Foundation)

                  13   NSKeyValueDidChange (in Foundation)

                  14   NSKeyValueDidChangeWithPerThreadPendingNotifications.llvm.5095408093534035264 (in Foundation)

                  15   -[NSTextTouchBarItemController setSelectedAttributesWithEnumrator:] (in AppKit)

                  16   -[NSTextView(NSTextView_TouchBar_API) updateTextTouchBarItems] (in AppKit)

                  17   -[NSTextView(NSSharing) setSelectedRanges:affinity:stillSelecting:] (in AppKit)

                  18   -[NSTextView mouseDown:] (in AppKit)

                  19   -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] (in AppKit)

                  20   -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] (in AppKit)

                  21   -[NSWindow(NSEventRouting) sendEvent:] (in AppKit)

                  22   -[IDEWorkspaceWindow sendEvent:] (in IDEKit)

                  23   -[NSApplication(NSEvent) sendEvent:] (in AppKit)

                  24   -[IDEApplication sendEvent:] (in IDEKit)

                  25   -[NSApplication run] (in AppKit)

                  26   NSApplicationMain (in AppKit)

                  27   main (in Xcode)

                  28   start (in libdyld.dylib)