Xcode Sanitizers and Runtime Issues

RSS for tag

Xcode Runtime Issues are reports of programming errors found at run time. Issues can be found by variety of tools, including Address Sanitizer (ASan), Main Thread Checker (MTC), Thread Sanitizer (TSan), and Undefined Behavior Sanitizer (UBSan).

Xcode Runtime Issues Documentation

Posts under Xcode Sanitizers and Runtime Issues tag

105 Posts
Sort by:
Post not yet marked as solved
0 Replies
275 Views
I build my app using Unity3D with zlib.net, NativeGallery and libEasyWebcam IOS plug-ins then running on Xcode which has error log like: "Cannot find executable for CFBundle 0x7fc2158058d0 </Users/myName/Library/Developer/CoreSimulator/Devices/A8403824-30BE-41EE-AC63-844D3EC55724/data/Containers/Bundle/Application/D495B7E4-BB31-4AC9-BD08-0D90E2C2D8A3/myApp.app/Frameworks/UnityFramework.framework> (not loaded)". Do you know how to fix it? Thank!
Posted
by
Post not yet marked as solved
0 Replies
274 Views
I wrote short code for the App using camera and that crushed when I tried to display preview. There is no error code, so where should I fix?     @State var image: Image?     @State var isPicking = false     var body: some View {         ZStack {             VStack {                 VStack {                         Spacer()                         image?                             .resizable()                             .scaledToFit()                         Spacer()                     }                 HStack {                     Spacer()                     Button(action: {                         self.isPicking = true                     }) {                         Image(systemName: "camera")                         Text("カメラ")                     }.padding()                 }             }             if isPicking {                 ImagePicker()                     .edgesIgnoringSafeArea(.all)                     .transition(.move(edge: .bottom))                     .animation(.easeInOut, value: isPicking)             }         }     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView()     } } ImagePicker↓ struct ImagePicker: UIViewControllerRepresentable{         func makeCoordinator() -&gt; Coordinator {       Coordinator(self)     }          func makeUIViewController(context: Context) -&gt;     UIImagePickerController{         let picker = UIImagePickerController()         picker.sourceType = .camera         picker.delegate = context.coordinator         return picker     }          func updateUIViewController(_ uiViewController: UIImagePickerController, context: Context) {     } } struct ImagePicker_Previews: PreviewProvider {     static var previews: some View {         ImagePicker()     } } Coordinator↓ class Coordinator: NSObject, UINavigationControllerDelegate, UIImagePickerControllerDelegate{     var parent: ImagePicker     init(_ parent: ImagePicker){         self.parent = parent     }  func imagePickerController(_ picker: UIImagePickerController,                            didFinishPickingMediaWithInfo info:                                        [UIImagePickerController.InfoKey: Any]){     let uiImage = info[.originalImage] as! UIImage     UIImageWriteToSavedPhotosAlbum(uiImage, nil, nil, nil) } func imagePickerControllerDidCancel(_ picker: UIImagePickerController){ } }
Posted
by
Post not yet marked as solved
1 Replies
292 Views
I have uploaded an app twice now to have it rejected due to it crashing upon loading. I have tested and tried this on simulators it works fine, I also have this already working for the android store. Been trying to work this out for a while now but not sure how to fix this moving forwards. The crash log is as follows: Crash File. Any help would be amazing. Many Thanks,
Posted
by
Post not yet marked as solved
2 Replies
374 Views
I used animation in these codes, and there was warning like "'animation' was deprecated in iOS 15.0: Use withAnimation or animation(_:value:) instead." I am beginner, so please tell me how to fix it specifically. struct ContentView: View {     @State var image: Image?     @State var isPicking = false     var body: some View {         ZStack {             VStack {                 VStack {                         Spacer()                         image?                             .resizable()                             .scaledToFit()                         Spacer()                     }                 HStack {                     Spacer()                     Button(action: {                         self.isPicking = true                     }) {                         Image(systemName: "camera")                         Text("カメラ")                     }.padding()                 }             }             if isPicking {                 ImagePicker()                     .edgesIgnoringSafeArea(.all)                     .transition(.move(edge: .bottom))                     .animation(.easeInOut)             }         }     } } struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView()     } }
Posted
by
Post not yet marked as solved
1 Replies
244 Views
Hi, I am trying to do Flutter Run and I am keep getting this error bin/slim-build-frameworks.sh: No such file or directory command PhaseScriptExecution failed with a nonzero exit code error. This command used to work for me not, I am still in the learning phase of Flutter, any help is appreciated. If you need any further details please let me know.
Posted
by
Post not yet marked as solved
3 Replies
1.2k Views
Just Created one Login screen and its UI, UI is custom reads all properties from the local JSON file, like color, button shape, background color, icon URL, etc. Used one Framework which I have created for my UI, and just drag and drop that framework (No API calls in that Framework) but when I run my project my UI gets stuck, Not able to click any button or text field. and I am getting the following error boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics  also, My CPU use is 100% and my app is getting stuck (see screenshot) Memory is increasing to 6 to 7 GB. but the same thing is working fine in Xcode 10.2.1, right now I am using Xcode 13.2. If I run the same code in Xcode 10.2.1 then its works fine, but the same code not working in Xcode 13.2 can Anyone Help me?
Posted
by
Post not yet marked as solved
19 Replies
1.5k Views
Hi there, Recently we have been seeing thread_policy_set(1) returned 46 flooding our log output. We tracked down that the flood of this is coming from a separate library whom we've contacted. They mentioned that this is a Apple internal message that comes up in the library's deadlock detector. The proposed solution was to use OS_ACTIVITY_MODE env var to hide the logs as suggested from the post on StackOverflow.. I tried all suggestions from that StackOverflow post, which were able to hide other system logs generated from Apple but it specifically did not hide the thread_policy_set(1) returned 46 What I am hoping to understand is: Why does this message come up? I see that the documentation for this on Apple's docs is very limited. Is this message's visibility controllable via a separate variable in project settings outside of modifying settings for all logs? As a last resort, how can I disable only this log message? Thank you!
Posted
by
Post not yet marked as solved
1 Replies
313 Views
Hi, I am getting below error when trying to upload archive from xcode : - Missing 64-bit support. iOS apps submitted to the App Store must include 64-bit support and be built with the iOS 8 SDK or later. We recommend using the default "Standard Architectures" build setting for "Architectures" in Xcode, to build a single binary with both 32-bit and 64-bit support. With error code STATE_ERROR.VALIDATION_ERROR.90086 for id 75ffbe1b-dbc7-4213-82a8-a520b19cf690 I have already set arm64 under Build settings for my project and even my ios SDK version is 11.0 My Xcode version is 13. Stuck in this issue since past one week. Any help will be highly appreciated
Posted
by
Post not yet marked as solved
0 Replies
196 Views
Hi, I can build my app normally, but enabling Address sanitizer in the app target's scheme (Edit scheme -> Run -> Diagnostic -> Address Sanitizer) make the linking step fails. The failure looks like this: Ld /Users/giober/Library/Developer/Xcode/DerivedData/xxxxxxxx-fsaitgomjihmgxhepmdwyfkrmmyu/Build/Products/Debug-iphoneos/libxxxxxMain.a normal (in target 'xxxxxMain' from project 'xxxxxxxx') cd /Users/giober/workspace/my-sdk /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -target arm64-apple-ios11.0 -r -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk -L/Users/giober/Library/Developer/Xcode/DerivedData/xxxxxxxx-fsaitgomjihmgxhepmdwyfkrmmyu/Build/Products/Debug-iphoneos -F/Users/giober/Library/Developer/Xcode/DerivedData/xxxxxxxx-fsaitgomjihmgxhepmdwyfkrmmyu/Build/Products/Debug-iphoneos -filelist /Users/giober/Library/Developer/Xcode/DerivedData/xxxxxxxx-fsaitgomjihmgxhepmdwyfkrmmyu/Build/Intermediates.noindex/xxxxxxxx.build/Debug-iphoneos/xxxxxMain.build/Objects-normal/arm64/xxxxxMain.LinkFileList -Xlinker -map -Xlinker /Users/giober/Library/Developer/Xcode/DerivedData/xxxxxxxx-fsaitgomjihmgxhepmdwyfkrmmyu/Build/Intermediates.noindex/xxxxxxxx.build/Debug-iphoneos/xxxxxMain.build/xxxxxMain-LinkMap-normal-arm64.txt -Xlinker -object_path_lto -Xlinker /Users/giober/Library/Developer/Xcode/DerivedData/xxxxxxxx-fsaitgomjihmgxhepmdwyfkrmmyu/Build/Intermediates.noindex/xxxxxxxx.build/Debug-iphoneos/xxxxxMain.build/Objects-normal-asan/arm64/xxxxxMain_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -Xlinker -debug_variant -stdlib\=libc++ -fobjc-arc -fobjc-link-runtime -fsanitize\=address -ObjC -lrebrtc_multi -lxxxxxxxxxx -lxxxxxxxxxxxx -Xlinker -dependency_info -Xlinker /Users/giober/Library/Developer/Xcode/DerivedData/xxxxxxxx-fsaitgomjihmgxhepmdwyfkrmmyu/Build/Intermediates.noindex/xxxxxxxx.build/Debug-iphoneos/xxxxxMain.build/Objects-normal-asan/arm64/xxxxxMain_dependency_info.dat -o /Users/giober/Library/Developer/Xcode/DerivedData/xxxxxxxx-fsaitgomjihmgxhepmdwyfkrmmyu/Build/Products/Debug-iphoneos/libxxxxxMain.a ld: -rpath can only be used when creating a dynamic final linked image clang: error: linker command failed with exit code 1 (use -v to see invocation) I tried googling around, with no luck. I'm on XCode 13.1.
Posted
by
Post not yet marked as solved
1 Replies
222 Views
Hi everyone, Let me prefix this question by saying that I am not an iOS developer... so be gentle :-) A friend has an older codebase (written in xCode 11) that was abandoned by the developers that were working on it. He needed someone to fix Firebase logging (which I did) and everything was fine until recently. Now upon moving to any xCode > 12 there is a runtime error deep in the library code used throughout the app. The error (slightly generalized) is as follows: Could not cast value of type '() -> MyApp.TabBarFC' (0x111eda8a0) to '() -> LibraryKit.LibraryFC' (0x111eda8c0). the respective classes are declared as follows... in app code: class TabBarFC: LibraryTabBarFC { in library code: open class LibraryTabBarFC: LibraryFC { The line it specifically crashes on is in a flow controller (FC) repository in the library code where you can see an attempt to cast the app parameter to the class LibraryFC: var factories: [LibraryKit.Id.FC : () -> (LibraryFC)] = [:] open func register<FC: LibraryFC>(factory: @escaping () -> (FC), id: LibraryKit.Id.FC) { factories[id] = factory as! () -> (LibraryFC) } This code worked in xCode 11. It does not work now. If anyone could tell me if there is an obvious fix (it could be trivial), it would certainly be faster than giving the entire codebase to someone else or me reading documentation for a few nights. Thanks!
Posted
by
Post not yet marked as solved
0 Replies
207 Views
I'm trying to run the Address Sanitizer on Xcode 13.2.1 and I receive the follow error. "Cannot find Thread Sanitizer runtime support library. Please specify it manually by setting DYLD_INSERT_LIBRARIES environment variable. I took a look on this, but I couldn't fix using this. I'm using Swift 5 and a Macbook Air M1. Has anyone managed to run the sanitizer in Xcode using a macbook with the m1 chipset and could help? Thanks
Posted
by
Post not yet marked as solved
1 Replies
425 Views
Hello, I am new to swift programming and I've been having this error "Escaping closure captures mutating 'self' parameter" at the first live of the code block that I don't know how to solve any help will be appreciated. Thank you!             let task = URLSession.shared.dataTask(with: url) { data, response, error in                 guard let data = data else {return}                 do {                     let JSONData = try JSONDecoder().decode([Memories].self, from: data)                     var Count = 0                     var List: [Card] = []                     for Data in JSONData                     {                         List.append(Card(id: Count, Image: Data.Image, Date: Data.Date, Description: Data.Description, expand: false))                         Count = Count + 1                     }                     Data_List = List                 } catch {                     let error = error                     print(String(describing: error))                 }             }             task.resume()
Posted
by
Post marked as solved
2 Replies
743 Views
When a user opens the app (from a physical device or a simulator) it just shows a blank screen and close (looks like a 0.5s flash, really fast). Testing it on browserstack simulator (https://www.browserstack.com/) it works on IOS versions greater or equal to 13, but not in 11 or 12. The iOS deployment target of the project is set to 11. All our dependencies also have their iOS deployment targets set to 11 or below; React Native version: 0.64.1 While debugging it (in browserstack) some errors looks common on all failure devices (all those in IOS version 11 or 12), for example (this is the most common and maybe even the root of the troubles): <Error>: _WifyCopyUnserialized: Invalid buffer/buffersize Complete log looks like the following in all failing versions: Someone there already faced something like it or similar? Any suggestion about actions to be done in this case (app not opening in specific IOS versions?
Posted
by
Post not yet marked as solved
0 Replies
221 Views
I haven't followed the swift forums very closely, so perhaps there is news buried deep somewhere mentioning this. Will the swift compiler and/or TSAN at runtime in the future be able to identify possible race conditions associated with Swift async-await (excluding data races that are "erased" by async-await)? I suppose this could equate to proving a function is reentrant in some scenarios (from a compiler's perspective, though I'm not knowledgeable about compilers)? Consider, e.g. the scenario described in "Protect Mutable State with Swift Actors" around 9:15, where Dario talks about actor reentrancy, with the cache for the image URL
Posted
by
Post not yet marked as solved
2 Replies
414 Views
I have updated to macOS Big Sur Version 11.6 . I am not able to compile simple fortran code now using  gfortran hello_world.F90  ld: unexpected token: !tapi-tbd file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64 collect2: error: ld returned 1 exit status xxxx-MacBook-Pro-2:fortran xxxxx$ which gfortran /usr/local/bin/gfortran I found that it is the issue from macOS. I have tried many online forum suggestions but it didn't work. Is there a fix ?
Posted
by
Post not yet marked as solved
0 Replies
165 Views
Hi, we are working on getting our app updated to the new iOS platforms. The 'fishhook' is not working appropriately. Anybody have a site where I can find the new fishhook (from facebook?)? Seems that most other issues have been resolved, but Xcode doesn't like the way fishhook is coded. thanks!
Posted
by
Post not yet marked as solved
1 Replies
484 Views
Im not able to deploy my app which I was working fine suddenly it started failing , giving following error Xamarin.Hosting.MobileDeviceException: Failed to communicate with the device. Please ensure the cable is properly connected, and try rebooting the device (error: 0xe8000065 kAMDMuxConnectError) at Xamarin.Hosting.RealDevice.Connect () [0x00021] in /Users/builder/azdo/_work/1/s/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting/RealDevice.cs:57 at Xamarin.Hosting.RealDevice..ctor (System.IntPtr am_device) [0x00022] in /Users/builder/azdo/_work/1/s/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting/RealDevice.cs:40 at Xamarin.Hosting.DeviceDiscovery+<>c__DisplayClass23_1.b__0 () [0x00007] in /Users/builder/azdo/_work/1/s/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting/DeviceDiscovery.cs:225 at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/threading/thread.cs:74 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:968 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:910 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:899 at System.Threading.ThreadHelper.ThreadStart () [0x00008] in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/threading/thread.cs:111 [ERROR] FATAL UNHANDLED EXCEPTION: Xamarin.Hosting.MobileDeviceException: Failed to communicate with the device. Please ensure the cable is properly connected, and try rebooting the device (error: 0xe8000065 kAMDMuxConnectError) at Xamarin.Hosting.RealDevice.Connect () [0x00021] in /Users/builder/azdo/_work/1/s/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting/RealDevice.cs:57 at Xamarin.Hosting.RealDevice..ctor (System.IntPtr am_device) [0x00022] in /Users/builder/azdo/_work/1/s/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting/RealDevice.cs:40 at Xamarin.Hosting.DeviceDiscovery+<>c__DisplayClass23_1.b__0 () [0x00007] in /Users/builder/azdo/_work/1/s/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting/DeviceDiscovery.cs:225 at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/threading/thread.cs:74 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:968 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:910 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:899 at System.Threading.ThreadHelper.ThreadStart () [0x00008] in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/threading/thread.cs:111 Tried deleting bin/obj but its not helping me. Please suggest any workaround.
Posted
by
Post not yet marked as solved
0 Replies
218 Views
Role: Foreground Parent Process: launchd [1] Coalition: com.economicon.ebdigitals [740] Date/Time: 2022-01-06 18:21:35.3279 +0300 Launch Time: 2022-01-06 18:21:24.1357 +0300 OS Version: iPhone OS 15.1 (19B74) Release Type: User Baseband Version: 5.00.00 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 0 Last Exception Backtrace: 0 CoreFoundation 0x1826fdc9c __exceptionPreprocess + 216 (NSException.m:200) 1 libobjc.A.dylib 0x1998b1758 objc_exception_throw + 56 (objc-exception.mm:565) 2 FirebaseFirestore 0x10562bd2c firebase::firestore::util::ObjcThrowHandler(firebase::firestore::util::ExceptionType, char const*, char const*, int, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator<ch... + 344 (exception_apple.mm:67) 3 FirebaseFirestore 0x10562b7d0 firebase::firestore::util::Throw(firebase::firestore::util::ExceptionType, char const*, char const*, int, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) + 20 (exception.cc:93) 4 FirebaseFirestore 0x10560e3d8 void firebase::firestore::util::ThrowInvalidArgument<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, unsigned long>(char const*, std::__1::basic_string<char, ... + 48 (exception.h:94) 5 FirebaseFirestore 0x10561aabc firebase::firestore::api::DocumentReference::DocumentReference(firebase::firestore::model::ResourcePath, std::__1::shared_ptrfirebase::firestore::api::Firestore) + 300 (document_reference.cc:65) 6 FirebaseFirestore 0x10563d374 firebase::firestore::api::Firestore::GetDocument(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) + 80 (firestore.cc:160)
Posted
by