WebView Crash by java.io.IOException: close failed: EIO (I/O



我有一个崩溃日志上传的用户在Android 4.0/4.1,但我不能复制它。日志是这样的:

java.io.IOException: close failed: EIO (I/O error)
libcore.io.IoUtils.close(IoUtils.java:41)
java.io.FileInputStream.close(FileInputStream.java:121)
android.webkit.JWebCoreJavaBridge.nativeServiceFuncPtrQueue(Native Method)
android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:113)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:137)
android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:949)
java.lang.Thread.run(Thread.java:856)
cause by:
libcore.io.ErrnoException: close failed: EIO (I/O error)
libcore.io.Posix.close(Native Method)
libcore.io.BlockGuardOs.close(BlockGuardOs.java:75)
libcore.io.IoUtils.close(IoUtils.java:38)
java.io.FileInputStream.close(FileInputStream.java:121)
android.webkit.JWebCoreJavaBridge.nativeServiceFuncPtrQueue(Native Method)
android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:113)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:137)
android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:949)
java.lang.Thread.run(Thread.java:856)

有人知道这是怎么发生的吗?或者怎么解?

这是由于只读文件造成的。

我认为这是由于EIO来自您的文件中的bad_file_flush似乎当内核访问文件失败时,它将打开文件描述转换为使用bad_inode_ops作为其文件操作的伪打开文件。对于基于fat的文件系统,我找不到这样做的代码,但也许有一些通用代码。

由于FileChannel缓存数据,我认为您需要在close() the FileChannel

之前调用force()

有关更多信息,请访问此链接Link1

bad_inode.cbad_file_flush发生EIO。

内核在访问索引节点时出现了问题。

原因可能是安装/卸载SD卡或存储介质,在手机上连接USB。

尝试在close()之前调用force()

最新更新