【发布时间】:2013-10-08 14:46:56
【问题描述】:
我目前正在构建一个使用 krpano 查看器的应用程序,这是一个使用 JavaScript 构建的全景查看器。我正在将这个全景查看器加载到 UIWebView 中,其中包含保存在 iPad 上的本地图像。
但在使用全景查看器一段时间后,我收到此错误并且应用程序崩溃:
Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[WebCoreSharedBufferData getBytes:range:]: range {0, 4000} exceeds data length 0'
*** First throw call stack:
(0x2e213f53 0x38a226af 0x2e213e95 0x2eb4dc31 0x2e16ca65 0x2ef4ce47 0x2ef4cd21 0x2ef68f03 0x2ef682db 0x2ef68029 0x2ef67e61 0x2ef67dcf 0x2ef6bd39 0x2ef6b813 0x2ef5471f 0x2e29b2ed 0x30635c6d 0x30635117 0x30621069 0x30620bad 0x3061d949 0x3061c051 0x38f0c297 0x38f0c09b 0x38f0cd15 0x38f0cf8d 0x39047dbf 0x39047c84)
libc++abi.dylib: terminating with uncaught exception of type NSException
有人知道为什么会这样吗?当我在 UIWebView 中加载在线页面时没有问题。
感谢您的帮助!
【问题讨论】:
-
有趣的是,这只发生在设备上,而不是模拟器上。与此错误相同:
: ImageIO: JPEG Not a JPEG file: started with 0x00 0x00 -
@chritaso 是您提出这个问题的吗?
-
@hoya21 请看我对 Ortwin Gentz 回答的评论。
标签: ios iphone cocoa-touch uiwebview uikit