Catalyst app crash on macOS Developer Transition Kit

Hi there

My DTK arrived this week

I ran my side project (a Mac Catalyst app) and it crashes on macOS (both natively and via Rosetta)

Note. the code is 1 year old

I wanted to share early but I will update this thread once I've run it on the Intel Mac to confirm it's still working and also if its still working iPadOS

The code is open source here

https://github.com/madhikarma/mac-catalyst-demo

and here's the crash log from the Debugger in Xcode

Code Block
[ERROR] - Unable to create and lookup port "com.apple.CoreDisplay.master" => 1102
0 0x7fff2a896d58 CoreDisplay::Mach::Port::Port(std::1::basic_string<char, std::1::char_traits<char>, std::1::allocator<char> >, CoreDisplay::Mach::Port::PortLookup) + 388
1 0x7fff2a807668 CoreDisplay_Display_GetPotentialHeadroom + 155
2 0x7fff276eeaa4 -[NSCGSDisplay initWithDisplayID:flipOffset:] + 809
3 0x7fff276ee69f _NSCGSCreateDisplaysFromDisplayIDsUsingPredicate_block_invoke + 68
4 0x7fff276ee530 _NSCGSCreateArrayUsingBlock + 174
5 0x7fff27e04af0 _NSCGSDisplayConfigurationUpdate + 1074
6 0x10d23c4dc _dispatch_client_callout + 8
7 0x10d23dc58 _dispatch_once_callout + 87
8 0x7fff27e03e7a _NSCGSDisplayConfigurationGetCurrent + 94
9 0x7fff276edf99 _NSScreenConfigurationUpdateSharedInfoForReason + 365
10 0x7fff276edde2 _NSScreenConfigurationEnsureInitialUpdateOccurred_block_invoke + 105
11 0x10d23c4dc _dispatch_client_callout + 8
12 0x10d23dc58 _dispatch_once_callout + 87
13 0x7fff276edd77 +[_NSScreenConfiguration prepare] + 35
14 0x7fff276edd4d -[NSApplication(ScreenHandling) _registerForDisplayChangedNotifications] + 100
15 0x7fff276e60d3 -[NSApplication init] + 1612
16 0x7fff276e5866 +[NSApplication sharedApplication] + 120
17 0x7fff66b04c5e UINSApplicationInstantiate + 62
18 0x7fff79b93d55 UIApplicationMain + 136
19 0x104aaf86b main + 75
20 0x7fff715a3651 start + 1
2020-09-05 15:09:32.867984+0100 MacCatalystDemo[1492:27093] [default] [ERROR] - GetLatestRealtimeDisplayInfoMemory: Fail to get RealtimeDisplayInfoShmem port
2020-09-05 15:09:32.871231+0100 MacCatalystDemo[1492:27093] [default] [ERROR] - Unable to create and lookup port "com.apple.CoreDisplay.master" => 1102
0 0x7fff2a896d58 CoreDisplay::Mach::Port::Port(std::1::basic_string<char, std::1::char_traits<char>, std::1::allocator<char> >, CoreDisplay::Mach::Port::PortLookup) + 388
1 0x7fff2a8078b5 CoreDisplay_Display_GetReferenceHeadroom + 155
2 0x7fff276eeab6 -[NSCGSDisplay initWithDisplayID:flipOffset:] + 827
3 0x7fff276ee69f _NSCGSCreateDisplaysFromDisplayIDsUsingPredicate_block_invoke + 68
4 0x7fff276ee530 _NSCGSCreateArrayUsingBlock + 174
5 0x7fff27e04af0 _NSCGSDisplayConfigurationUpdate + 1074
6 0x10d23c4dc _dispatch_client_callout + 8
7 0x10d23dc58 _dispatch_once_callout + 87
8 0x7fff27e03e7a _NSCGSDisplayConfigurationGetCurrent + 94
9 0x7fff276edf99 _NSScreenConfigurationUpdateSharedInfoForReason + 365
10 0x7fff276edde2 _NSScreenConfigurationEnsureInitialUpdateOccurred_block_invoke + 105
11 0x10d23c4dc _dispatch_client_callout + 8
12 0x10d23dc58 _dispatch_once_callout + 87
13 0x7fff276edd77 +[_NSScreenConfiguration prepare] + 35
14 0x7fff276edd4d -[NSApplication(ScreenHandling) _registerForDisplayChangedNotifications] + 100
15 0x7fff276e60d3 -[NSApplication init] + 1612
16 0x7fff276e5866 +[NSApplication sharedApplication] + 120
17 0x7fff66b04c5e UINSApplicationInstantiate + 62
18 0x7fff79b93d55 UIApplicationMain + 136
19 0x104aaf86b main + 75
20 0x7fff715a3651 start + 1
2020-09-05 15:09:33.285846+0100 MacCatalystDemo[1492:27093] [UIFocus] Focus system disabled
willConnectTo
2020-09-05 15:09:33.919322+0100 MacCatalystDemo[1492:27093] [UIFocus] Focus system enabled
viewDidLoad
2020-09-05 15:09:35.192992+0100 MacCatalystDemo[1492:27093] libMobileGestalt utility.c:389: Did not recognize DeviceClass: eperm-d995af6e2ef02771
2020-09-05 15:09:36.422522+0100 MacCatalystDemo[1492:27093] [UIFocus] Focus system disabled

