1 Reply
      Latest reply on May 23, 2020 12:39 AM by Claude31
      greay Level 1 Level 1 (0 points)

        I'm just starting out with SwiftUI (for macOS) and am running into all sorts of problems, mostly related to resizing the application window.


        I'm seeing two distinct crashes in my app, but I can't figure out how to troubleshoot them.


        One is incredibly vague:


        *** Assertion failure in -[_TtC7SwiftUIP33_A874FC5B9DB530D4375C25AE2AA39DF215HostingClipView setBoundsOrigin:], 

        this'll happen randomly when resizing the window, but there's nothing else to go on.


        The other is:


        It's not legal to call -layoutSubtreeIfNeeded on a view which is already being laid out.  If you are implementing 
        the view's -layout method, you can call -[super layout] instead. Break on void _NSDetectedLayoutRecursion(void) to 
        debug.  This will be logged only once.  This may break in the future.

        Which gives me a tip, but once I actually figured out how to set that breakpoint, I still really have no idea what to do. The stack trace for either really doesn't do me any good.