Memory Leak on the phonegap-plugin-barcodescanner for Windows Phone 8.1 devices

291 views Asked by At

this issue is not new, I know and there are different threats around the Internet although I still have the same issue where the App crashes after tried a few scans.

Testing the App on: Lumia 625 and 520

I have a cordova project with the following: cordova 7.1.0 node 6.7.0 phonegap 7.0.1

After created the project I add the plugin: cordova plugin add [email protected] (6.0.4 seeems to be the more stable)

and then I add the platform: cordova platform add windows

when I go and try my app, as soon as I try to scan a QR code, the phone's screen became green and crashes eventually :(

I have tried to apply the changes mentioned here: https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/55 but no luck.

This is the code:

function runBarCodeScanner(){
    $cordovaBarcodeScanner
        .scan()
        .then(barcodeScanComplete, barcodeScanError);
  }

Any version of the barcodescanner above 6.0.4 will crash straight away although I was hoping the issue would have been fixed by then!

Any suggestions?

Please let me know if you need further details to help

1

There are 1 answers

0
Daniele On BEST ANSWER

I have solved the problem at the end. Using the knowledge shared under https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/55 after a few attempts is seems like the scanner stopped crashing my app :)