Update

Above I was using Xcode 12 For Universal Apps Beta 2 (which does not include the iOS SDK)

Just saw that Xcode 12 Beta 6 now includes developing Universal Apps too

No longer crashes when running

There are no warnings when compiled and running natively for macOS (Apple silicon)

But some some warnings below when run for Mac under Rosetta (Intel) in case its useful to know

I will see if making code changes can stop the warning from occurring (am presenting a debug UIAlertController on load of the app)

Code Block
2020-09-05 16:15:08.625111+0100 MacCatalystDemo[3428:333998] [default] [ERROR] - Unable to create and lookup port "com.apple.CoreDisplay.master" => 1102
0 0x7fff2a896d58 CoreDisplay::Mach::Port::Port(std::1::basic_string<char, std::1::char_traits<char>, std::1::allocator<char> >, CoreDisplay::Mach::Port::PortLookup) + 388
1 0x7fff2a807668 CoreDisplay_Display_GetPotentialHeadroom + 155
2 0x7fff276eeaa4 -[NSCGSDisplay initWithDisplayID:flipOffset:] + 809
3 0x7fff276ee69f _NSCGSCreateDisplaysFromDisplayIDsUsingPredicate_block_invoke + 68
4 0x7fff276ee530 _NSCGSCreateArrayUsingBlock + 174
5 0x7fff27e04af0 _NSCGSDisplayConfigurationUpdate + 1074
6 0x10cf304dc _dispatch_client_callout + 8
7 0x10cf31c58 _dispatch_once_callout + 87
8 0x7fff27e03e7a _NSCGSDisplayConfigurationGetCurrent + 94
9 0x7fff276edf99 _NSScreenConfigurationUpdateSharedInfoForReason + 365
10 0x7fff276edde2 _NSScreenConfigurationEnsureInitialUpdateOccurred_block_invoke + 105
11 0x10cf304dc _dispatch_client_callout + 8
12 0x10cf31c58 _dispatch_once_callout + 87
13 0x7fff276edd77 +[_NSScreenConfiguration prepare] + 35
14 0x7fff276edd4d -[NSApplication(ScreenHandling) _registerForDisplayChangedNotifications] + 100
15 0x7fff276e60d3 -[NSApplication init] + 1612
16 0x7fff276e5866 +[NSApplication sharedApplication] + 120
17 0x7fff66b04c5e UINSApplicationInstantiate + 62
18 0x7fff79b93d55 UIApplicationMain + 136
19 0x1047970ab main + 75
20 0x7fff715a3651 start + 1
2020-09-05 16:15:08.641239+0100 MacCatalystDemo[3428:333998] [default] [ERROR] - GetLatestRealtimeDisplayInfoMemory: Fail to get RealtimeDisplayInfoShmem port
2020-09-05 16:15:08.644389+0100 MacCatalystDemo[3428:333998] [default] [ERROR] - Unable to create and lookup port "com.apple.CoreDisplay.master" => 1102
0 0x7fff2a896d58 CoreDisplay::Mach::Port::Port(std::1::basic_string<char, std::1::char_traits<char>, std::1::allocator<char> >, CoreDisplay::Mach::Port::PortLookup) + 388
1 0x7fff2a8078b5 CoreDisplay_Display_GetReferenceHeadroom + 155
2 0x7fff276eeab6 -[NSCGSDisplay initWithDisplayID:flipOffset:] + 827
3 0x7fff276ee69f _NSCGSCreateDisplaysFromDisplayIDsUsingPredicate_block_invoke + 68
4 0x7fff276ee530 _NSCGSCreateArrayUsingBlock + 174
5 0x7fff27e04af0 _NSCGSDisplayConfigurationUpdate + 1074
6 0x10cf304dc _dispatch_client_callout + 8
7 0x10cf31c58 _dispatch_once_callout + 87
8 0x7fff27e03e7a _NSCGSDisplayConfigurationGetCurrent + 94
9 0x7fff276edf99 _NSScreenConfigurationUpdateSharedInfoForReason + 365
10 0x7fff276edde2 _NSScreenConfigurationEnsureInitialUpdateOccurred_block_invoke + 105
11 0x10cf304dc _dispatch_client_callout + 8
12 0x10cf31c58 _dispatch_once_callout + 87
13 0x7fff276edd77 +[_NSScreenConfiguration prepare] + 35
14 0x7fff276edd4d -[NSApplication(ScreenHandling) _registerForDisplayChangedNotifications] + 100
15 0x7fff276e60d3 -[NSApplication init] + 1612
16 0x7fff276e5866 +[NSApplication sharedApplication] + 120
17 0x7fff66b04c5e UINSApplicationInstantiate + 62
18 0x7fff79b93d55 UIApplicationMain + 136
19 0x1047970ab main + 75
20 0x7fff715a3651 start + 1







Catalyst app crash on macOS Developer Transition Kit
 
 
Q