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.
I'm trying to implement the ZXing library for scanning of barcodes. During my implementation I got several out of memory crashes. I started to investigate the problem and it seems that it is caused by the sbyte allocation. I've written a small test set that can prove my point. You'll find it below. It happens in a MonoTouch iPhone Application (so the project type is MonoTouch/iPhone/Empty Project). Then cut and paste the code below.
public partial class AppDelegate : UIApplicationDelegate
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
window = new UIWindow (UIScreen.MainScreen.Bounds);
using (var alloc = new AllocBytes())
private static int Counter;
public class AllocBytes : IDisposable
private sbyte testBytes;
public void Test ()
testBytes = new sbyte;
public void Dispose ()
testBytes = null;
I just discovered that the crash it causes is not the OutOfMemoryException but a timeout. The device log says the following.
Apr 4 09:45:53 iPhone-van-arno SpringBoard <Warning>: SByteTest failed to launch in time
Apr 4 09:45:53 iPhone-van-arno SpringBoard <Warning>: Forcing crash report of SByteTest...
Apr 4 09:45:53 iPhone-van-arno SpringBoard <Warning>: Finished crash reporting.
Apr 4 09:45:53 iPhone-van-arno com.apple.launchd (UIKitApplication:sbytetest[0x660f]) <Notice>: (UIKitApplication:sbytetest[0x660f]) Exited: Killed: 9
Apr 4 09:45:53 iPhone-van-arno SpringBoard <Warning>: Application 'SByteTest' exited abnormally with signal 9: Killed: 9
I guess I need to do some more testing. I'll try and enhance the App.
After carefully testing this in a view I must conclude that my first assumption is wrong. The byte does not seem to be the problem.