2011-06-11 15:19:17.167 ***[930:707] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [160 nan]' *** Call stack at first throw: ( 0 CoreFoundation 0x3365d64f __exceptionPreprocess + 114 1 libobjc.A.dylib 0x33aa0c5d objc_exception_throw + 24 2 CoreFoundation 0x3365d491 +[NSException raise:format:arguments:] + 68 3 CoreFoundation 0x3365d4cb +[NSException raise:format:] + 34 4 QuartzCore 0x361db61d _ZL18CALayerSetPositionP7CALayerRKN2CA4Vec2IdEEb + 140 5 QuartzCore 0x361db58b -[CALayer setPosition:] + 38 6 QuartzCore 0x361db4d7 -[CALayer setFrame:] + 390 7 UIKit 0x330eb455 -[UIView(Geometry) setFrame:] + 188 8 UIKit 0x3314854f -[UITableViewCell setFrame:] + 98 9 UIKit 0x33147b3b -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 850 10 UIKit 0x3314776b -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 34 11 UIKit 0x331400cd -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 936 12 UIKit 0x3313f27d -[UITableView layoutSubviews] + 140 13 UIKit 0x330eb5fb -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 26 14 CoreFoundation 0x335caf03 -[NSObject(NSObject) performSelector:withObject:] + 22 15 QuartzCore 0x361dcbb5 -[CALayer layoutSublayers] + 120 16 QuartzCore 0x361dc96d CALayerLayoutIfNeeded + 184 17 QuartzCore 0x361e21c5 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 212 18 QuartzCore 0x361e1fd7 _ZN2CA11Transaction6commitEv + 190 19 QuartzCore 0x361db055 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 56 20 CoreFoundation 0x33634a35 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 16 21 CoreFoundation 0x33636465 __CFRunLoopDoObservers + 412 22 CoreFoundation 0x3363775b __CFRunLoopRun + 854 23 CoreFoundation 0x335c7ec3 CFRunLoopRunSpecific + 230 24 CoreFoundation 0x335c7dcb CFRunLoopRunInMode + 58 25 GraphicsServices 0x3413041f GSEventRunModal + 114 26 GraphicsServices 0x341304cb GSEventRun + 62 27 UIKit 0x33114d69 -[UIApplication _run] + 404 28 UIKit 0x33112807 UIApplicationMain + 670 29 PXiPhone 0x000028df main + 70 30 PXiPhone 0x00002894 start + 40 ) terminate called after throwing an instance of 'NSException
某天,加完一个功能,在iPhone4上报以上异常,然后crash掉,iPhone3上没事。百思不得其解,于是google之。看了一篇stackoverflow.com 的文章,说是某些地方代码除以0了,多见于自定义的UITableView自定义UITableViewCell高度的地方,如:tableView:heightForHeaderInSection:
或tableView:heightForFooterInSection:。
这两个delegate方法都没有地方需要除的。在仔细看一下文章,说多见于适用sizeWithFont方法计算UILabel宽高的地方。恍然大悟,小弟有一个地方使用了UILabel来显示文本,需要用到sizeWithFont方法计算宽高的,在NSString为nil的时候,sizeWithFont会除以0了。
原文:http://blog.csdn.net/hanspy/article/details/6538156
PS:在使用sizeWithFont计算UItabelView中label中字的长度时,由于表视图的cell是复用的,所以在计算label中的NSString的长度时,NSString可能为nil,此时可能会除以0,便会报错。
相关推荐
2.Assertion failure and Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No view controller managing visible view. detail in ...
Terminating app due to uncaught exception 'NSInternalInconsistencyException' ///继续看下去如: reason: 'UITableView dataSource returned a nil cell for row at index path:... ... ///找到这段英文中出现...
除了大多数访问器的无法识别的选择器之外,以下是常见的例外情况: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSOrderedSet intersectsSet:]: set argument is...
PMON (ospid: nnnn): terminating the instance due to error 481 可能原因 根据Oracle官方文档,错误481可能是由于以下几种原因引起的: 1. Link local IP (169.254.x.x) is being used by other adapter/...
Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController () should have a non-nil sourceView or barButtonItem set before the presentation occurs.' ...
侧边栏iOS 14 这是一个示例...已知错误以紧凑模式启动应用程序,然后将其更改为常规模式会导致以下错误: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unexpected vie
fix crash ---- Terminating app due to uncaught exception NSInvalidArgumentException , reason: [AVCaptureMetadataOutput setMetadataObjectTypes:] unsupported type found. Use ...
在IT领域,尤其是CAD/CAM软件用户中,遇到“运行UG提示Fatal error detected unable to continue”的问题时,往往会感到困扰。这一错误信息通常出现在尝试启动Unigraphics(简称UG,现称为NX)软件时,意味着系统...
下面把searchDisplayController 引起的数组越界处理办法给大家分享如下...Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0
2012-11-28 13:22:08.911 PropMemFun [2132:11303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CFString respondsToSelector:]: message sent to deallocated ...
如果尝试添加不同纹理的精灵,则会触发错误“SpriteBatch [13879:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'CCSprite is not using the same texture id'...
Terminating app_main thread with osThreadExit() to avoid endless loop. Updated RTX configuration (CMSIS 5.8.0). Updated template based files (MDK-Middleware 7.13.0). Configured MDK projects to use Arm...
Updated Pack to STM32Cube_FW_F4 Firmware Package version V1.25.1 using HAL Drivers V1.7.9. ...Terminating app_main thread with osThreadExit() to avoid endless loop Updated MS Windows UBS driver files.
Version: 1.3.0 (2020-06-24) Keil.STM32MP1xx_DFP.1.3.0.pack Added additional devices for STM32MP157 sub family. ...Terminating app_main thread with osThreadExit() to avoid endless loop
Terminating app_main thread with osThreadExit() to avoid endless loop. USB Device examples: Added Event Recorder in USB Device examples (for STM32L073Z-EVAL board). Updated with user code templates ...
App::terminating(function () { Bugsnag::flush(); }); ``` ### 8. 使用 Bugsnag 控制台 一旦你的 Laravel 应用与 Bugsnag 集成完毕,你可以在 Bugsnag 控制台查看到错误报告。这里,你可以过滤、排序和分析错误...
Version: 1.2.0 (2020-08-03) Keil.STM32G4xx_DFP.1.2.0.pack Added devices: STM32G491xxxx, STM32G4A1xxxx and STM32G483xx series. ...Terminating app_main thread with osThreadExit() to avoid endless loop
The main reason for making a virtual function inline is to place its definition in the class, either for convenience or to document its behavior, e.g., for accessors and mutators. The -inl.h Files...
Terminating app_main thread with osThreadExit() to avoid endless loop. CMSIS-Driver: All: corrected compiler warnings if GNU extensions is enabled in C/C++ settings for ARM Compiler 5. CAN: Corrected...
Version: 2.15.0 (2020-09-28) Keil.STM32F4xx_DFP.2.15.0.pack Download Updated Pack to STM32Cube...Terminating app_main thread with osThreadExit() to avoid endless loop Updated MS Windows UBS driver files.