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.
Created attachment 5647 [details]
When you obtain a CVPixelBuffer from a CVPixelBufferPool the obtained buffer is double retained so it gets leaked. Adding an explicit call to CVBufferRelease before calling Dispose fixes the leak.
This is similar to this other bug:
The CreatePixelBuffer method should use the alternative constructor (IntPtr, bool) to indicate ownership of the object.
Steps to reproduce:
1. Build and run the attached iPad app.
2. In the app press the "Record" button in the toolbar. If you run on a real device then the app will likely be killed due to memory usage after a few seconds. In the simulator memory usage just grows to huge levels. Use Instruments or (for the simulator) Activity Monitor to observe memory usage grow rapidly.
I have checked this issues with following builds:
X.S 4.2.2(build 2)
iPad 2 version 6.0.1
I am also able to reproduce this issue. This is the iOS Device log for the same: iOS device log: https://gist.github.com/AkhileshKumar01/650424a5f53d26b4d704
Took nearly 2 minutes on an iPad 3 but it did crash with a low memory (using master).
Fixed in master 75a9c2075ab53356b39a34ee9007435179620e87
It's been running for over 8 minutes without a single memory warning.
Thanks for the test case!
I have checked this attached sample with following builds:
master X.iOS 18.104.22.168
X.S 4.2.4(build 32)
Also checked with X.iOS 7.2.1-20
Application still getting crashed after clicking on 'Record' button. This is the iOS device log: https://gist.github.com/saurabh360/05412a06448cb0dc08a4
Also getting exception when clicking on 'Record' button on Simulator. This is exception details: https://gist.github.com/saurabh360/59230f4afcc098f6e3c0
Hence reopening this issue
It does not look to be the same issue:
Mar 24 14:23:35 VideoTest <Warning>: Unhandled managed exception: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[UIWindow drawViewHierarchyInRect:afterScreenUpdates:]: unrecognized selector sent to instance 0x21092a70 (MonoTouch.Foundation.MonoTouchException)
Please include which type of device and iOS version was used.
That's even more important if you do not supply the crash report (and a symbolication crash report) should be attached for every crash that happens on devices.
I am getting this exception on
iPad 3 version 6.1.2
iOS Simulator below version 7.0
Also I am not getting symbolicated log in Xcode but I am getting console log: https://gist.github.com/saurabh360/d44795d5b2aa2f65c6d2 for this exception
However, On iPad 2 New version 7.1 and iOS Simulator 7.0 and 7.1 Application does not crash after clicking on 'Record' button and in Application Output it is showing "2014-04-13 19:17:34.664 VideoTest[828:707] Received memory warning" when It's been running for over 5 minutes on physical device
The reason for your crash is that the test case requires iOS 7.0+ since it calls:
[Export ("drawViewHierarchyInRect:afterScreenUpdates:"), Since (7, 0), CompilerGenerated]
public virtual bool DrawViewHierarchy (RectangleF rect, bool afterScreenUpdates)
I'll look if I can reproduce the memory warnings…
Created attachment 6375 [details]
screenshot of instrument memory allocations
I can see the memory warnings - but only on device when not using Instruments.
OTOH but there's no leak, i.e. it's a normal warning - there's a lot of objects being created and if the GC is not called soon enough a memory warning will be issued .
 because the simulator calls GC.Collect every few seconds
 which slows down execution a bit and allow the GC to be called
 which XI translate into a CG.Collect, solving the memory issue
As per comment 7(this test case requires 7.0+ device to run) and 8 marking this issue as verified fixed.
XS 4.2.4(build 32)