Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
PROBLEM: After you take the picture, the application crashes due to a NullPointerException.
Line 32: Uri contentUri = Uri.FromFile(_file);
_file is NULL.
Created attachment 6678 [details]
A fixed version of the Recipe..
I moved the fields (_file, _dir) into a static class (App) and created a static bitmap there as well.
The bitmap needs to be static in order to survive the OnCreate() method, which is firing AFTER the OnActivityResult() method..
The fact that those events fire in that order seems like a whole other bug in my opinion...
Actually, the event order was due to me turning the device sideways to take a landscape shot, after starting the application in portait.. disregard that bit..
Added fix and tested. this should be working now with Tyson's fix.