Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebView Crash by java.io.IOException: close failed: EIO (I/O error) libcore.io.IoUtils.close(IoUtils.java:41)

Tags:

i've got a crash log upload by users on Android 4.0/4.1,but i cant reproduce it.the log is like this:

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)

does anyone know how it happen?or how to solve it?

like image 666
River Avatar asked Jul 17 '14 04:07

River


1 Answers

This is happen due to the read only file.

I think this is due to the EIO comes from bad_file_flush in your file. It seems when the kernel has any failure accessing an file, it transforms the open file description to a pseudo-open-file of with bad_inode_ops as its file ops. I can't find the code that does this for FAT-based file systems, but perhaps there's some generic code.

Since the FileChannel cache data I think you need to call force() before you close() the FileChannel

For more information go through this links Link1

like image 199
Maheshwar Ligade Avatar answered Sep 29 '22 13:09

Maheshwar Ligade