cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10554) Media Capture: Null reference in low memory conditions
Date Tue, 10 May 2016 22:58:13 GMT

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

ASF subversion and git services commented on CB-10554:
------------------------------------------------------

Commit b2e29fc88c548d5aadb7c49784e3498ae7d7213c in cordova-plugin-media-capture's branch refs/heads/master
from Richard Knoll
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-media-capture.git;h=b2e29fc ]

CB-10554: Implementing plugin save/restore API for Android

Adds two document events that can be subscribed to on
Android to receive the results of callbacks that were
pending when the webview was destroyed

This closes #51, closes #60


> Media Capture: Null reference in low memory conditions
> ------------------------------------------------------
>
>                 Key: CB-10554
>                 URL: https://issues.apache.org/jira/browse/CB-10554
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Media Capture
>         Environment: android
>            Reporter: Adam Duren
>            Assignee: Richard B Knoll
>            Priority: Critical
>              Labels: PR, android, pendingPR, triaged
>
> I have been testing my app in low memory conditions by setting the android developer
setting of "Don't keep Activities" which simulates low memory conditions. Every time I use
the capture plugin for video when returning from the capture activity the app crashes. It
appears that the state is not saved and on resume there are now null references such as the
callbackContext and results array. It is fixed by using the onRestoreStateForActivityResult
and onSaveInstanceState methods.
> *Related Exception* 
> {quote}
> 7 14:30:31.181 23432-24842/com.ionicframework.alto442183 E/AndroidRuntime: FATAL EXCEPTION:
pool-3-thread-2
>                                                                                Process:
com.ionicframework.alto442183, PID: 23432
>                                                                                java.lang.NullPointerException:
Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.sendPluginResult(org.apache.cordova.PluginResult)'
on a null object reference
>                                                                                    at
org.apache.cordova.mediacapture.Capture$3.run(Capture.java:396)
>                                                                                    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
>                                                                                    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
>                                                                                    at
java.lang.Thread.run(Thread.java:818)
> {quote}



--
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