kconner / KMCGeigerCounter

A framerate meter that clicks like a Geiger counter when your animation drops a frame
MIT License
2.25k stars 273 forks source link

inXcode7 and ios9 appCrash #11

Closed NagiYan closed 8 years ago

NagiYan commented 9 years ago

this is how i use:

_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[[[UIApplication sharedApplication] delegate] setWindow:_window];

// main view controller
homeViewController = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateInitialViewController];
[homeViewController setDelegate:self];

UINavigationController* navView = [[DirectionUINavigationController alloc] initWithRootViewController:homeViewController];

[_window setRootViewController:navView];
[_window makeKeyAndVisible];

#ifndef APP_STORE_RELEASE
    [KMCGeigerCounter sharedGeigerCounter].enabled = YES;
#endif

error info: *\ Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3505.16/UIApplication.m:3294

remove KMCGeigerCounter app ok.

kconner commented 8 years ago

I've prepared a few changes toward supporting iOS 9, but the SKView technique I'm using has bad side effects that I haven't solved. I can still detect when CPU activity delays the application event loop, but I can no longer detect when long drawing times cause frames to skip out of process. Until I figure that out, crashing completely is better than giving false readings.

For the moment, the geiger counter will only work in iOS 7 and 8. Sorry about this!

champo commented 8 years ago

@kconner this is really hard to find when migrating from Xcode 6 to 7. I've just spent quite a bit a of time figuring it out. Disabling the feature and logging an error seems way more reasonable to me.

sauchye commented 8 years ago

Run Xcode 7 Crash

KMCGeigerCounter[19143:610019]

 *** Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], 

/BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3505.16/UIApplication.m:3294
cxw commented 8 years ago

why can the skview force the cadisplaylink to match the drawing time

kconner commented 8 years ago

Please see #15 for more information about this.