cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Duren (JIRA)" <>
Subject [jira] [Created] (CB-10554) Media Capture: Null reference in low memory conditions
Date Sun, 07 Feb 2016 19:35:39 GMT
Adam Duren created CB-10554:

             Summary: Media Capture: Null reference in low memory conditions
                 Key: CB-10554
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugin Media Capture
         Environment: android
            Reporter: Adam Duren

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

*Related Exception* 
7 14:30:31.181 23432-24842/com.ionicframework.alto442183 E/AndroidRuntime: FATAL EXCEPTION:
                                                                               Process: com.ionicframework.alto442183,
PID: 23432
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$
                                                                                   at java.util.concurrent.ThreadPoolExecutor.runWorker(
                                                                                   at java.util.concurrent.ThreadPoolExecutor$

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message