http://bugzilla.novell.com/show_bug.cgi?id=562094
http://bugzilla.novell.com/show_bug.cgi?id=562094#c0 Summary: AVAudioRecorder doesn't dispose properly Classification: Mono Product: MonoTouch Version: SVN Platform: Macintosh OS/Version: Mac OS X 10.6 Status: NEW Severity: Critical Priority: P5 - None Component: Runtime AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 After creating an instance of AVAudioRecorder, and moving to a new UIViewController, then navigating around, the application throws an exception. My assumption is that the instance isn't disposing correctly when GC kicks in. Reproducible: Always Steps to Reproduce: 1. Create New UIViewController with instance of AVAudioRecorder 2. Start Recording 3. Close/Back on UIViewController 4. Navigate around application, click buttons, open new Views, etc 5. application will crash Expected Results: at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.void_objc_msgSend_intptr_intptr_bool (intptr,intptr,intptr,intptr,bool) <0x00004> at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.void_objc_msgSend_intptr_intptr_bool (intptr,intptr,intptr,intptr,bool) <0x00004> at MonoTouch.Foundation.NSObject.Dispose (bool) [0x0003b] in /Users/plasma/Source/iphone/monotouch/Foundation/NSObject.cs:85 at MonoTouch.Foundation.NSObject.Finalize () [0x00000] in /Users/plasma/Source/iphone/monotouch/Foundation/NSObject.cs:57 at (wrapper runtime-invoke) object.runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr) <IL 0x0001b, 0x00091> public void StartRecording () { NSObject[] values = new NSObject[] { NSNumber.FromFloat(44100.0f), NSNumber.FromInt32((int)AudioFileType.WAVE), NSNumber.FromInt32(1), NSNumber.FromInt32((int)AVAudioQuality.Max) }; NSObject[] keys = new NSObject[] { AVAudioSettings.AVSampleRateKey, AVAudioSettings.AVFormatKey, AVAudioSettings.AVNumberOfChannelsKey, AVAudioSettings.AVEncoderAudioQualityKey }; NSDictionary settings = NSDictionary.FromObjectsAndKeys (values, keys); NSUrl url = NSUrl.FromFilename (TempRecording); NSError error = new NSError (); AVAudioRecorder recorder = new AVAudioRecorder (url, settings, error); recorder.FinishedRecording += delegate { recorder.Dispose(); Debug.WriteLine("Done Recording"); }; recorder.MeteringEnabled = true; recorder.PrepareToRecord(); recorder.RecordFor(10.0); //NSTimer timer = NSTimer.CreateRepeatingScheduledTimer (TimeSpan.FromSeconds (1.0), () => UpdateMeter ()); } -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
