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.
In ObjectiveC I would use CGBitmapContextCreate() to get a new bitmap context. If creation fails (because there isn't enough memory for instance), NIL will be returned.
In Monotouch however, I have to use new CGBitmapContext() - there is no static method to create the context.
If creation fails in Monotouch, I will see
<Error>: CGBitmapContextInfoCreate: unable to allocate 2851360 bytes for bitmap data
in the logs but there is no way to react on it, construction of my object will just fail and the app crash.
from my stackoverflow answer :
> If an invalid object (like null) is returned then the C# instance will have an Handle equals to IntPtr.Zero. This is true for any ObjC object, since init can return nil and a .NET constructor cannot return null.
I assume it's resolved then :)
re-open if I'm wrong (w/additional data)