libgoogleanalyticsservices google app objective-c ios7 google-analytics crashlytics google-analytics-sdk

objective c - google - GAIUncaughtExceptionHandler solo bloquea iOS 7



libgoogleanalyticsservices a (1)

Intentando aplastar uno de nuestros informes de fallas más persistentes. Sospechoso porque es exclusivamente iOS 7. *, no está claro cuál es el desencadenante, y este es un porcentaje relativamente pequeño de nuestros usuarios que se enfrentan al problema. Se siente como una condición de carrera o un error específico de iOS 7. * con Google Analytics SDK. Mis interacciones con el SDK son directas:

+ (void)trackEvent:(NSString *)category action:(NSString *)action label:(NSString *)label value:(NSNumber *)value { // May return nil if a tracker has not already been initialized with a // property ID. id tracker = [[GAI sharedInstance] defaultTracker]; [tracker send:[[GAIDictionaryBuilder createEventWithCategory:category action:action label:label value:value] build]]; } + (void)trackScreenView:(NSString *)screenName { // https://developers.google.com/analytics/devguides/collection/ios/v3/screens // May return nil if a tracker has not already been initialized with a // property ID. id tracker = [[GAI sharedInstance] defaultTracker]; // This screen name value will remain set on the tracker and sent with // hits until it is set to a new value or to nil. [tracker set:kGAIScreenName value:screenName]; // Previous V3 SDK versions // [tracker send:[[GAIDictionaryBuilder createAppView] build]]; // New SDK versions [self visuallyLogTrackingDetails:tracker dictionaryBuilder:[GAIDictionaryBuilder createScreenView]]; }

También hay casos en los que paso más datos a la llamada (además del nombre de pantalla), por ejemplo:

+ (void)trackGenderedScreenView:(MyAppGender)gender { id tracker = [[GAI sharedInstance] defaultTracker]; [tracker set:kGAIScreenName value:MyAppAnalyticsGenderedScreenName]; GAIDictionaryBuilder *dictionaryBuilder = [GAIDictionaryBuilder createScreenView]; [dictionaryBuilder set:[MyAppUtil getGenderedString:gender] forKey:[GAIFields customDimensionForIndex:ASPAnalyticsDimensionGender]]; [self visuallyLogTrackingDetails:tracker dictionaryBuilder:dictionaryBuilder]; }

Versión SDK : Google Analytics Services iOS 3.10

Impacto : limitado a iOS 7. *.

Rastreo de pila de muestra

Thread : Crashed: com.apple.main-thread 0 libsystem_kernel.dylib 0x000000019333258c __pthread_kill + 8 1 libsystem_pthread.dylib 0x00000001933b516c pthread_kill + 104 2 libsystem_c.dylib 0x00000001932c6808 abort + 112 3 libc++abi.dylib 0x00000001924ec994 __cxa_bad_cast 4 libc++abi.dylib 0x0000000192509c2c default_unexpected_handler() 5 libobjc.A.dylib 0x0000000192c444d4 _objc_terminate() + 128 6 libc++abi.dylib 0x0000000192507168 std::__terminate(void (*)()) + 16 7 libc++abi.dylib 0x0000000192506a80 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) 8 libobjc.A.dylib 0x0000000192c44318 _objc_exception_destructor(void*) 9 CoreFoundation 0x000000018673e890 -[NSException initWithCoder:] 10 Foundation 0x00000001872286a8 -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 236 11 Foundation 0x00000001872281ac -[NSISEngine optimize] + 188 12 Foundation 0x000000018722384c -[NSISEngine withBehaviors:performModifications:] + 232 13 UIKit 0x0000000189827488 -[UIWindow(UIConstraintBasedLayout) updateConstraintsIfNeeded] + 228 14 UIKit 0x000000018978ac78 -[UIWindow(UIConstraintBasedLayout) layoutSublayersOfLayer:] + 92 15 QuartzCore 0x00000001892f4258 -[CALayer layoutSublayers] + 184 16 QuartzCore 0x00000001892eee20 CA::Layer::layout_if_needed(CA::Transaction*) + 300 17 QuartzCore 0x00000001892eecd8 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32 18 QuartzCore 0x00000001892ee560 CA::Context::commit_transaction(CA::Transaction*) + 280 19 QuartzCore 0x00000001892ee304 CA::Transaction::commit() + 424 20 QuartzCore 0x00000001892e7c38 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 80 21 CoreFoundation 0x00000001866ff0a8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 22 CoreFoundation 0x00000001866fc330 __CFRunLoopDoObservers + 372 23 CoreFoundation 0x00000001866fc6bc __CFRunLoopRun + 764 24 CoreFoundation 0x000000018663d6d0 CFRunLoopRunSpecific + 452 25 MyApp 0x000000010051ff84 GAIUncaughtExceptionHandler 26 CoreFoundation 0x000000018673ece8 __handleUncaughtException + 644 27 libobjc.A.dylib 0x0000000192c444c8 _objc_terminate() + 116 28 libc++abi.dylib 0x0000000192507168 std::__terminate(void (*)()) + 16 29 libc++abi.dylib 0x00000001925071d8 std::terminate() + 64 30 libobjc.A.dylib 0x0000000192c4442c _destroyAltHandlerList 31 libdispatch.dylib 0x000000019321bfe8 _dispatch_client_callout + 36 32 libdispatch.dylib 0x000000019321f1dc _dispatch_main_queue_callback_4CF + 336 33 CoreFoundation 0x00000001866fe62c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 34 CoreFoundation 0x00000001866fc96c __CFRunLoopRun + 1452 35 CoreFoundation 0x000000018663d6d0 CFRunLoopRunSpecific + 452 36 GraphicsServices 0x000000018c321c0c GSEventRunModal + 168 37 UIKit 0x000000018976efdc UIApplicationMain + 1156 38 MyApp 0x0000000100156a48 main (main.m:14) 39 libdyld.dylib 0x0000000193237aa0 start + 4


Al leer el informe de bloqueo, me he dado cuenta de que hay un problema con las restricciones de diseño. También me he enfrentado a problemas similares en iOS 7 debido a restricciones de diseño. El problema podría ser el uso de restricciones proporcionales de diseño automático de ancho / alto, ya que no funcionan correctamente en iOS 7.