Post

Replies

Boosts

Views

Activity

SwiftUI > missed . on frame modifier
Recently I've made 1 character mistake in my code and have hard time during searching what was the problem. Basically I forgot to set dot near one of the frame modifiers and compiler did not warn me, but during app running I got 100% CPU and rocket increase of RAM (on real app). Feels like recursion, but no any hint in call stack inside Xcode on crash stop. struct BadView: View { var body: some View { Color.red frame(height: 36) } } I would like to see at least warning for such cases. Problem may look simple on this small example, but if you added 1k+ lines after last compilation - searching this type of errors could be problematic when you have no idea what to search.
1
0
124
Oct ’24
App crashes on iOS12 if built with xCode 13.2+
App crashes on startup (trying to init first view controller) on iOS 12.5.5 if built with latest xCode (13.2 - 13.3 beta), but works fine if built with xCode 13.1. I do not own 12.5.5 device, but I received crash report that I symbolicated OS Version: iPhone OS 12.5.5 (16H62) Baseband Version: 10.80.02 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 0 Application Specific Information: abort() called Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001eaa370dc __pthread_kill (in libsystem_kernel.dylib) + 8 1 libsystem_pthread.dylib 0x00000001eaab0094 pthread_kill$VARIANT$mp (in libsystem_pthread.dylib) + 380 2 libsystem_c.dylib 0x00000001ea98ff4c __abort (in libsystem_c.dylib) + 152 3 libsystem_c.dylib 0x00000001ea98feb4 __abort (in libsystem_c.dylib) + 0 4 libsystem_malloc.dylib 0x00000001eaa8a684 _malloc_put (in libsystem_malloc.dylib) + 0 5 libsystem_malloc.dylib 0x00000001eaa8a83c malloc_report (in libsystem_malloc.dylib) + 60 6 libsystem_malloc.dylib 0x00000001eaa7d49c free (in libsystem_malloc.dylib) + 532 7 libswiftCore.dylib 0x0000000218a84c68 _swift_release_dealloc (in libswiftCore.dylib) + 28 8 libswiftCore.dylib 0x0000000218a5bd50 destroy for IndexingIterator (in libswiftCore.dylib) + 44 9 libswiftCore.dylib 0x000000021894b3ec SetAlgebra.init<A>(_:) (in libswiftCore.dylib) + 660 10 libswiftDispatch.dylib 0x0000000218b6c720 protocol witness for SetAlgebra.init<A>(_:) in conformance OS_dispatch_queue.Attributes (in libswiftDispatch.dylib) + 36 11 Zodiac Touch 0x0000000100562538 default argument 2 of OS_dispatch_queue.init(label:qos:attributes:autoreleaseFrequency:target:) + 3106104 (<compiler-generated>:0) 12 Zodiac Touch 0x00000001005650b0 ZPDashboardViewController.init(collectionViewLayout:) + 3117232 (ZPDashboardViewController.swift:57) ZPDashboardViewController.swift line 57: class ZPDashboardViewController: UICollectionViewController { ... private let queue = DispatchQueue(label: "provider") // <- line 57 ... And I don't understand why does it crash... I've seen topic on swift forum and thought it was related - but seems that it is not. Because I have same crash with xCode 13.3 beta. Is there any explanation for this issue?
0
1
954
Feb ’22