Note that there are some explanatory texts on larger screens.

plurals
  1. POopen failed: EBUSY (Device or resource busy)
    text
    copied!<p>I have a strange error in my App.</p> <p>In my app it is possible to download a zipFile, read the content as what it is and also delete it. Its doesn't matter what exactly it is. </p> <p>Problem: Only on the Motorola Xoom (version 4.0.4) I can download the file, unzip it, I can read the data and I can delete everything. But if I try to Download the file again and while it unzip the file and copy the files to SD-Card it crashes with the error EBUSY (Device or resource busy).</p> <ol> <li>Why is it working only the first time?</li> <li>What means that error? </li> <li>Why i get this error only on the Xoom?</li> </ol> <p>I can't find any solution for that. On all other devices it works fine, no errors or problems. </p> <p>LogCat:</p> <pre><code>07-18 12:27:46.774: E/PrepareMagTask(10057): IOException 07-18 12:27:46.774: E/PrepareMagTask(10057): java.io.FileNotFoundException: /mnt/sdcard/Android/data/com.xxxxxx.android/files/content/23760/emag.db: open failed: EBUSY (Device or resource busy) 07-18 12:27:46.774: E/PrepareMagTask(10057): at libcore.io.IoBridge.open(IoBridge.java:406) 07-18 12:27:46.774: E/PrepareMagTask(10057): at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:88) 07-18 12:27:46.774: E/PrepareMagTask(10057): at java.io.FileOutputStream.&lt;init&gt;(FileOutputStream.java:73) 07-18 12:27:46.774: E/PrepareMagTask(10057): at com.xxxxx.android.util.io.ZipHelper.uncompressEntry(ZipHelper.java:35) 07-18 12:27:46.774: E/PrepareMagTask(10057): at com.xxxxx.android.task.PrepareMagTask.doInBackground(PrepareMagTask.java:271) 07-18 12:27:46.774: E/PrepareMagTask(10057): at com.xxxxx.android.task.PrepareMagTask.doInBackground(PrepareMagTask.java:1) 07-18 12:27:46.774: E/PrepareMagTask(10057): at android.os.AsyncTask$2.call(AsyncTask.java:264) 07-18 12:27:46.774: E/PrepareMagTask(10057): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) 07-18 12:27:46.774: E/PrepareMagTask(10057): at java.util.concurrent.FutureTask.run(FutureTask.java:137) 07-18 12:27:46.774: E/PrepareMagTask(10057): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) 07-18 12:27:46.774: E/PrepareMagTask(10057): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) 07-18 12:27:46.774: E/PrepareMagTask(10057): at java.lang.Thread.run(Thread.java:856) 07-18 12:27:46.774: E/PrepareMagTask(10057): Caused by: libcore.io.ErrnoException: open failed: EBUSY (Device or resource busy) 07-18 12:27:46.774: E/PrepareMagTask(10057): at libcore.io.Posix.open(Native Method) 07-18 12:27:46.774: E/PrepareMagTask(10057): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110) 07-18 12:27:46.774: E/PrepareMagTask(10057): at libcore.io.IoBridge.open(IoBridge.java:390) 07-18 12:27:46.774: E/PrepareMagTask(10057): ... 11 more </code></pre> <p>It crashes at line 35 in my ZipHelper class:</p> <pre><code>FileHelper.copy(zipFile.getInputStream(entry), new FileOutputStream(outputFile), modify); </code></pre> <p>getInputStream(entry) ... and I really dont know why? </p> <p>Is there a method to wait for the device or recourse, when it is busy? This is happened every time I try to unzip the file, the app tries it 5 time (Downloading -> Unzip) and it crashes every time. </p> <p>EDIT: We found out, its not only the Xoom. We also have the error with the Asus Transformer with the version 4.0.4</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload