Xcode 12.2 on Big Sur: Crashing when opening Behaviors pane

After upgrading to Big Sur and Xcode 12.2, the app crashes every time I select the behaviors preference pane.

I can see the following error in the crash report:

Code Block
ProductBuildVersion: 12B45b
Crashing on exception: The window has been marked as needing another Layout Window pass, but it has already had more Layout Window passes than there are views in the window.
<NSPanel: 0x7f9a85f69130> 0x9ed (2541) {{545, 363}, {830, 552}} Behaviors en


Anyone else experiencing this?

Replies

I got this one too.
xcode 12 (12.3 - 12C33) is generally very unstable...
crashing too often for a "professional tool" it a real pain to use it

still have these fixed sized text edit fields in many places of the user interface
particularly in the projet target settings page with the fields for bundle...

how apple , the champion of user experience, can provide such stuff... ?


I got exactly this error wehen starting TV.app and Musik.app under BigSur 11.1. on the seconf Screen or if the second screen is connected. If I remove the second screen verythings work sind. Before BigSur (Catalina) everything worked fine... This is really strange... (It's a 2016 MBP)
I am getting this error as well. I am running Xcode 12.3(12C33) on macOS Big Sur 11.1. I was able to open the preferences window if I am doing it from the main Xcode window. When I am in a project, clicking the preferences just crashes.
I got the same error with Xcode 12.3 on big sur when I try to add the APPLE ID account.

ProductBuildVersion: 12C33
Crashing on exception: The window has been marked as needing another Layout Window pass, but it has already had more Layout Window passes than there are views in the window.
<NSPanel: 0x7fc61fa8b810> 0x5a91 (23185) {{1656, -17}, {830, 552}} Behaviors en
I got this error with Xcode 12.4. Interestingly, I only get the crash when trying to access the Behaviors tab when Xcode is on my Thunderbolt Display (connected via the lightning connector to a lightning to USB-C adaptor). I've tested this both on my 2019 MBP (via the adapter) and on an older 2015 MBP (no adapter needed). Both MBP are running macOS 11.1.

However (and this is where things get spicy) I have a third monitor connected (an LG, via a USBC to HDMI). I am able to open the Behaviors tab on this monitor just fine. Adding some habanero to the mix is that you can open the Behaviors on a save screen (for me its the MBP main monitor or my LG) then drag Xcode to the Thunderbolt Display (the crashing screen). This leaves the preference pane on the safe screen. Xcode doesn't crash until I drag the preference panel over to the crashing screen. As soon as that happens, poof! Xcode crashes... Like magic...!
Well. Bizarre about the external monitor thing. For all of you having this, do you also see an empty Components tab which prevents you from downloading simulators?
Had a problem opening the xib files or storyboard files. Whenever I tried to open it, Xcode crashed.

Solved it when I created a new storyboard and Xcode presented it, right afterwards any other interface builder file opened normally.
It is just the action of displaying the Preferences panel with the Behaviour tab selected on an external monitor that triggers the crash.

1 - Open XCode on the laptop monitor.
2 - Open Preferences
3 - Select the Behaviour Tab
4 - Drag the Preference panel over to the external monitor.
5 - XCode --> Splat!

By the way, the next time you will open the Preference panel, the Behaviour tab will be displayed and XCode will crash if you have it displayed in your external monitor. So make sure to open XCode on your laptop monitor and select any other tab in the preference panel.
Like several of you, I am also crashing on the new MacBook M1 after switching over opening storyboards or trying to add simulators. Adding a new storyboard crashed as well. The simulator panel is blank, and adding one crashes Xcode.
I got the same problem - Xcode 12 (12D4e) and have several projects in development. Very annoying and could even get me fired from my independent development job. What say you, Apple???
Same behaviour here.
Xcode 12.4
macbook pro m1
Big sur 11.2.1

open preferences on either external monitor (no they aren't hooked up at the same time) Crashes Xcode both with and without a project open. Move xcode to laptop screen - preferences does not crash the application and everything works fine.
I think I found the answer. Unplug all iOS devices from your computer. Since I've done that, no problems.
Hey,
I found a solution but it's not ideal, but enough for me.
In Mission Control, uncheck "Displays have separate spaces". This seems to work fine. Then to disable the fact that all other screens go black when pressing the green fullscreen button, use this app called "RightZoom" to reroute that button to be used just for the old-style stretching window to fit the screen. Haven't experienced any issues with Xcode since then. Otherwise, with "Displays have separate spaces" enabled, XCode crashes for me every time i open preferences, and also at random points it freezes every 10 mins or so. Works with latest XCode version as of 26/03/2021.

edit:
using MBP 13 from 2018, no touchbar
I have had this issue for a while now.
I submitted feedback to Apple.
Within a few days I got a reply that it should the fixed in Xcode 12.5 beta. I checked, and it's indeed fixed.
Hopefully it will stay like that for now.
Same exact problem. How is that this is still an issue 4 months later? Do you really expect developers to not use external monitors? Get with it Apple....