dropbox / dropbox/dropbox-sdk-java
DbxDownloader.close() throws java.lang.IllegalStateException: Unbalanced enter/exit
- Langage dominant
- Java
- Étoiles
- 627
- Forks
- 463
- Merge moyen
- 5 min
- PR mergées (30 j)
- 10
Description
Hi, I'm trying to cancel a download. My way to cancel is this.
```
public void cancelDownload(){
if (m_dbxDownloader != null) {
dbxDownloader.close();
dbxDownloader = null;
}
}
```
When I call dbxDownloader.close(); is thworing an exception. The exception is this
```
2019-02-22 09:53:14.576 26079-26412/com.toshiba.dse.ebridge.acme.lite E/ExceptionHandler: java.lang.IllegalStateException: Unbalanced enter/exit
at com.android.okhttp.okio.AsyncTimeout.enter(AsyncTimeout.java:62)
at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:209)
at com.android.okhttp.okio.RealBufferedSource.read(RealBufferedSource.java:60)
at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.read(HttpConnection.java:466)
at com.android.okhttp.internal.Util.skipAll(Util.java:164)
at com.android.okhttp.internal.Util.discard(Util.java:146)
at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.close(HttpConnection.java:483)
at com.android.okhttp.okio.RealBufferedSource.close(RealBufferedSource.java:421)
at com.android.okhttp.okio.RealBufferedSource$1.close(RealBufferedSource.java:409)
at com.dropbox.core.util.IOUtil.closeQuietly(IOUtil.java:149)
at com.dropbox.core.DbxDownloader.close(DbxDownloader.java:131)
```
Is this a problem with SDK?
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par DbxDownloader.close() dans DbxDownloader.java:131 et reproduisez la séquence cancelDownload du rapport. Suivez les frames IOUtil.closeQuietly et Android OkHttp source-close pour déterminer pourquoi l’annulation provoque « Unbalanced enter/exit ». Le travail est terminé lorsque la fermeture d’un downloader actif ne lève plus cette exception et que la séquence d’annulation est couverte par des tests.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- android, java
- Domaine
- api
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 30/100