Termination Description: DYLD, can't resolve symbol _$s8RoomPlan0A14CaptureSessionC13ConfigurationVMa

I have got a crash related with RoomPlan framework on iOs 13.5.1

Hardware Model:      iPad6,11
Process:            xxxxxxx [4677]
Path:                /private/var/containers/Bundle/Application/15CC2737-2FFD-4A17-A111-A2DB7A6838E0/xxxxxxx.app/xxxxxxx
Identifier:          xxxxxxx
Version:             1489 (4.7.3)
AppStoreTools:       14E221
AppVariant:          1:iPad6,11:13
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           xxxxxxx [1071]


Date/Time:           2023-08-05 04:34:53.0188 +0700
Launch Time:         2023-08-05 04:34:52.7050 +0700
OS Version:          iPhone OS 13.5.1 (17F80)
Release Type:        User
Baseband Version:    n/a
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Description: DYLD, can't resolve symbol _$s8RoomPlan0A14CaptureSessionC13ConfigurationVMa in /private/var/containers/Bundle/Application/15CC2737-2FFD-4A17-A111-A2DB7A6838E0/xxxxxxx.app/xxxxxxx because dependent dylib #40 could not be loaded
Triggered by Thread:  0

Thread 0 name:
Thread 0 Crashed:
0   dyld                          	0x0000000105ea8f68 __abort_with_payload + 8
1   dyld                          	0x0000000105eafee8 abort_with_payload_wrapper_internal + 100 (terminate_with_reason.c:102)
2   dyld                          	0x0000000105eaff18 abort_with_payload + 12 (terminate_with_reason.c:124)
3   dyld                          	0x0000000105ead13c dyld::halt(char const*) + 384 (dyld2.cpp:4240)
4   dyld                          	0x0000000105e607fc dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 168 (dyld2.cpp:4328)
5   libdyld.dylib                 	0x00000001b1482398 dyld_stub_binder + 60
6  xxxxxxx                  	0x000000010475cc38 type metadata completion function for RoomPlanCaptureViewController + 60 (<compiler-generated>:0)
7   libswiftCore.dylib            	0x00000001bedcf76c swift_getSingletonMetadata + 956 (MetadataCache.h:920)
8   xxxxxxx                  	0x000000010475a540 type metadata accessor for RoomPlanCaptureViewController + 48 (<compiler-generated>:0)
9   libobjc.A.dylib               	0x00000001b13ab958 realizeAllClasses() + 112 (objc-runtime-new.mm:2840)
10  libobjc.A.dylib               	0x00000001b13ae6dc objc_getClassList + 92 (objc-runtime-new.mm:5013)
.
.
14  dyld                          	0x0000000105e732c4 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 428 (ImageLoaderMachO.cpp:2427)
15  dyld                          	0x0000000105e736b0 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 52 (ImageLoaderMachO.cpp:2524)
16  dyld                          	0x0000000105e6e0f0 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 536 (ImageLoader.cpp:1621)
17  dyld                          	0x0000000105e6c520 ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 184 (ImageLoader.cpp:605)
18  dyld                          	0x0000000105e6c5e8 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 92 (ImageLoader.cpp:620)
19  dyld                          	0x0000000105e61a64 dyld::runInitializers(ImageLoader*) + 88 (dyld2.cpp:4923)
20  dyld                          	0x0000000105e687b8 dlopen_internal + 832 (dyldAPIs.cpp:1761)
21  libdyld.dylib                 	0x00000001b1483a08 dlopen + 172 (dyldAPIsInLibSystem.cpp:1545)
.
.
.
30  dyld                          	0x0000000105e732c4 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 428 (ImageLoaderMachO.cpp:2427)
31  dyld                          	0x0000000105e736b0 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 52 (ImageLoaderMachO.cpp:2524)
32  dyld                          	0x0000000105e6e0f0 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 536 (ImageLoader.cpp:1621)
.
.
36  dyld                          	0x0000000105e687b8 dlopen_internal + 832 (dyldAPIs.cpp:1761)
37  libdyld.dylib                 	0x00000001b1483a08 dlopen + 172 (dyldAPIsInLibSystem.cpp:1545)
38  substitute-inserter.dylib     	0x0000000106019284 0x105f3c000 + 905860
39  substitute-inserter.dylib     	0x0000000106326ac0 0x105f3c000 + 4106944
40  substitute-inserter.dylib     	0x00000001062e7980 0x105f3c000 + 3848576
41  dyld                          	0x0000000105e732c4 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 428 (ImageLoaderMachO.cpp:2427)
42  dyld                          	0x0000000105e736b0 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 52 (ImageLoaderMachO.cpp:2524)
43  dyld                          	0x0000000105e6e0f0 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 536 (ImageLoader.cpp:1621)
44  dyld                          	0x0000000105e6c520 ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 184 (ImageLoader.cpp:605)
45  dyld                          	0x0000000105e6c5e8 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 92 (ImageLoader.cpp:620)
46  dyld                          	0x0000000105e5e608 dyld::initializeMainExecutable() + 136 (dyld2.cpp:1569)
47  dyld                          	0x0000000105e62eb0 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 4400 (dyld2.cpp:6989)
48  dyld                          	0x0000000105e5d208 dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) + 396 (dyldInitialization.cpp:145)
49  dyld                          	0x0000000105e5d038 _dyld_start + 56

by framework is weakly linked

Load command 53
          cmd LC_LOAD_WEAK_DYLIB
      cmdsize 80
         name /System/Library/Frameworks/RoomPlan.framework/RoomPlan (offset 24)
   time stamp 2 Thu Jan  1 03:00:02 1970
      current version 1.0.0
compatibility version 1.0.0
Answered by Vlad Stoyanov in 761337022

Thank you for you reply. After your first reply I suspected that this crash log from jailbroken device, because there is strange library /Library/MobileSubstrate/DynamicLibraries/OTRLocation.dylib, so I googled this lib and found some info related with jailbreaking. We do not have ios devices with ios 13.5.1 to check, but on ios simulator app works well.

Thanks.

I have got a crash related with RoomPlan framework on iOS 13.5.1

Please post a full crash report. See Posting a Crash Report for advice on how to do that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

When upload crash file i receive this message: "An error occured while uploading this log. Please try again later." So I share it via dropbox: [https://www.dropbox.com/s/bh89nm7n0l5a65g/2023-08-03_00-26-07.0838_%2B0700-3bd4b0ba90930b44b6ec68258592ceb79b554d46.crash?dl=0]

Thanks for that.

Consider:

% swift demangle 
_$s8RoomPlan0A14CaptureSessionC13ConfigurationVMa
type metadata accessor for RoomPlan.RoomCaptureSession.Configuration

So you’ve crashed because someone is trying to access the metadata for the RoomCaptureSession.Configuration type. I’m not sure exactly what’s going on here, but it’s clearly related to this:

5  libdyld.dylib      … dyld_stub_binder + 60
6  XXXXXXX            … type metadata completion function for RoomPlanCaptureViewController + 60 (<compiler-generated>:0)
7  libswiftCore.dylib … swift_getSingletonMetadata + 956 (MetadataCache.h:920)
8  XXXXXXX            … type metadata accessor for RoomPlanCaptureViewController + 48 (<compiler-generated>:0)
9  libobjc.A.dylib    … realizeAllClasses() + 112 (objc-runtime-new.mm:2840)
10 libobjc.A.dylib    … objc_getClassList + 92 (objc-runtime-new.mm:5013)
11 OTRLocation.dylib  … 0x1028e8000 + 18768

Some code within your app (frame 11) is calling objc_getClassList (frame 10). That’s triggering realisation [1] on all of the Objective-C classes that this process knows about (frame 9). One of those classes is RoomPlanCaptureViewController (frame 8), and it’s that realisation process that ended up triggering a lookup of the metadata for the RoomCaptureSession.Configuration type.

So this raises two questions:

  • Why is this happening? Honestly, I’m not sure. The mechanism we use to backdeploy Swift to older OS releases is complex and I don’t have time to dig into it in the context of a DevForums thread.

  • What can you do about it? You should definitely file a bug about this. While calling objc_getClassList is less than ideal, it shouldn’t trigger this problem during backdeployment.

Please post your bug number, just for the record.

Beyond that, I recommend that you dig into why you’re calling objc_getClassList. This call has other issues — most notably, it tends to be quite slow the first time you call it — and so if you can avoid doing that it might fix this problem and improve your app in general.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] If you’re curious about class realisation, I highly recommend that you read through the Objective-C Internals blog post series, starting here:

https://alwaysprocessing.blog/2023/01/02/objc-class-arch

Oh, wait, is that device subject to unauthorised user modifications [1]?

The crash report shows two libraries loaded in your process, /usr/lib/substitute-inserter.dylib and /usr/lib/substitute-loader.dylib, and I don’t recognise them as Apple libraries. And then there’s /Library/MobileSubstrate/DynamicLibraries/OTRLocation.dylib, which would make sense if you were on a Mac but doesn’t make sense if you’re on iOS because there’s no supported way to install stuff in /Library.

If this is a jailbroken device, I take back my earlier recommendation to file a bug. Or, more accurately, I tweak that recommendation to:

  1. First see if the problem reproduces on a supported device.

  2. If it does, then file a bug.

There’s no point filing bugs about things that only show up on jailbroken devices.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] That is, jailbroken (-:

Accepted Answer

Thank you for you reply. After your first reply I suspected that this crash log from jailbroken device, because there is strange library /Library/MobileSubstrate/DynamicLibraries/OTRLocation.dylib, so I googled this lib and found some info related with jailbreaking. We do not have ios devices with ios 13.5.1 to check, but on ios simulator app works well.

Thanks.

Termination Description: DYLD, can't resolve symbol _$s8RoomPlan0A14CaptureSessionC13ConfigurationVMa
 
 
Q