Barcode Scanner Crash

Good afternoon. I am developing an application which makes use of the Barcode Scanner plugin. Perform the installation and add the sentences that mark the official documentation:
When calling the function to run the scanner the application closes, and it does not show any error message.
Has something similar happened to someone?