This error only occurs on the actual device. When running on the simulator in Xcode 6, it does not crash.
I am creating outer space and have random shooting stars streak across the sky.
In the scene, [goToSpace] is called which sets up the starfield by using three SKEmitterNodes to simulate depth. Then a timer is initialized which sends stars shooting.
In the initialization of the starfield, it is necessary to advance the simulation of the three SKEmitterNodes to get a full sky of stars. When the line [emitterNode1 advanceSimulationTime: lifetime] is called, I get exc_bad_access. I followed tutorials to enable NSZombie which did not help.
I can't for the life of my track down why I am getting exc_bad_access. I use Parse.com's Crash Reporting which gives this stack:
> Stack Trace Thread 0 (crashed) 0 libsystem_platform.dylib
> OSSpinLockLock # 0x4 1 SpriteKit SKSpinLockSync(int*, void ()
> block_pointer) # 0x20 2 SpriteKit
> -[SKTexture loadImageData] # 0xec 3 SpriteKit
> -[SKTexture size] # 0x28 4 SpriteKit SKCEmitterSprite::update(double) # 0x117c 5 CorpBoard # 0x48d44 6 CorpBoard # 0xfbc50 7 CorpBoard #
> 0xfa6f0 8 CorpBoard # 0xfa070 9 UIKit
> -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] # 0x21c 10 UIKit
> -[UITableView _updateVisibleCellsNow:isRecursive:] # 0x934 11 UIKit
> -[UITableView layoutSubviews] # 0xa8 12 UIKit
> -[UIView(CALayerDelegate) layoutSublayersOfLayer:] # 0x238 13 QuartzCore
> -[CALayer layoutSublayers] # 0xa4 14 QuartzCore CA::Layer::layout_if_needed(CA::Transaction*) # 0x13c 15 QuartzCore
> CA::Layer::layout_and_display_if_needed(CA::Transaction*) # 0x1c 16
> QuartzCore CA::Context::commit_transaction(CA::Transaction*) # 0x110
> 17 QuartzCore CA::Transaction::commit() # 0x1b0 18 QuartzCore
> CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned
> long, void*) # 0x4c 19 CoreFoundation
> __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ # 0x1c 20 CoreFoundation
> __CFRunLoopDoObservers # 0x164 21 CoreFoundation
> __CFRunLoopRun # 0x340 22 CoreFoundation CFRunLoopRunSpecific # 0x188 23 GraphicsServices GSEventRunModal # 0xa4 24 UIKit UIApplicationMain
> # 0x5cc 25 CorpBoard # 0x5be80 26 libdyld.dylib start # 0x0 Thread 1 0
> libsystem_kernel.dylib kevent64 # 0x8 1 libdispatch.dylib
> _dispatch_mgr_invoke # 0x110 2 libdispatch.dylib
> _dispatch_mgr_thread # 0x30 Thread 2 0 libsystem_kernel.dylib
> __workq_kernreturn # 0x8 1 libsystem_pthread.dylib
> _pthread_wqthread # 0x3dc 2 libsystem_pthread.dylib start_wqthread # 0x0 Thread 3 0 libsystem_kernel.dylib
> __workq_kernreturn # 0x8 1 libsystem_pthread.dylib
> _pthread_wqthread # 0x3dc 2 libsystem_pthread.dylib start_wqthread # 0x0 Thread 4 0 libsystem_kernel.dylib
> __workq_kernreturn # 0x8 1 libsystem_pthread.dylib
> _pthread_wqthread # 0x3dc 2 libsystem_pthread.dylib start_wqthread # 0x0 Thread 5 0 libsystem_kernel.dylib
> __workq_kernreturn # 0x8 1 libsystem_pthread.dylib
> _pthread_wqthread # 0x3dc 2 libsystem_pthread.dylib start_wqthread # 0x0 Thread 6 0 libsystem_kernel.dylib
> __workq_kernreturn # 0x8 1 libsystem_pthread.dylib
> _pthread_wqthread # 0x3dc 2 libsystem_pthread.dylib start_wqthread # 0x0 Thread 7 0 libsystem_kernel.dylib mach_msg_trap # 0x8 1
> libsystem_kernel.dylib mach_msg # 0x44 2 CoreFoundation
> __CFRunLoopServiceMachPort # 0xc4 3 CoreFoundation
> __CFRunLoopRun # 0x3a8 4 CoreFoundation CFRunLoopRunSpecific # 0x188 5 Foundation
> -[NSRunLoop(NSRunLoop) runMode:beforeDate:] # 0x138 6 Foundation
> -[NSRunLoop(NSRunLoop) run] # 0x5c 7 CorpBoard # 0x206a28 8 Foundation
> __NSThread__main__ # 0x42c 9 libsystem_pthread.dylib
> _pthread_body # 0xa0 10 libsystem_pthread.dylib
> _pthread_start # 0x9c 11 libsystem_pthread.dylib thread_start # 0x0 Thread 8 0 libsystem_kernel.dylib mach_msg_trap # 0x8 1
> libsystem_kernel.dylib mach_msg # 0x44 2 CoreFoundation
> __CFRunLoopServiceMachPort # 0xc4 3 CoreFoundation
> __CFRunLoopRun # 0x3a8 4 CoreFoundation CFRunLoopRunSpecific # 0x188 5 CFNetwork
> +[NSURLConnection(Loader) _resourceLoadLoop:] # 0x1b4 6 Foundation
> __NSThread__main__ # 0x42c 7 libsystem_pthread.dylib
> _pthread_body # 0xa0 8 libsystem_pthread.dylib
> _pthread_start # 0x9c 9 libsystem_pthread.dylib thread_start # 0x0 Thread 9 0 libsystem_kernel.dylib
> __select # 0x8 1 CoreFoundation
> __CFSocketManager # 0x290 2 libsystem_pthread.dylib
> _pthread_body # 0xa0 3 libsystem_pthread.dylib
> _pthread_start # 0x9c 4 libsystem_pthread.dylib thread_start # 0x0 Thread 10 0 libsystem_kernel.dylib mach_msg_trap # 0x8 1
> libsystem_kernel.dylib mach_msg # 0x44 2 CoreFoundation
> __CFRunLoopServiceMachPort # 0xc4 3 CoreFoundation
> __CFRunLoopRun # 0x3a8 4 CoreFoundation CFRunLoopRunSpecific # 0x188 5 CoreFoundation CFRunLoopRun # 0x6c 6 CoreMotion # 0x4298c 7
> libsystem_pthread.dylib
> _pthread_body # 0xa0 8 libsystem_pthread.dylib
> _pthread_start # 0x9c 9 libsystem_pthread.dylib thread_start # 0x0 Thread 11 0 libsystem_kernel.dylib
> __workq_kernreturn # 0x8 1 libsystem_pthread.dylib
> _pthread_wqthread # 0x3dc 2 libsystem_pthread.dylib start_wqthread # 0x0
Related code:
NSTimer *space;
-(void)goToSpace {
[self shootingStar];
double lifetime;
SKEmitterNode *emitterNode1 = [self starFieldEmitter:[SKColor lightGrayColor] starSpeedY:1 starsPerSecond:.1 starScaleFactor:0.08];
lifetime = self.frame.size.height * [[UIScreen mainScreen] scale] / 1;
[emitterNode1 advanceSimulationTime:lifetime];
emitterNode1.zPosition = -10;
[self addChild:emitterNode1];
SKEmitterNode *emitterNode2 = [self starFieldEmitter:[SKColor lightGrayColor] starSpeedY:.8 starsPerSecond:.08 starScaleFactor:0.06];
emitterNode2.zPosition = -11;
lifetime = self.frame.size.height * [[UIScreen mainScreen] scale] / .8;
[emitterNode2 advanceSimulationTime:lifetime];
[self addChild:emitterNode2];
SKEmitterNode *emitterNode3 = [self starFieldEmitter:[SKColor grayColor] starSpeedY:.5 starsPerSecond:.5 starScaleFactor:0.03];
emitterNode3.zPosition = -12;
lifetime = self.frame.size.height * [[UIScreen mainScreen] scale] / .5;
[emitterNode3 advanceSimulationTime:lifetime];
[self addChild:emitterNode3];
space = [NSTimer scheduledTimerWithTimeInterval:2 target:self selector:#selector(shootingStar) userInfo:nil repeats:YES];
}
-(SKEmitterNode *)starFieldEmitter:(SKColor *)color starSpeedY:(CGFloat)starSpeedY starsPerSecond:(CGFloat)starsPerSecond starScaleFactor:(CGFloat) starScaleFactor {
SKEmitterNode *emitterNode = [SKEmitterNode node];
CGFloat lifetime = self.frame.size.height * [[UIScreen mainScreen] scale] / starSpeedY;
emitterNode.particleTexture = [SKTexture textureWithImage:[UIImage imageNamed:#"stars"]];
emitterNode.particleBirthRate = starsPerSecond;
emitterNode.particleColor = [SKColor lightGrayColor];
emitterNode.particleSpeed = starSpeedY * -1;
emitterNode.particleScale = starScaleFactor;
emitterNode.particleColorBlendFactor = 1;
emitterNode.particleLifetime = lifetime;
int rndValue = 1 + arc4random() % (45 - 1);
emitterNode.particleRotation = rndValue;
emitterNode.position = CGPointMake(self.frame.size.width / 2, self.frame.size.height);
emitterNode.particlePositionRange = CGVectorMake(self.frame.size.width, self.frame.size.height);
return emitterNode;
}
-(BOOL) getYesOrNo {
int tmp = (arc4random() % 30)+1;
if(tmp % 5 == 0)
return YES;
return NO;
}
-(void)shootingStar {
BOOL left = [self getYesOrNo];
int xPos = 0;
int height = self.frame.size.height;
int yPos = 1 + arc4random() % (height - 1);
if (left) {
xPos = -50;
} else {
xPos = self.frame.size.width + 50;
}
SKEmitterNode *shootingstar = [SKEmitterNode node];
shootingstar = [NSKeyedUnarchiver unarchiveObjectWithFile:[[NSBundle mainBundle] pathForResource:#"spark" ofType:#"sks"]];
CGPoint xy = CGPointMake(xPos, yPos);
shootingstar.position = xy;
shootingstar.name = #"shootingStar";
shootingstar.zPosition = -2.0;
shootingstar.targetNode = self.scene;
[self addChild:shootingstar];
//make random size to simulate distance
float val = [self randFloatBetween:.1 and:.5];
SKAction *scale = [SKAction scaleBy:val duration:0];
[shootingstar runAction: scale completion:nil];
//now set speed depending on size (smaller = farther = slower)
int dur = 0;
if (val < .2) dur = 5;
else if (val < .35) dur = 3;
else dur = 2;
int moveY = -500 + arc4random() % (500 - -500);
int moveX;
if (left) {
moveX = 500;
} else {
moveX = -500;
}
SKAction *move = [SKAction moveByX:moveX y:moveY duration:dur];
int waitDuration = 2 + arc4random() % (5 - 2);
SKAction *wait = [SKAction waitForDuration:waitDuration];
SKAction *sequence = [SKAction sequence:#[wait, move]];
[shootingstar runAction:sequence completion:^{
[shootingstar removeFromParent];
//[self shootingStar];
}];
}
-(float) randFloatBetween:(float)low and:(float)high {
float diff = high - low;
return (((float) rand() / RAND_MAX) * diff) + low;
}
I was able to resolve my issue by referencing a couple answers from: this similar question
In my case, the image I was using for the stars, Stars.png, was in my project directory. I moved it to Images.xcassets and added #2x and #3x versions of the image. This solved my problem, though I don't fully understand why.
Related
Here is the crash log Apple Review sent me. I've never had this issue previously, and it seems like the issue is coming from old code I've been using for months and had no problem with before.
I tried uninstalling and re installing Firebase firestore, storage, analytics, AdSupport, Auth, and kingfisher with Swift Package Manager with no success.
I can't replicate the error on my device, the simulator, or testflight. It apparently only occurs on Apple Reviews end.
Any help deciphering the crash log is much appreciated. I'm new to deciphering crash logs as I've never had an issue like this before so any help or direction on this is helpful.
Incident Identifier: B59F06E2-AEE1-481D-8B7C-E13EA1EBB3A5
CrashReporter Key: 4808b991e8d5157f0ce4498edd01aa490f760f0d
Hardware Model: iPad11,6
Process: uEats [42025]
Path: /private/var/containers/Bundle/Application/7C7686D2-1729-4FCA-8CFB-B5D3FC5540D3/uEats.app/uEats
Identifier: io.siub.uEats
Version: 3.5 (5)
AppStoreTools: 13E500
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: io.siub.uEats [4847]
Date/Time: 2022-05-06 07:56:38.9859 +0100
Launch Time: 2022-05-06 07:56:37.1542 +0100
OS Version: iPhone OS 15.4.1 (19E258)
Release Type: User
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000104f8bdec
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: SIGNAL 5 Trace/BPT trap: 5
Terminating Process: exc handler [42025]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 uEats 0x104f8bdec specialized RestaurantManager.openOrClosed(restaurant:) + 310764 (RestaurantManager.swift:200)
1 uEats 0x104f8b4b8 specialized RestaurantManager.openOrClosed(restaurant:) + 308408 (RestaurantManager.swift:200)
2 uEats 0x104f8a830 RestaurantManager.sortOpen() + 305200 (RestaurantManager.swift:154)
3 uEats 0x104f887c4 closure #1 in RestaurantManager.grabRestaurantData() + 296900 (RestaurantManager.swift:0)
4 uEats 0x104fb40dc thunk for #escaping #callee_guaranteed (#guaranteed FIRQuerySnapshot?, #guaranteed Error?) -> () + 475356 (<compiler-generated>:0)
5 uEats 0x105320d2c -[FIRQuery wrapQuerySnapshotBlock:]::Converter::OnEvent(firebase::firestore::util::StatusOr<firebase::firestore::api::QuerySnapshot>) + 4066604 (FIRQuery.mm:0)
6 uEats 0x105335878 firebase::firestore::api::Query::GetDocuments(firebase::firestore::api::Source, std::__1::unique_ptr<firebase::firestore::core::EventListener<firebase::firestore::api::QuerySnapshot>, std::__1::default_delete<firebase::firestore::core::EventListener<firebase::firestore::api::QuerySnapshot> > >&&)::ListenOnce::OnEvent(firebase::firestore::util::StatusOr<firebase::firestore::api::QuerySnapshot>) + 4151416 (query_core.cc:159)
7 uEats 0x105335ee0 firebase::firestore::api::Query::AddSnapshotListener(firebase::firestore::core::ListenOptions, std::__1::unique_ptr<firebase::firestore::core::EventListener<firebase::firestore::api::QuerySnapshot>, std::__1::default_delete<firebase::firestore::core::EventListener<firebase::firestore::api::QuerySnapshot> > >&&)::Converter::OnEvent(firebase::firestore::util::StatusOr<firebase::firestore::core::ViewSnapshot>) + 4153056 (query_core.cc:208)
8 uEats 0x105320b74 void std::__1::__invoke_void_return_wrapper<void, true>::__call<firebase::firestore::core::AsyncEventListener<firebase::firestore::core::ViewSnapshot>::OnEvent(firebase::firestore::util::StatusOr<firebase::firestore::core::ViewSnapshot>)::'lambda'()&>(firebase::firestore::core::AsyncEventListener<firebase::firestore::core::ViewSnapshot>::OnEvent(firebase::firestore::util::StatusOr<firebase::firestore::core::ViewSnapshot>)::'lambda'()&) + 4066164 (invoke.h:61)
9 uEats 0x105423f34 firebase::firestore::util::Task::ExecuteAndRelease() + 5127988 (task.cc:107)
10 libdispatch.dylib 0x180d89a2c _dispatch_client_callout + 20
11 libdispatch.dylib 0x180d97f48 _dispatch_main_queue_drain + 928
12 libdispatch.dylib 0x180d97b98 _dispatch_main_queue_callback_4CF + 44
13 CoreFoundation 0x1810db2f0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
14 CoreFoundation 0x1810951f4 __CFRunLoopRun + 2532
15 CoreFoundation 0x1810a86b8 CFRunLoopRunSpecific + 600
16 GraphicsServices 0x19d142374 GSEventRunModal + 164
17 UIKitCore 0x183a0de88 -[UIApplication _run] + 1100
18 UIKitCore 0x18378f5ec UIApplicationMain + 364
19 SwiftUI 0x188edf640 closure #1 in KitRendererCommon(_:) + 164
20 SwiftUI 0x188e0d524 runApp<A>(_:) + 252
21 SwiftUI 0x188dee810 static App.main() + 128
22 uEats 0x104f47f90 main + 32656 (ServerManager.swift:0)
23 dyld 0x105acdce4 start + 520
Thread 1 name: Dispatch queue: com.google.fira.worker
Thread 1:
0 libsystem_kernel.dylib 0x1b7e68bdc kevent_id + 8
1 libdispatch.dylib 0x180dac1fc _dispatch_kq_poll + 228
2 libdispatch.dylib 0x180dacf5c _dispatch_event_loop_end_ownership + 356
3 libdispatch.dylib 0x180d99044 _dispatch_sync_complete_recurse + 88
4 libdispatch.dylib 0x180d990d0 _dispatch_sync_invoke_and_complete_recurse + 88
5 libdispatch.dylib 0x180d98b44 _dispatch_sync_f_slow + 172
6 uEats 0x10502c4c0 -[GULMutableDictionary objectForKeyedSubscript:] + 967872 (GULMutableDictionary.m:84)
7 uEats 0x1055d503c -[APMRemoteConfig numberFromCacheWithKey:defaultValue:maxValue:minValue:block:] + 148
8 uEats 0x1055d5480 -[APMRemoteConfig intValueFromCacheWithKey:defaultValue:maxValue:minValue:] + 188
9 uEats 0x10556e680 APMNormalizedParametersForParametersAndEventName + 1864
10 uEats 0x1055699e0 -[APMEvent initWithOrigin:isPublic:name:timestamp:previousTimestamp:parameters:] + 424
11 uEats 0x105583f28 -[APMMeasurement logEventOnWorkerQueueWithOrigin:isPublicEvent:name:parameters:timestamp:enabled:ignoreEnabled:ignoreInterceptor:interceptor:addedScreenParameters:] + 240
12 uEats 0x105583d90 __151-[APMMeasurement logEventWithOrigin:isPublicEvent:name:parameters:timestamp:enabled:ignoreEnabled:ignoreInterceptor:interceptor:addedScreenParameters:]_block_invoke + 68
13 uEats 0x1055d5a80 __51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 44
14 libdispatch.dylib 0x180d87e68 _dispatch_call_block_and_release + 32
15 libdispatch.dylib 0x180d89a2c _dispatch_client_callout + 20
16 libdispatch.dylib 0x180d91124 _dispatch_lane_serial_drain + 668
17 libdispatch.dylib 0x180d91c80 _dispatch_lane_invoke + 392
18 libdispatch.dylib 0x180d9c500 _dispatch_workloop_worker_thread + 648
19 libsystem_pthread.dylib 0x1f0efa0bc _pthread_wqthread + 288
20 libsystem_pthread.dylib 0x1f0ef9e5c start_wqthread + 8
Thread 2:
0 libsystem_pthread.dylib 0x1f0ef9e54 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x1f0ef9e54 start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x1f0ef9e54 start_wqthread + 0
Thread 5 name: Dispatch queue: com.google.firebase.firestore.rpc
Thread 5:
0 libsystem_kernel.dylib 0x1b7e6bbe4 poll + 8
1 uEats 0x105264a7c pollset_work(grpc_pollset*, grpc_pollset_worker**, long long) + 3295868 (ev_poll_posix.cc:1026)
2 uEats 0x1052667f8 pollset_work(grpc_pollset*, grpc_pollset_worker**, long long) + 3303416 (ev_posix.cc:323)
3 uEats 0x1052b37f8 cq_next(grpc_completion_queue*, gpr_timespec, void*) + 3618808 (completion_queue.cc:0)
4 uEats 0x105089e1c grpc::CompletionQueue::AsyncNextInternal(void**, bool*, gpr_timespec) + 1351196 (completion_queue_cc.cc:147)
5 uEats 0x1053f36e8 firebase::firestore::remote::Datastore::PollGrpcQueue() + 4929256 (datastore.cc:141)
6 uEats 0x105423f34 firebase::firestore::util::Task::ExecuteAndRelease() + 5127988 (task.cc:107)
7 libdispatch.dylib 0x180d89a2c _dispatch_client_callout + 20
8 libdispatch.dylib 0x180d91124 _dispatch_lane_serial_drain + 668
9 libdispatch.dylib 0x180d91c80 _dispatch_lane_invoke + 392
10 libdispatch.dylib 0x180d9c500 _dispatch_workloop_worker_thread + 648
11 libsystem_pthread.dylib 0x1f0efa0bc _pthread_wqthread + 288
12 libsystem_pthread.dylib 0x1f0ef9e5c start_wqthread + 8
Thread 6:
0 libsystem_pthread.dylib 0x1f0ef9e54 start_wqthread + 0
Thread 7:
0 libsystem_pthread.dylib 0x1f0ef9e54 start_wqthread + 0
Thread 8:
0 libsystem_pthread.dylib 0x1f0ef9e54 start_wqthread + 0
Thread 9 name: com.apple.uikit.eventfetch-thread
Thread 9:
0 libsystem_kernel.dylib 0x1b7e684e0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1b7e68b24 mach_msg + 76
2 CoreFoundation 0x181090820 __CFRunLoopServiceMachPort + 372
3 CoreFoundation 0x181094cac __CFRunLoopRun + 1180
4 CoreFoundation 0x1810a86b8 CFRunLoopRunSpecific + 600
5 Foundation 0x18288f414 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236
6 Foundation 0x1828d0cac -[NSRunLoop(NSRunLoop) runUntilDate:] + 92
7 UIKitCore 0x183987fb0 -[UIEventFetcher threadMain] + 524
8 Foundation 0x1828df55c __NSThread__start__ + 808
9 libsystem_pthread.dylib 0x1f0efa9ac _pthread_start + 148
10 libsystem_pthread.dylib 0x1f0ef9e68 thread_start + 8
Thread 10:
0 libsystem_pthread.dylib 0x1f0ef9e54 start_wqthread + 0
Thread 11:
0 libsystem_kernel.dylib 0x1b7e68f64 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1f0f01298 _pthread_cond_wait + 1236
2 uEats 0x10525877c gpr_cv_wait + 3245948 (sync_posix.cc:143)
3 uEats 0x1052678d8 grpc_core::Executor::ThreadMain(void*) + 3307736 (executor.cc:238)
4 uEats 0x10525bf68 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::__invoke(void*) + 3260264 (thd_posix.cc:110)
5 libsystem_pthread.dylib 0x1f0efa9ac _pthread_start + 148
6 libsystem_pthread.dylib 0x1f0ef9e68 thread_start + 8
Thread 12:
0 libsystem_kernel.dylib 0x1b7e68f64 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1f0f01298 _pthread_cond_wait + 1236
2 uEats 0x10525877c gpr_cv_wait + 3245948 (sync_posix.cc:143)
3 uEats 0x1052678d8 grpc_core::Executor::ThreadMain(void*) + 3307736 (executor.cc:238)
4 uEats 0x10525bf68 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::__invoke(void*) + 3260264 (thd_posix.cc:110)
5 libsystem_pthread.dylib 0x1f0efa9ac _pthread_start + 148
6 libsystem_pthread.dylib 0x1f0ef9e68 thread_start + 8
Thread 13:
0 libsystem_kernel.dylib 0x1b7e68f64 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1f0f01298 _pthread_cond_wait + 1236
2 uEats 0x10525876c gpr_cv_wait + 3245932 (sync_posix.cc:0)
3 uEats 0x1052732ac timer_thread(void*) + 3355308 (timer_manager.cc:284)
4 uEats 0x10525bf68 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::__invoke(void*) + 3260264 (thd_posix.cc:110)
5 libsystem_pthread.dylib 0x1f0efa9ac _pthread_start + 148
6 libsystem_pthread.dylib 0x1f0ef9e68 thread_start + 8
Thread 14:
0 libsystem_kernel.dylib 0x1b7e68f64 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1f0f01298 _pthread_cond_wait + 1236
2 uEats 0x10525876c gpr_cv_wait + 3245932 (sync_posix.cc:0)
3 uEats 0x1052732ac timer_thread(void*) + 3355308 (timer_manager.cc:284)
4 uEats 0x10525bf68 grpc_core::(anonymous namespace)::ThreadInternalsPosix::ThreadInternalsPosix(char const*, void (*)(void*), void*, bool*, grpc_core::Thread::Options const&)::'lambda'(void*)::__invoke(void*) + 3260264 (thd_posix.cc:110)
5 libsystem_pthread.dylib 0x1f0efa9ac _pthread_start + 148
6 libsystem_pthread.dylib 0x1f0ef9e68 thread_start + 8
Thread 15 name: com.apple.NSURLConnectionLoader
Thread 15:
0 libsystem_kernel.dylib 0x1b7e684e0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1b7e68b24 mach_msg + 76
2 CoreFoundation 0x181090820 __CFRunLoopServiceMachPort + 372
3 CoreFoundation 0x181094cac __CFRunLoopRun + 1180
4 CoreFoundation 0x1810a86b8 CFRunLoopRunSpecific + 600
5 CFNetwork 0x181b1e4d8 0x1818a7000 + 2585816
6 Foundation 0x1828df55c __NSThread__start__ + 808
7 libsystem_pthread.dylib 0x1f0efa9ac _pthread_start + 148
8 libsystem_pthread.dylib 0x1f0ef9e68 thread_start + 8
Thread 16:
0 libsystem_kernel.dylib 0x1b7e684e0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1b7e68b24 mach_msg + 76
2 CoreFoundation 0x181090820 __CFRunLoopServiceMachPort + 372
3 CoreFoundation 0x181094cac __CFRunLoopRun + 1180
4 CoreFoundation 0x1810a86b8 CFRunLoopRunSpecific + 600
5 Foundation 0x18288f414 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 236
6 Foundation 0x18288fbd0 -[NSRunLoop(NSRunLoop) run] + 92
7 SwiftUI 0x188d5eda8 static DisplayLink.asyncThread(arg:) + 836
8 SwiftUI 0x188d5ca14 #objc static DisplayLink.asyncThread(arg:) + 100
9 Foundation 0x1828df55c __NSThread__start__ + 808
10 libsystem_pthread.dylib 0x1f0efa9ac _pthread_start + 148
11 libsystem_pthread.dylib 0x1f0ef9e68 thread_start + 8
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000001 x1: 0x0000000000000001 x2: 0x00000001db391b10 x3: 0x000000016aebca69
x4: 0x0000000000000067 x5: 0x000000000000006a x6: 0x0000000000000001 x7: 0x0000000199e946bc
x8: 0x0000000000000000 x9: 0xeff731fd1c940033 x10: 0x000000010d10d4a0 x11: 0x007ffffffffffff8
x12: 0x0000000000000005 x13: 0x0000000000005e74 x14: 0x0000000000000001 x15: 0x0000000000000005
x16: 0x00000001f0ef1a50 x17: 0x00000001db3a9cb8 x18: 0x0000000000000000 x19: 0x00000001db3a6e70
x20: 0x00000001058df758 x21: 0xbcc12b01f4e479e5 x22: 0x000000016aebca30 x23: 0x00000002835943c0
x24: 0x00000001db391b10 x25: 0x00000002835943c0 x26: 0x000000016aebca60 x27: 0x00000001da3319c8
x28: 0x000000016aebca40 fp: 0x000000016aebcb90 lr: 0x0000000104f8b4b8
sp: 0x000000016aebca20 pc: 0x0000000104f8bdec cpsr: 0x60000000
far: 0x000000010bf201b8 esr: 0xf2000001 (Breakpoint) brk 1
Binary Images:
0x104f40000 - 0x105827fff uEats arm64 <4fbe6abe088c32dd9f472d44c6eedf69> /private/var/containers/Bundle/Application/7C7686D2-1729-4FCA-8CFB-B5D3FC5540D3/uEats.app/uEats
0x180d86000 - 0x180dcbfff libdispatch.dylib arm64e <69dac9c7ddaf318eb068be596d142a2f> /usr/lib/system/libdispatch.dylib
0x181089000 - 0x1814defff CoreFoundation arm64e <d2716f2f688b3d51ba8b17e6553b209e> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x19d141000 - 0x19d149fff GraphicsServices arm64e <75a910dc87a43b3a8c0ea868b945f5d4> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1834fa000 - 0x184d94fff UIKitCore arm64e <e6e89bb5b5863725bf8f4c85dcd443bd> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x188c9f000 - 0x189d36fff SwiftUI arm64e <9bab2c1c95813bdcbc37fab1ad03dce0> /System/Library/Frameworks/SwiftUI.framework/SwiftUI
0x105ab4000 - 0x105b0bfff dyld arm64e <d16b72c0d6193e4892622c10a1d3066f> /usr/lib/dyld
0x1b7e67000 - 0x1b7e9cfff libsystem_kernel.dylib arm64e <c2fcc05874803c14b4790064a3f843e3> /usr/lib/system/libsystem_kernel.dylib
0x1f0ef9000 - 0x1f0f04fff libsystem_pthread.dylib arm64e <b48efcbed4f7308ba3fa172e0ea78e33> /usr/lib/system/libsystem_pthread.dylib
0x182877000 - 0x182b7ffff Foundation arm64e <feeef9b1b0e63561adfa3ef0302d23f8> /System/Library/Frameworks/Foundation.framework/Foundation
0x1818a7000 - 0x181d67fff CFNetwork arm64e <eae64611a84036fea69d5658f1bcf4d0> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
EOF
And here is the referenced function
func openOrClosed(restaurant: RestaurantModel) -> String {
//if force close bool value is on
if restaurant.forceClose {
return "Closed"
}
let hoursList = restaurant.hours
let now = Date()
let formatter = DateFormatter()
formatter.dateStyle = .full
formatter.timeStyle = .short
let datetime = formatter.string(from: now)
let dayOfTheWeek = (datetime.components(separatedBy: ","))[0] //grab current day of week
let currentTimeColen = (datetime.components(separatedBy: "at "))[1] //grab current time
//converts current time to 24 hr format
let dateAsString = currentTimeColen
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "h:mm a"
let date = dateFormatter.date(from: dateAsString)
dateFormatter.dateFormat = "HH:mm"
let Date24 = dateFormatter.string(from: date!) //line 200
print(Date24)
//replace : to . so value can be cast as a double
let decimal = Date24.replacingOccurrences(of: ":", with: ".")
let currentTime = Double(decimal)
//get array with starthour and closinghour of current day
guard let currentDayHours = hoursList[dayOfTheWeek] else {
return "error"
}
//get range value 1
guard let openHour = Double(currentDayHours[0]) else {
return "error"
}
//get range value 2
guard let closeHour = Double(currentDayHours[1]) else {
return "error"
}
//create range
let range = openHour...closeHour
var previousDayOfTheWeek:String = ""
var previousOpenHour:String = ""
var previousCloseHour:String = ""
var previousRange = 0.00...0.00
var lateTime = 0.00
var lateExists = false
//db will have p if restaurant closes after midnight
if currentDayHours.contains("p") {
previousDayOfTheWeek = currentDayHours[2] //get previous day
guard let previousDayHours = hoursList[previousDayOfTheWeek] else {
print(restaurant.name)
return restaurant.name
}
previousOpenHour = previousDayHours[0]//make double
previousCloseHour = previousDayHours[1]
previousRange = Double(previousOpenHour)!...Double(previousCloseHour)!
lateTime = 24.00 + currentTime!
if lateTime < Double(previousCloseHour)! {
lateExists = true
}
//eventually will get rid of p below
} else if Double(currentDayHours[0]) ?? 0.0 > 24.00 || Double(currentDayHours[1]) ?? 0.0 > 24.00 {
//let days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
}
if range.contains(currentTime!) && (closeHour-currentTime! <= 1.00) && lateExists==false{
return "Closing Soon"
} else if lateExists == true && previousRange.contains(lateTime) && (Double(previousCloseHour)! - Double(lateTime) <= 1.00){
return "Closing Soon"
} else if range.contains(currentTime!){
return "Open"
} else if lateExists == true && previousRange.contains(lateTime){
return "Open"
} else {
return "Closed"
}
}
I have a macOS app with a GUI which runs 24/7 and as of last week worked flawlessly. Three days ago I updated my Mac mini late 2012 to macOS Catalina. I started my app again and it worked. The next morning I encountered an EXC_BAD_ACCESS error which crashed the app (see below for more information). Restarted the app, error reappeared next morning and this morning, too.
Background: I don't expect hardware to have any influence since it was never any issue but still: I have a display attached, which through a connected power plug gets turned off at night and turned on again in the morning.
Here's the error:
CVDisplayLink (989): EXC_BAD_ACCESS (code=1, address=0x40)
In the log before the crash this message appears roughly 50 times, not sure if it has anything to do with the crash itself:
CVCGDisplayLink::setCurrentDisplay didn't find a valid display - falling back to 60Hz
and
Could not start the display link: -6661
I attached a screenshot with the threads in question and the last commands. I don't find any connection to my code... The app crashes always at the exact same location (I think).
Any help is highly appreciated! My next step is to leave the display on during the night and see if the error reappears. Even if no, that's no solution as I want the display to sleep during the night and other times...
Here's a crash report:
Process: FIPS [29505]
Path: /Applications/FIPS.app/Contents/MacOS/FIPS
Identifier: xxx.xxxxxxxx.FIPS
Version: 1.0 (1)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: FIPS [29505]
User ID: 502
Date/Time: 2020-03-29 23:28:13.101 +0200
OS Version: Mac OS X 10.15.4 (19E266)
Report Version: 12
Anonymous UUID: 571E7574-0586-B5D1-F56D-FDC0D2261660
Time Awake Since Boot: 86000 seconds
System Integrity Protection: enabled
Crashed Thread: 17 CVDisplayLink
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000040
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [29505]
VM Regions Near 0x40:
-->
__TEXT 000000010510d000-000000010517f000 [ 456K] r-x/r-x SM=COW /Applications/FIPS.app/Contents/MacOS/FIPS
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff6f55fdfa mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff6f560170 mach_msg + 60
2 com.apple.SkyLight 0x00007fff646fa418 SLSCopyManagedDisplayForSpace + 225
3 com.apple.AppKit 0x00007fff329ccc68 _NSDisplayUUIDForSpace + 42
4 com.apple.AppKit 0x00007fff33137f50 -[_NSFullScreenSpace screen] + 47
5 com.apple.AppKit 0x00007fff326a4b7e +[_NSFullScreenSpace visibleFullScreenSpaceOnScreen:] + 312
6 com.apple.AppKit 0x00007fff326a49fa -[NSScreen _menuBarHeight] + 76
7 com.apple.AppKit 0x00007fff326a4998 -[NSScreen _layoutFrame] + 71
8 com.apple.AppKit 0x00007fff326e314a -[NSScreen visibleFrame] + 44
9 com.apple.AppKit 0x00007fff326e23b6 -[NSWindow(NSWindowResizing) _resizableEdgesForGrowing:shrinking:] + 587
10 com.apple.AppKit 0x00007fff3287100b -[NSWindow(NSWindowResizing) _resizeDirectionForMouseLocation:] + 225
11 com.apple.AppKit 0x00007fff32870e86 -[NSWindow(NSWindowResizing) _edgeResizingCursorUpdate:atLocation:] + 227
12 com.apple.AppKit 0x00007fff32870a22 -[NSWindow(NSCursorRects) _setCursorForMouseLocation:] + 179
13 com.apple.AppKit 0x00007fff32781599 _NSWindowDisplayCycleUpdateStructuralRegions + 571
14 com.apple.AppKit 0x00007fff3277bcc4 __NSWindowGetDisplayCycleObserverForUpdateStructuralRegions_block_invoke + 420
15 com.apple.AppKit 0x00007fff32773e52 NSDisplayCycleObserverInvoke + 155
16 com.apple.AppKit 0x00007fff327739dc NSDisplayCycleFlush + 937
17 com.apple.QuartzCore 0x00007fff40f07454 CA::Transaction::run_commit_handlers(CATransactionPhase) + 106
18 com.apple.QuartzCore 0x00007fff40f06166 CA::Transaction::commit() + 230
19 com.apple.AppKit 0x00007fff3282fa01 __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 266
20 com.apple.AppKit 0x00007fff32f4e950 ___NSRunLoopObserverCreateWithHandler_block_invoke + 41
21 com.apple.CoreFoundation 0x00007fff3542402c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
22 com.apple.CoreFoundation 0x00007fff35423f5c __CFRunLoopDoObservers + 457
23 com.apple.CoreFoundation 0x00007fff354234f4 __CFRunLoopRun + 884
24 com.apple.CoreFoundation 0x00007fff35422b23 CFRunLoopRunSpecific + 466
25 com.apple.HIToolbox 0x00007fff34044abd RunCurrentEventLoopInMode + 292
26 com.apple.HIToolbox 0x00007fff340447d5 ReceiveNextEventCommon + 584
27 com.apple.HIToolbox 0x00007fff34044579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
28 com.apple.AppKit 0x00007fff3268fc99 _DPSNextEvent + 883
29 com.apple.AppKit 0x00007fff3268e4e0 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
30 com.apple.AppKit 0x00007fff326801ee -[NSApplication run] + 658
31 com.apple.AppKit 0x00007fff32651ff6 NSApplicationMain + 777
32 xxx.xxxxxxx.FIPS 0x000000010510fb49 main + 9 (AppDelegate.swift:12)
33 libdyld.dylib 0x00007fff6f41ecc9 start + 1
Thread 1:: JavaScriptCore bmalloc scavenger
0 libsystem_kernel.dylib 0x00007fff6f562882 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff6f627425 _pthread_cond_wait + 698
2 libc++.1.dylib 0x00007fff6c6fa623 std::__1::condition_variable::__do_timed_wait(std::__1::unique_lock<std::__1::mutex>&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 93
3 com.apple.JavaScriptCore 0x00007fff39c42a75 bmalloc::Scavenger::threadRunLoop() + 741
4 com.apple.JavaScriptCore 0x00007fff39c42489 bmalloc::Scavenger::threadEntryPoint(bmalloc::Scavenger*) + 9
5 com.apple.JavaScriptCore 0x00007fff39c44b67 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(bmalloc::Scavenger*), bmalloc::Scavenger*> >(void*) + 39
6 libsystem_pthread.dylib 0x00007fff6f627109 _pthread_start + 148
7 libsystem_pthread.dylib 0x00007fff6f622b8b thread_start + 15
Thread 2:: com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x00007fff6f55fdfa mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff6f560170 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff35424bf7 __CFRunLoopServiceMachPort + 247
3 com.apple.CoreFoundation 0x00007fff354236b1 __CFRunLoopRun + 1329
4 com.apple.CoreFoundation 0x00007fff35422b23 CFRunLoopRunSpecific + 466
5 com.apple.CFNetwork 0x00007fff33c5009a 0x7fff33c06000 + 303258
6 com.apple.Foundation 0x00007fff37ad1882 __NSThread__start__ + 1064
7 libsystem_pthread.dylib 0x00007fff6f627109 _pthread_start + 148
8 libsystem_pthread.dylib 0x00007fff6f622b8b thread_start + 15
Thread 3:: com.apple.NSEventThread
0 libsystem_kernel.dylib 0x00007fff6f55fdfa mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff6f560170 mach_msg + 60
2 com.apple.SkyLight 0x00007fff645a58d7 CGSSnarfAndDispatchDatagrams + 237
3 com.apple.SkyLight 0x00007fff647d55a5 SLSGetNextEventRecordInternal + 83
4 com.apple.SkyLight 0x00007fff64673fbe SLEventCreateNextEvent + 136
5 com.apple.HIToolbox 0x00007fff34051da6 PullEventsFromWindowServerOnConnection(unsigned int, unsigned char, __CFMachPortBoost*) + 268
6 com.apple.HIToolbox 0x00007fff34051c72 MessageHandler(__CFMachPort*, void*, long, void*) + 48
7 com.apple.CoreFoundation 0x00007fff35453983 __CFMachPortPerform + 250
8 com.apple.CoreFoundation 0x00007fff35425003 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
9 com.apple.CoreFoundation 0x00007fff35424f52 __CFRunLoopDoSource1 + 541
10 com.apple.CoreFoundation 0x00007fff35423a6c __CFRunLoopRun + 2284
11 com.apple.CoreFoundation 0x00007fff35422b23 CFRunLoopRunSpecific + 466
12 com.apple.AppKit 0x00007fff328315b4 _NSEventThread + 132
13 libsystem_pthread.dylib 0x00007fff6f627109 _pthread_start + 148
14 libsystem_pthread.dylib 0x00007fff6f622b8b thread_start + 15
Thread 4:: com.apple.coreanimation.render-server
0 libsystem_kernel.dylib 0x00007fff6f55fdfa mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff6f560170 mach_msg + 60
2 com.apple.QuartzCore 0x00007fff40f4f1c2 CA::Render::Server::server_thread(void*) + 496
3 com.apple.QuartzCore 0x00007fff40f4efc3 thread_fun(void*) + 25
4 libsystem_pthread.dylib 0x00007fff6f627109 _pthread_start + 148
5 libsystem_pthread.dylib 0x00007fff6f622b8b thread_start + 15
Thread 5:: com.apple.coreaudio.AQClient
0 libsystem_kernel.dylib 0x00007fff6f55fdfa mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff6f560170 mach_msg + 60
2 com.apple.CoreFoundation 0x00007fff35424bf7 __CFRunLoopServiceMachPort + 247
3 com.apple.CoreFoundation 0x00007fff354236b1 __CFRunLoopRun + 1329
4 com.apple.CoreFoundation 0x00007fff35422b23 CFRunLoopRunSpecific + 466
5 com.apple.audio.toolbox.AudioToolbox 0x00007fff337a44cc GenericRunLoopThread::Entry(void*) + 166
6 libAudioToolboxUtility.dylib 0x00007fff6bda96c9 CAPThread::Entry(CAPThread*) + 77
7 libsystem_pthread.dylib 0x00007fff6f627109 _pthread_start + 148
8 libsystem_pthread.dylib 0x00007fff6f622b8b thread_start + 15
Thread 6:
0 libsystem_kernel.dylib 0x00007fff6f55fe36 semaphore_wait_trap + 10
1 com.apple.audio.caulk 0x00007fff68f6ab16 caulk::mach::semaphore::wait() + 16
2 com.apple.audio.caulk 0x00007fff68f6a9b2 caulk::semaphore::timed_wait(double) + 106
3 com.apple.audio.caulk 0x00007fff68f6a7c4 caulk::concurrent::details::worker_thread::run() + 30
4 com.apple.audio.caulk 0x00007fff68f6a1e4 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*> > >(void*) + 45
5 libsystem_pthread.dylib 0x00007fff6f627109 _pthread_start + 148
6 libsystem_pthread.dylib 0x00007fff6f622b8b thread_start + 15
Thread 7:: AMCP Logging Spool
0 libsystem_kernel.dylib 0x00007fff6f55fe36 semaphore_wait_trap + 10
1 com.apple.audio.caulk 0x00007fff68f6ab16 caulk::mach::semaphore::wait() + 16
2 com.apple.audio.caulk 0x00007fff68f6a9b2 caulk::semaphore::timed_wait(double) + 106
3 com.apple.audio.caulk 0x00007fff68f6a7c4 caulk::concurrent::details::worker_thread::run() + 30
4 com.apple.audio.caulk 0x00007fff68f6a1e4 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*> > >(void*) + 45
5 libsystem_pthread.dylib 0x00007fff6f627109 _pthread_start + 148
6 libsystem_pthread.dylib 0x00007fff6f622b8b thread_start + 15
Thread 8:
0 libsystem_pthread.dylib 0x00007fff6f622b68 start_wqthread + 0
Thread 9:
0 libsystem_pthread.dylib 0x00007fff6f622b68 start_wqthread + 0
Thread 10:
0 libsystem_pthread.dylib 0x00007fff6f622b68 start_wqthread + 0
Thread 11:
0 libsystem_pthread.dylib 0x00007fff6f622b68 start_wqthread + 0
Thread 12:
0 libsystem_pthread.dylib 0x00007fff6f622b68 start_wqthread + 0
Thread 13:
0 libsystem_pthread.dylib 0x00007fff6f622b68 start_wqthread + 0
Thread 14:
0 libsystem_pthread.dylib 0x00007fff6f622b68 start_wqthread + 0
Thread 15:: CVDisplayLink
0 libsystem_kernel.dylib 0x00007fff6f562882 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff6f627457 _pthread_cond_wait + 748
2 com.apple.CoreVideo 0x00007fff373d7d2b CVDisplayLink::waitUntil(unsigned long long) + 229
3 com.apple.CoreVideo 0x00007fff373d7238 CVDisplayLink::runIOThread() + 482
4 libsystem_pthread.dylib 0x00007fff6f627109 _pthread_start + 148
5 libsystem_pthread.dylib 0x00007fff6f622b8b thread_start + 15
Thread 16:: CVDisplayLink
0 libsystem_kernel.dylib 0x00007fff6f562882 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fff6f627457 _pthread_cond_wait + 748
2 com.apple.CoreVideo 0x00007fff373d7d2b CVDisplayLink::waitUntil(unsigned long long) + 229
3 com.apple.CoreVideo 0x00007fff373d7238 CVDisplayLink::runIOThread() + 482
4 libsystem_pthread.dylib 0x00007fff6f627109 _pthread_start + 148
5 libsystem_pthread.dylib 0x00007fff6f622b8b thread_start + 15
Thread 17 Crashed:: CVDisplayLink
0 com.apple.CoreVideo 0x00007fff373d76ab CVCGDisplayLink::getDisplayTimes(unsigned long long*, unsigned long long*, unsigned long long*) + 65
1 com.apple.CoreVideo 0x00007fff373d7525 CVHWTime::update(double, bool*, bool*) + 57
2 com.apple.CoreVideo 0x00007fff373d73de CVXTime::update() + 44
3 com.apple.CoreVideo 0x00007fff373d711c CVDisplayLink::runIOThread() + 198
4 libsystem_pthread.dylib 0x00007fff6f627109 _pthread_start + 148
5 libsystem_pthread.dylib 0x00007fff6f622b8b thread_start + 15
Thread 17 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000600001d56c38 rcx: 0x00007000060c8da8 rdx: 0x00007000060c8db0
rdi: 0x00007f9e1d18fe20 rsi: 0x00007000060c8db8 rbp: 0x00007000060c8d90 rsp: 0x00007000060c8d60
r8: 0x000000000009ad1d r9: 0x00007f9e1d18fe50 r10: 0x00007f9e1d18fe58 r11: 0x0000000000000206
r12: 0x00007000060c8db8 r13: 0x0000000000000000 r14: 0x00007000060c8e07 r15: 0x00007000060c8db0
rip: 0x00007fff373d76ab rfl: 0x0000000000010246 cr2: 0x0000000000000000
Logical CPU: 0
Error Code: 0x00000000
Trap Number: 0
Followed by a million lines of Binary Images followed by this:
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 54
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 16801343
thread_create: 0
thread_set_state: 967
VM Region Summary:
ReadOnly portion of Libraries: Total=778.7M resident=0K(0%) swapped_out_or_unallocated=778.7M(100%)
Writable regions: Total=758.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=758.5M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 1024K 8
Activity Tracing 256K 1
CG backing stores 440K 2
CG image 52K 9
CoreAnimation 2940K 146
CoreData Object IDs 4100K 2
CoreGraphics 8K 1
CoreImage 12K 3
CoreUI image data 392K 7
Foundation 956K 5
IOKit 7940K 1
Image IO 8188K 32
Kernel Alloc Once 8K 1
MALLOC 593.3M 211
MALLOC guard page 48K 11
MALLOC_NANO (reserved) 128.0M 1 reserved VM address space (unallocated)
Memory Tag 242 12K 1
Memory Tag 251 16K 1
SQLite page cache 64K 1
STACK GUARD 56.1M 18
Stack 17.1M 18
VM_ALLOCATE 412K 28
WebKit Malloc 8604K 18
__DATA 55.1M 502
__DATA_CONST 637K 21
__FONT_DATA 4K 1
__GLSLBUILTINS 5176K 1
__LINKEDIT 392.2M 17
__OBJC_RO 32.2M 1
__OBJC_RW 1892K 2
__TEXT 386.5M 487
__UNICODE 564K 1
libnetwork 1664K 24
mapped file 378.0M 74
shared memory 668K 18
=========== ======= =======
TOTAL 2.0G 1675
TOTAL, minus reserved VM space 1.9G 1675
After adding a symbolic breakpoint to "getDisplayTimes" with bt and restarting the app the code immediately stops to show this situation:
Log:
* thread #17, name = 'CVDisplayLink', stop reason = breakpoint 1.1
* frame #0: 0x00007fff3910a66a CoreVideo`CVCGDisplayLink::getDisplayTimes(unsigned long long*, unsigned long long*, unsigned long long*)
frame #1: 0x00007fff3910a525 CoreVideo`CVHWTime::update(double, bool*, bool*) + 57
frame #2: 0x00007fff3910a3de CoreVideo`CVXTime::update() + 44
frame #3: 0x00007fff3910a11c CoreVideo`CVDisplayLink::runIOThread() + 198
frame #4: 0x0000000101047c65 libsystem_pthread.dylib`_pthread_start + 148
frame #5: 0x00000001010434af libsystem_pthread.dylib`thread_start + 15
and this:
I haven’t received any answer from Apple (it’s been months!) so I went ahead and downgraded (which I did not want to do) to Mojave. I haven’t had a single hic up or problem since. I am bewildered.
This strange crash happens only running on Devices, while in simulator works normally.
Debugging line by line, i noticed that it occurs while i append a String Value to an Array of Doubles. To do that i convert the double using an extension:
extension String {
func toDouble() -> Double? {
return NSNumberFormatter().numberFromString(self)?.doubleValue
}
}
So the crashing line is:
litros.append(temp_litros.toDouble()!) //litros is my array and temp_litros my string
the error:
fatal error: unexpectedly found nil while unwrapping an Optional value
I really don't understand why it works in simulator and it doesn't on devices.
Anyone have an ideia what could be happening here? Thanks in advance!
Crash Report:
Incident Identifier: 49F378A2-E7D9-4985-B208-99F529AE8813
CrashReporter Key: fe58b29412047d4d8980b9cb66ae017f1c2db7d5
Hardware Model: iPhone7,2
Process: Nuvem [9479]
Path: /private/var/mobile/Containers/Bundle/Application/8989627A-4064-428C-888B-C09F00A3EA0B/Nuvem.app/Nuvem
Identifier: br.com.gimenez.Nuvem
Version: 1 (1.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2015-07-23 18:07:12.529 -0300
Launch Time: 2015-07-23 18:07:05.037 -0300
OS Version: iOS 8.4 (12H143)
Report Version: 105
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000100659474
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libswiftCore.dylib 0x0000000100659474 0x100598000 + 791668
1 Nuvem 0x00000001000b5110 Nuvem.GraficoViewController.viewDidLoad (Nuvem.GraficoViewController)() -> () (GraficoViewController.swift:69)
2 Nuvem 0x00000001000b5410 #objc Nuvem.GraficoViewController.viewDidLoad (Nuvem.GraficoViewController)() -> () (GraficoViewController.swift:0)
3 UIKit 0x0000000188d14c14 -[UIViewController loadViewIfRequired] + 688
4 UIKit 0x0000000188d14924 -[UIViewController view] + 28
5 UIKit 0x0000000188eb71ec -[UINavigationController _startCustomTransition:] + 708
6 UIKit 0x0000000188dc9e80 -[UINavigationController _startDeferredTransitionIfNeeded:] + 464
7 UIKit 0x0000000188dc9c4c -[UINavigationController __viewWillLayoutSubviews] + 52
8 UIKit 0x0000000188dc9bcc -[UILayoutContainerView layoutSubviews] + 196
9 UIKit 0x0000000188d116f0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 576
10 QuartzCore 0x000000018864ddb4 -[CALayer layoutSublayers] + 148
11 QuartzCore 0x000000018864881c CA::Layer::layout_if_needed(CA::Transaction*) + 316
12 QuartzCore 0x00000001886486c0 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 28
13 QuartzCore 0x0000000188647e54 CA::Context::commit_transaction(CA::Transaction*) + 272
14 QuartzCore 0x0000000188647bd4 CA::Transaction::commit() + 524
15 QuartzCore 0x00000001886412fc CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 76
16 CoreFoundation 0x00000001842542a0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 28
17 CoreFoundation 0x000000018425122c __CFRunLoopDoObservers + 356
18 CoreFoundation 0x000000018425160c __CFRunLoopRun + 832
19 CoreFoundation 0x000000018417d2d0 CFRunLoopRunSpecific + 392
20 GraphicsServices 0x000000018dbd36f8 GSEventRunModal + 164
21 UIKit 0x0000000188d7af3c UIApplicationMain + 1484
22 Nuvem 0x00000001000ad9b8 main (AppDelegate.swift:14)
23 libdyld.dylib 0x0000000196612a04 start + 0
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x0000000196710c24 kevent64 + 8
1 libdispatch.dylib 0x00000001965f5e6c _dispatch_mgr_invoke + 272
2 libdispatch.dylib 0x00000001965e7998 _dispatch_mgr_thread + 48
Thread 2:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 3:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 4:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 5:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 6 name: com.apple.NSURLConnectionLoader
Thread 6:
0 libsystem_kernel.dylib 0x0000000196710e0c mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000196710c84 mach_msg + 68
2 CoreFoundation 0x0000000184253720 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x0000000184251674 __CFRunLoopRun + 936
4 CoreFoundation 0x000000018417d2d0 CFRunLoopRunSpecific + 392
5 CFNetwork 0x0000000183c5a590 +[NSURLConnection(Loader) _resourceLoadLoop:] + 436
6 Foundation 0x000000018519ddb4 __NSThread__main__ + 1068
7 libsystem_pthread.dylib 0x00000001967c7dc4 _pthread_body + 160
8 libsystem_pthread.dylib 0x00000001967c7d20 _pthread_start + 156
9 libsystem_pthread.dylib 0x00000001967c4ef4 thread_start + 0
Thread 7 name: com.apple.CFSocket.private
Thread 7:
0 libsystem_kernel.dylib 0x000000019672b498 __select + 8
1 CoreFoundation 0x0000000184259124 __CFSocketManager + 668
2 libsystem_pthread.dylib 0x00000001967c7dc4 _pthread_body + 160
3 libsystem_pthread.dylib 0x00000001967c7d20 _pthread_start + 156
4 libsystem_pthread.dylib 0x00000001967c4ef4 thread_start + 0
Thread 8:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 9:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 10:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 11:
0 libsystem_kernel.dylib 0x000000019672bc78 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x00000001967c52d8 _pthread_wqthread + 988
2 libsystem_pthread.dylib 0x00000001967c4eec start_wqthread + 0
Thread 12:
0 libsystem_kernel.dylib 0x0000000196710e0c mach_msg_trap + 8
1 libsystem_kernel.dylib 0x0000000196710c84 mach_msg + 68
2 CoreFoundation 0x0000000184253720 __CFRunLoopServiceMachPort + 196
3 CoreFoundation 0x0000000184251674 __CFRunLoopRun + 936
4 CoreFoundation 0x000000018417d2d0 CFRunLoopRunSpecific + 392
5 Foundation 0x00000001850b54c4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 312
6 Foundation 0x000000018510f80c -[NSRunLoop(NSRunLoop) run] + 92
7 Nuvem 0x00000001000e64f8 +[PBAFURLConnectionOperation networkRequestThreadEntryPoint:] (PBAFURLConnectionOperation.m:151)
8 Foundation 0x000000018519ddb4 __NSThread__main__ + 1068
9 libsystem_pthread.dylib 0x00000001967c7dc4 _pthread_body + 160
10 libsystem_pthread.dylib 0x00000001967c7d20 _pthread_start + 156
11 libsystem_pthread.dylib 0x00000001967c4ef4 thread_start + 0
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000100588b80 x1: 0x00000001742f6a00 x2: 0x0000000000000008 x3: 0x0000000196765a74
x4: 0x000000016fd80e38 x5: 0x0000000000000020 x6: 0x0000000000000000 x7: 0x0000000000000fa0
x8: 0x00000001742f6b80 x9: 0x0000000000000000 x10: 0x0000000100584800 x11: 0x00000000005d0bda
x12: 0x00000000fffffff2 x13: 0x00000001887c5480 x14: 0x0000000000000053 x15: 0x000000000000004d
x16: 0x00000001967bda50 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x0000000144d85300
x20: 0x00000001978b7720 x21: 0x0000000000000008 x22: 0x0000000000000008 x23: 0x0000000000000000
x24: 0x0000000000000006 x25: 0x000000000004ffff x26: 0x0000000144e161d0 x27: 0x000000016fd810e9
x28: 0x0000000144d85300 fp: 0x000000016fd80ed0 lr: 0x0000000100659474
sp: 0x000000016fd80ec0 pc: 0x0000000100659474 cpsr: 0x60000000
By default NSNumberFormatter converts data according to current locale settings. In case of simulator it uses US locale and "." as decimal separator. In case of your device it uses "," as separator so it can't convert your data and numberFromString returns nil.
Try this:
extension String {
func toDouble() -> Double? {
let formatter = NSNumberFormatter()
formatter.locale = NSLocale(localeIdentifier: "en_US")
return formatter.numberFromString(self)?.doubleValue
}
}
I'm using Crittercism (SDK 3.5.1) crash reporting service to catch reports on my iOS app.
i've been getting this error many times and i've no idea why it's happening.
Name: SIGSEGV - Reason: Main
Here is the full report from Crittercism:
Threads
_________________________________
Thread: Unknown Name (Crashed)
0 libobjc.A.dylib 0x39917526 objc_retain + 6
1 UIKit 0x33a92ab3 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 159
2 UIKit 0x33b078ef -[UIViewAnimationState animationDidStop:finished:] + 51
3 QuartzCore 0x3383cc01 _ZN2CA5Layer23run_animation_callbacksEPv + 209
4 libdispatch.dylib 0x39d314b7 _dispatch_client_callout + 23
5 libdispatch.dylib 0x39d32dcb _dispatch_main_queue_callback_4CF$VARIANT$up + 227
6 CoreFoundation 0x31c48f3b __CFRunLoopRun + 1291
7 CoreFoundation 0x31bbbebd CFRunLoopRunSpecific + 357
8 CoreFoundation 0x31bbbd49 CFRunLoopRunInMode + 105
9 GraphicsServices 0x3577f2eb GSEventRunModal + 75
10 UIKit 0x33ad1301 UIApplicationMain + 1121
11 MyAppName 0x0002e29b main (main.m:17)
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e08648 kevent64 + 24
1 libdispatch.dylib 0x39d33df8 _dispatch_mgr_thread$VARIANT$up + 36
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e07eb4 mach_msg_trap + 20
1 CoreFoundation 0x31c4a045 __CFRunLoopServiceMachPort + 129
2 CoreFoundation 0x31c48da3 __CFRunLoopRun + 883
3 CoreFoundation 0x31bbbebd CFRunLoopRunSpecific + 357
4 CoreFoundation 0x31bbbd49 CFRunLoopRunInMode + 105
5 WebCore 0x37bba505 _ZL12RunWebThreadPv + 445
6 libsystem_c.dylib 0x39d71311 _pthread_start + 309
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e07eb4 mach_msg_trap + 20
1 CoreFoundation 0x31c4a045 __CFRunLoopServiceMachPort + 129
2 CoreFoundation 0x31c48da3 __CFRunLoopRun + 883
3 CoreFoundation 0x31bbbebd CFRunLoopRunSpecific + 357
4 CoreFoundation 0x31bbbd49 CFRunLoopRunInMode + 105
5 Foundation 0x325083d5 +[NSURLConnection(Loader) _resourceLoadLoop:] + 309
6 Foundation 0x3258be85 __NSThread__main__ + 973
7 libsystem_c.dylib 0x39d71311 _pthread_start + 309
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e07eb4 mach_msg_trap + 20
1 CoreFoundation 0x31c4a045 __CFRunLoopServiceMachPort + 129
2 CoreFoundation 0x31c48da3 __CFRunLoopRun + 883
3 CoreFoundation 0x31bbbebd CFRunLoopRunSpecific + 357
4 CoreFoundation 0x31bbbd49 CFRunLoopRunInMode + 105
5 Foundation 0x324def97 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 255
6 Foundation 0x32582865 -[NSRunLoop(NSRunLoop) run] + 81
7 MyAppName 0x001000c1 +[AFURLConnectionOperation networkRequestThreadEntryPoint:] (AFURLConnectionOperation.m:182)
8 Foundation 0x3258be85 __NSThread__main__ + 973
9 libsystem_c.dylib 0x39d71311 _pthread_start + 309
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e18594 select$DARWIN_EXTSN + 20
1 libsystem_c.dylib 0x39d71311 _pthread_start + 309
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e18d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x39d66a16 _pthread_wqthread + 366
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e18d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x39d66a16 _pthread_wqthread + 366
Thread: Unknown Name
0 libsystem_kernel.dylib 0x39e18d98 __workq_kernreturn + 8
1 libsystem_c.dylib 0x39d66a16 _pthread_wqthread + 366
Crashed Registers
_________________________________
r12 0xb9e49
r10 0x0
r11 0x10
cpsr 0x30
r4 0x1fb79160
r5 0x1f4158
r6 0x33efe80f
r7 0x2fdd9e84
r0 0x1fb16050
r1 0x80000000
r2 0x2
r3 0x790ca8e9
sp 0x2fdd9e78
r8 0x1
r9 0xa25701
pc 0x39917526
lr 0xb9095
First guess would be that a delegate you've set with something like:
[UIView setAnimationDelegate:self];
has been freed before the animation has finished.
I am having a big problem figuring out where my app crash is being caused, and I'm not sure how to interpret the crash report.
The crash clearly occurs in Thread 0, but at what step might it actually be crashing in? I certainly am not manipulating CALayers in my code at all. In anyone experience, does this happen for any particular reason?
Incident Identifier: 23D06670-4C44-49F4-A0CB-01CF95D558D2
CrashReporter Key: 1d7775167d5336b2369c148ce37405638a6abe74
Hardware Model: iPhone3,1
Process: CrazyTimes [3169]
Path: /var/mobile/Applications/41DF0A05-710D-48BB-A468-73B7B224F5A3/CrazyTimes.app/CrazyTimes
Identifier: CrazyTimes
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-02-09 18:22:36.422 -0500
OS Version: iPhone OS 5.0 (9A334)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00600ad0
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x383a7fca objc_msgSend + 30
1 CrazyTimes 0x00114460 0x1000 + 1127520
2 CrazyTimes 0x000c2f10 0x1000 + 794384
3 UIKit 0x331b0f72 -[UIView(CALayerDelegate) drawLayer:inContext:] + 270
4 QuartzCore 0x328c0e16 -[CALayer drawInContext:] + 110
5 QuartzCore 0x328c0418 CABackingStoreUpdate_ + 1776
6 QuartzCore 0x328bfc16 CA::Layer::display_() + 966
7 QuartzCore 0x328bf832 CA::Layer::display() + 122
8 QuartzCore 0x328bf774 CA::Layer::display_if_needed(CA::Transaction*) + 168
9 QuartzCore 0x328bf11c CA::Context::commit_transaction(CA::Transaction*) + 228
10 QuartzCore 0x328bee50 CA::Transaction::commit() + 308
11 QuartzCore 0x328b6d7e CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 50
12 CoreFoundation 0x311dcb44 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 12
13 CoreFoundation 0x311dad80 __CFRunLoopDoObservers + 252
14 CoreFoundation 0x311db0da __CFRunLoopRun + 754
15 CoreFoundation 0x3115e4d6 CFRunLoopRunSpecific + 294
16 CoreFoundation 0x3115e39e CFRunLoopRunInMode + 98
17 GraphicsServices 0x33d8cfe6 GSEventRunModal + 150
18 UIKit 0x331d073c UIApplicationMain + 1084
19 CrazyTimes 0x00004084 0x1000 + 12420
20 CrazyTimes 0x00003af8 0x1000 + 11000
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x324dd3b4 kevent + 24
1 libdispatch.dylib 0x32c31e78 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x32c31b96 _dispatch_mgr_thread + 30
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x324dd010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x324dd206 mach_msg + 50
2 CoreFoundation 0x311dc41c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x311db154 __CFRunLoopRun + 876
4 CoreFoundation 0x3115e4d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x3115e39e CFRunLoopRunInMode + 98
6 WebCore 0x379f2128 _ZL12RunWebThreadPv + 396
7 libsystem_c.dylib 0x369a5c16 _pthread_start + 314
8 libsystem_c.dylib 0x369a5ad0 thread_start + 0
Thread 3:
0 libsystem_kernel.dylib 0x324edcd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x369a030a _pthread_wqthread + 610
2 libsystem_c.dylib 0x369a009c start_wqthread + 0
Thread 4 name: com.apple.NSURLConnectionLoader
Thread 4:
0 libsystem_kernel.dylib 0x324dd010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x324dd206 mach_msg + 50
2 CoreFoundation 0x311dc41c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x311db154 __CFRunLoopRun + 876
4 CoreFoundation 0x3115e4d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x3115e39e CFRunLoopRunInMode + 98
6 Foundation 0x3821abc2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 302
7 Foundation 0x3821aa8a -[NSThread main] + 66
8 Foundation 0x382ae59a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x369a5c16 _pthread_start + 314
10 libsystem_c.dylib 0x369a5ad0 thread_start + 0
Thread 5 name: com.apple.CFSocket.private
Thread 5:
0 libsystem_kernel.dylib 0x324ed570 __select + 20
1 CoreFoundation 0x311e066a __CFSocketManager + 726
2 libsystem_c.dylib 0x369a5c16 _pthread_start + 314
3 libsystem_c.dylib 0x369a5ad0 thread_start + 0
Thread 6:
0 libsystem_kernel.dylib 0x324edcd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x369a030a _pthread_wqthread + 610
2 libsystem_c.dylib 0x369a009c start_wqthread + 0
Thread 7 name: WebCore: CFNetwork Loader
Thread 7:
0 libsystem_kernel.dylib 0x324dd010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x324dd206 mach_msg + 50
2 CoreFoundation 0x311dc41c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x311db154 __CFRunLoopRun + 876
4 CoreFoundation 0x3115e4d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x3115e39e CFRunLoopRunInMode + 98
6 WebCore 0x37a1b69e _ZN7WebCoreL15runLoaderThreadEPv + 122
7 libsystem_c.dylib 0x369a5c16 _pthread_start + 314
8 libsystem_c.dylib 0x369a5ad0 thread_start + 0
Thread 8 name: WebCore: LocalStorage
Thread 8:
0 libsystem_kernel.dylib 0x324ed068 __psynch_cvwait + 24
1 libsystem_c.dylib 0x369a5f2e _pthread_cond_wait + 634
2 libsystem_c.dylib 0x369a5caa pthread_cond_wait + 34
3 JavaScriptCore 0x3768940e WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 54
4 WebCore 0x37b51494 WTF::PassOwnPtr<WebCore::LocalStorageTask> WTF::MessageQueue<WebCore::LocalStorageTask>::waitForMessageFilteredWithTimeout<bool ()(WebCore::LocalStorageTask*)>(WTF::MessageQueueWaitResult&, bool (&)(WebCore::LocalStorageTask*), double) + 52
5 WebCore 0x37b5144a WebCore::LocalStorageThread::threadEntryPointCallback(void*) + 106
6 libsystem_c.dylib 0x369a5c16 _pthread_start + 314
7 libsystem_c.dylib 0x369a5ad0 thread_start + 0
Thread 9:
0 libsystem_kernel.dylib 0x324dd010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x324dd206 mach_msg + 50
2 CoreFoundation 0x311dc41c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x311db154 __CFRunLoopRun + 876
4 CoreFoundation 0x3115e4d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x311db474 CFRunLoopRun + 92
6 CrazyTimes 0x00039ee4 0x1000 + 233188
7 Foundation 0x3821aa8a -[NSThread main] + 66
8 Foundation 0x382ae59a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x369a5c16 _pthread_start + 314
10 libsystem_c.dylib 0x369a5ad0 thread_start + 0
Thread 10 name: com.apple.coremedia.player.async
Thread 10:
0 libsystem_kernel.dylib 0x324ed068 __psynch_cvwait + 24
1 libsystem_c.dylib 0x369a5f2e _pthread_cond_wait + 634
2 libsystem_c.dylib 0x369a5caa pthread_cond_wait + 34
3 CoreMedia 0x3255d000 FigSemaphoreWaitRelative + 212
4 MediaToolbox 0x3261afca fpa_AsyncMovieControlThread + 18
5 CoreMedia 0x3257cbc6 figThreadMain + 146
6 libsystem_c.dylib 0x369a5c16 _pthread_start + 314
7 libsystem_c.dylib 0x369a5ad0 thread_start + 0
Thread 11:
0 libsystem_kernel.dylib 0x324edcd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x369a030a _pthread_wqthread + 610
2 libsystem_c.dylib 0x369a009c start_wqthread + 0
Thread 0 crashed with ARM Thread State:
r0: 0x09b99000 r1: 0x345621e3 r2: 0x0019e7dc r3: 0x0019e910
r4: 0x0019e800 r5: 0x09b99000 r6: 0x00199f3c r7: 0x2fdfdb00
r8: 0x00196f94 r9: 0x00118870 r10: 0x00196bdc r11: 0x0019789c
ip: 0x0019e8f4 sp: 0x2fdfdae0 lr: 0x00114467 pc: 0x383a7fca
cpsr: 0x20080030
UIViews are implemented with CALayers, so if you are using UIKit, you are using layers. My guess is that an already released object is receiving messages. Maybe you released an object more times than you should. Try recompiling with NSZombieEnabled.
3 UIKit 0x331b0f72 -[UIView(CALayerDelegate) drawLayer:inContext:] + 270
By any chance, did you release an objectA which is a delegate to objectB without removing the delegate assignment first, i.e. objectB.delegate = nil; [objectA release];?