cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8431) File Transfer tests crash on Android Lolipop
Date Fri, 16 Oct 2015 09:12:05 GMT

    [ https://issues.apache.org/jira/browse/CB-8431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14960404#comment-14960404
] 

ASF GitHub Bot commented on CB-8431:
------------------------------------

Github user daserge commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-file-transfer/pull/79#discussion_r42222724
  
    --- Diff: src/android/FileTransfer.java ---
    @@ -977,7 +977,11 @@ public void run() {
                             context.sendPluginResult(new PluginResult(PluginResult.Status.ERROR,
error));
                             context.aborted = true;
                             if (context.connection != null) {
    -                            context.connection.disconnect();
    +                            try{
    +                                   context.connection.disconnect();
    +                            } catch (Exception e) {                              
    +                                   Log.e(LOG_TAG, "Catch workaround for fatal exception",
e);
    --- End diff --
    
    @virix, could you please also prefix the error message with `"CB-8431"` to simplify a
potential debugging?


> File Transfer tests crash on Android Lolipop
> --------------------------------------------
>
>                 Key: CB-8431
>                 URL: https://issues.apache.org/jira/browse/CB-8431
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File Transfer
>    Affects Versions: 4.0.0
>            Reporter: Ian Clelland
>            Assignee: Andrew Grieve
>
> Mobile Spec crashes during File Transfer tests, with a NullPointerException thrown inside
of OkHTTP.
> This is very similar to CB-6378, except that all operations here appear to be happening
on the same thread.
> The stack trace I've seen is:
> {code}
> E/AndroidRuntime(16078): FATAL EXCEPTION: pool-1-thread-3
> E/AndroidRuntime(16078): Process: org.apache.mobilespec, PID: 16078
> E/AndroidRuntime(16078): java.lang.NullPointerException: Attempt to read from field 'int
com.android.okio.Segment.limit' on a null object reference
> E/AndroidRuntime(16078): 	at com.android.okio.OkBuffer.write(OkBuffer.java:574)
> E/AndroidRuntime(16078): 	at com.android.okio.OkBuffer.read(OkBuffer.java:610)
> E/AndroidRuntime(16078): 	at com.android.okio.RealBufferedSource.read(RealBufferedSource.java:53)
> E/AndroidRuntime(16078): 	at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.read(HttpConnection.java:442)
> E/AndroidRuntime(16078): 	at com.android.okhttp.internal.Util.skipAll(Util.java:227)
> E/AndroidRuntime(16078): 	at com.android.okhttp.internal.http.HttpConnection.discard(HttpConnection.java:212)
> E/AndroidRuntime(16078): 	at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.close(HttpConnection.java:464)
> E/AndroidRuntime(16078): 	at com.android.okhttp.internal.Util.closeQuietly(Util.java:97)
> E/AndroidRuntime(16078): 	at com.android.okhttp.internal.http.HttpEngine.close(HttpEngine.java:433)
> E/AndroidRuntime(16078): 	at com.android.okhttp.internal.http.HttpURLConnectionImpl.disconnect(HttpURLConnectionImpl.java:113)
> E/AndroidRuntime(16078): 	at org.apache.cordova.filetransfer.FileTransfer$5.run(FileTransfer.java:950)
> E/AndroidRuntime(16078): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
> E/AndroidRuntime(16078): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
> E/AndroidRuntime(16078): 	at java.lang.Thread.run(Thread.java:818)
> E/FileTransfer(16078): {"code":3,"source":"http:\/\/cordova.apache.org\/downloads\/logos_2.zip","target":"file:\/\/\/data\/data\/org.apache.mobilespec\/files\/files\/testFile.txt","http_status":200,"exception":"Attempt
to read from field 'int com.android.okio.Segment.limit' on a null object reference"}
> E/FileTransfer(16078): java.lang.NullPointerException: Attempt to read from field 'int
com.android.okio.Segment.limit' on a null object reference
> E/FileTransfer(16078): 	at com.android.okio.OkBuffer.write(OkBuffer.java:574)
> E/FileTransfer(16078): 	at com.android.okio.OkBuffer.read(OkBuffer.java:610)
> E/FileTransfer(16078): 	at com.android.okio.RealBufferedSource.read(RealBufferedSource.java:53)
> E/FileTransfer(16078): 	at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.read(HttpConnection.java:442)
> E/FileTransfer(16078): 	at com.android.okhttp.internal.Util.skipAll(Util.java:227)
> E/FileTransfer(16078): 	at com.android.okhttp.internal.http.HttpConnection.discard(HttpConnection.java:212)
> E/FileTransfer(16078): 	at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.close(HttpConnection.java:464)
> E/FileTransfer(16078): 	at com.android.okio.RealBufferedSource.close(RealBufferedSource.java:198)
> E/FileTransfer(16078): 	at com.android.okio.RealBufferedSource$1.close(RealBufferedSource.java:181)
> E/FileTransfer(16078): 	at java.io.FilterInputStream.close(FilterInputStream.java:64)
> E/FileTransfer(16078): 	at org.apache.cordova.filetransfer.FileTransfer.safeClose(FileTransfer.java:516)
> E/FileTransfer(16078): 	at org.apache.cordova.filetransfer.FileTransfer.access$300(FileTransfer.java:69)
> E/FileTransfer(16078): 	at org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:843)
> E/FileTransfer(16078): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
> E/FileTransfer(16078): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
> E/FileTransfer(16078): 	at java.lang.Thread.run(Thread.java:818)
> W/ActivityManager(  404):   Force finishing activity org.apache.mobilespec/.MainActivity
> D/CordovaActivity(16078): Paused the activity.
> D/XWalkCordovaWebView(16078): Handle the pause
> D/mali_winsys(  947): new_window_surface returns 0x3000
> E/FileTransfer(16078): {"code":1,"source":"http:\/\/cordova.apache.org\/downloads\/BlueZedEx.mp3","target":"file:\/\/\/data\/data\/org.apache.mobilespec\/files\/files\/testFile.txt","body":"<!DOCTYPE
HTML PUBLIC \"-\/\/IETF\/\/DTD HTML 2.0\/\/EN\">\n<html><head>\n<title>400
Bad Request<\/title>\n<\/head><body>\n<h1>Bad Request<\/h1>\n<p>Your
browser sent a request that this server could not understand.<br \/>\n<\/p>\n<hr>\n<address>Apache\/2.4.12
(Unix) OpenSSL\/1.0.1l Server at www.apache.org Port 80<\/address>\n<\/body><\/html>","http_status":400,"exception":"http:\/\/cordova.apache.org\/downloads\/BlueZedEx.mp3"}
> E/FileTransfer(16078): java.io.FileNotFoundException: http://cordova.apache.org/downloads/BlueZedEx.mp3
> E/FileTransfer(16078): 	at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:197)
> E/FileTransfer(16078): 	at org.apache.cordova.filetransfer.FileTransfer.getInputStream(FileTransfer.java:527)
> E/FileTransfer(16078): 	at org.apache.cordova.filetransfer.FileTransfer.access$400(FileTransfer.java:69)
> E/FileTransfer(16078): 	at org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:814)
> E/FileTransfer(16078): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
> E/FileTransfer(16078): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
> E/FileTransfer(16078): 	at java.lang.Thread.run(Thread.java:818)
> E/chromium(16078): [ERROR:unix_domain_client_socket_posix.cc(101)] Not implemented reached
in virtual int net::UnixDomainClientSocket::GetPeerAddress(net::IPEndPoint*) const
> E/chromium(16078): [ERROR:unix_domain_client_socket_posix.cc(101)] Not implemented reached
in virtual int net::UnixDomainClientSocket::GetPeerAddress(net::IPEndPoint*) const
> D/CordovaActivity(16078): CordovaActivity.onDestroy()
> W/ScreenOrientationListener(16078): Removing an inexistent observer!
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message