uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN: [nan 0; 600 300]'

原因

我遇到的是,存在出数为0的情况时,所得结果为NaN。

解决方法

添加判断,处理错误

if(isnan(ecg)){      //isnan为系统函数,判断结果是否为NaN
    //特殊处理
    ecg = 0.0;
}else{
    //正常情况,不做处理
}

版权声明:本文为博主原创文章,未经博主允许不得转载。

uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN: [nan 0; 600 300]'

时间: 2024-10-10 12:42:10

uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN: [nan 0; 600 300]'的相关文章

Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [160 nan]解决方法

1 2014-06-11 15:19:17.167 ***[930:707] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [160 nan]' 2 *** Call stack at first throw: 3 ( 4 0 CoreFoundation 0x3365d64f __exceptionPreprocess

小胖说事35-----Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer posi

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 __exce

小胖说事35-----Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer posi

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 __exce

Terminating app due to uncaught exception 'NSRangeException', reason: -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'

首页 > iOS问答 > 详情 *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array' *** First throw call stack: (0x1f9b012 0x1a90e7e 0x1f3d0b4 0x6baaf 0x1aa46b0 0x1c1bb

iOS Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to

刚接触iOS,依照教程操作执行出现错误 Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard 解

threadid=1: thread exiting with uncaught exception (group=0x417cce00)问题

今天拷贝一个开源项目到本项目中,出现: threadid=1: thread exiting with uncaught exception (group=0x417cce00)问题,原因是Manfest.xml中activity的Theme与Appliacation的Theme冲突,将activity设置android:theme="@android:style/Theme.Holo.Light"问题得到解决.

php错误:Uncaught exception com_exception with message Failed to create COM object

本文为大家讲解的是php错误:Uncaught exception com_exception with message Failed to create COM object,感兴趣的同学参考下. 错误: Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `InternetExplorer.Application': 拒绝访问 在PHP中调用IE使用如下代码: br

IOS Exception 1(libc++abi.dylib: terminating with uncaught exception of type NSException)

2014-08-05 22:18:46.455 SwiftUI[1329:40871] -[_TtC7SwiftUI14MViewControler clickMe]: unrecognized selector sent to instance 0x10ea15dc0 2014-08-05 22:18:46.458 SwiftUI[1329:40871] *** Terminating app due to uncaught exception 'NSInvalidArgumentExcept

11-18 19:59:38.310: W/dalvikvm(690): threadid=1: thread exiting with uncaught exception (group=0x41d9cc50)

今天代码出现了W/dalvikvm(690): threadid=1: thread exiting with uncaught exception (group=0x41d9cc50)这个问题,后来检查发现是xml文件里控件的名字大小写搞错了,总结以下以免再犯: 1.可能跟findViewById()方法的强制类型转换有关,例如(TextView) findViewById(R.id.button)强制类型转换时把不同类型的控件相互转化,如R.id.button是button的id但是用Tex