skip to Main Content

I have been getting these error messages in debug window in Xcode:

2023-06-06 07:46:15.412684-0500 Courier[8456:442818] [LayoutConstraints] Unsupported layout off the main thread for _UIModernBarButton with nearest ancestor view controller, UINavigationController
2023-06-06 07:46:15.413268-0500 Courier[8456:442818] [Assert] -[UIImageView _invalidateImageLayouts] must be called on the main queue
2023-06-06 07:46:15.413730-0500 Courier[8456:442818] [Assert] -[UIImageView _layoutForImage:inSize:cachePerSize:forBaselineOffset:] must be called on the main queue
(lldb) 

The messages come when my code crashes and gives this error message in a red ribbon in the editor window:

Thread 10: EXC_BREAKPOINT (code=1, subcode=0x10515fd44)

In the Debug navigator on the left pane of Xcode, it shows the code stopped at:

#0  0x000000010515fd44 in _dispatch_assert_queue_fail ()

This is what shows at the end in the editor window. At the very end is where the error message in the red ribbon shows:

    0x10515fd10 <+68>:  add    x9, x9, #0xf2f            ; "BUG IN CLIENT OF LIBDISPATCH: Assertion failed: "
    0x10515fd14 <+72>:  stp    x9, x8, [sp]
    0x10515fd18 <+76>:  adrp   x1, 65
    0x10515fd1c <+80>:  add    x1, x1, #0xefa            ; "%sBlock was %sexpected to execute on queue [%s (%p)]"
    0x10515fd20 <+84>:  sub    x0, x29, #0x18
    0x10515fd24 <+88>:  bl     0x10519cfc8               ; symbol stub for: asprintf
    0x10515fd28 <+92>:  ldur   x19, [x29, #-0x18]
    0x10515fd2c <+96>:  str    x19, [sp]
    0x10515fd30 <+100>: adrp   x0, 65
    0x10515fd34 <+104>: add    x0, x0, #0xf65            ; "%s"
    0x10515fd38 <+108>: bl     0x1051986b0               ; _dispatch_log
    0x10515fd3c <+112>: adrp   x8, 98
    0x10515fd40 <+116>: str    x19, [x8, #0x268]
->  0x10515fd44 <+120>: brk    #0x1

I have no idea which code is causing the error, so I don’t even know what code to put in my question.

I created a symbolic breakpoint with ‘LayoutConstraints’ in the Symbol field. It is never tripped.

I get no purple warnings that says a line of code should not be in the main thread.

I have no idea where to go from here. I don’t ind anything when I do a search in the internet that is narrowed down to address my error.

I am running the code on an iPhone 13 Pro Max device with iOS 16.5.

I am using Xcode 14.3 on a Mac Pro running Ventura 13.4

2

Answers


  1. I also encounter this problem at present, but I have tried to cancel the Debug executable and the app can run normally.

    Login or Signup to reply.
  2. The messages are telling you that there is something causing views in your app to be modified from a background thread.

    Do you have any code in your app that could be calling things off of the main queue (i.e. do you use a global DispatchQueue anywhere? Do you use NSThread anywhere? Do you use a networking library that might be calling back to you on a background thread? etc.).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search