Bug 14227 - AVAssetTrack.FormatDescriptions causes SIGSEGV on finalizer
Summary: AVAssetTrack.FormatDescriptions causes SIGSEGV on finalizer
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 6.4.4
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-08-24 20:06 UTC by tome
Modified: 2013-08-26 08:57 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
a project to reproduce the crashing with SIGSEGV (5.80 KB, application/octet-stream)
2013-08-24 20:06 UTC, tome
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED FIXED

Description tome 2013-08-24 20:06:28 UTC
Created attachment 4710 [details]
a project to reproduce the crashing with SIGSEGV

If once call the AVAssetTrack.FormatDescriptions causes SIGSEGV in finalizer thread on actual device.
Please check the attached project to reproduce this issue.
0. Build and deploy it into an actual device.
1. Tap "Choose Song" button in tool bar, and choose any song from your iPod music library,
   Then this will show some audio specs that are gotten via AVAssetTrack.FormatDescriptions.
2. Tap "GC Collect" button
   This will cause the app crashing with a log like following;

Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: Stacktrace:
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>:   at <unknown> <0xffffffff>
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>:   at (wrapper managed-to-native) MonoTouch.Foundation.NSObject.monotouch_release_managed_ref (intptr) <0xffffffff>
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>:   at MonoTouch.Foundation.NSObject.ReleaseManagedRef () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/Foundation/NSObject.cs:98
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>:   at MonoTouch.Foundation.NSObject/NSObject_Disposer.Drain (MonoTouch.Foundation.NSObject) [0x00062] in /Developer/MonoTouch/Source/monotouch/src/shared/Foundation/NSObject2.cs:545
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>:   at <unknown> <0xffffffff>
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>:   at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0xffffffff>
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>:   at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>:   at CMAudioFormatDescriptionTest.Application.Main (string[]) [0x00008] in /Users/tome/work/aaa/Main.cs:16
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 
	Native stacktrace:
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	0   CMAudioFormatDescriptionTest        0x0016e3b7 mono_handle_native_sigsegv + 214
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	1   CMAudioFormatDescriptionTest        0x0017cc51 mono_sigsegv_signal_handler + 172
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	2   libsystem_c.dylib                   0x32b7e7ed _sigtramp + 48
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	3   CMAudioFormatDescriptionTest        0x001c6afc is_user_type + 36
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	4   CMAudioFormatDescriptionTest        0x001c6a54 monotouch_release_managed_ref + 20
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	5   CMAudioFormatDescriptionTest        0x00045548 wrapper_managed_to_native_MonoTouch_Foundation_NSObject_monotouch_release_managed_ref_intptr + 92
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	6   CMAudioFormatDescriptionTest        0x0002d5f8 MonoTouch_Foundation_NSObject_ReleaseManagedRef + 32
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	7   CMAudioFormatDescriptionTest        0x0002df60 MonoTouch_Foundation_NSObject_NSObject_Disposer_Drain_MonoTouch_Foundation_NSObject + 364
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	8   CMAudioFormatDescriptionTest        0x000ef1cc wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	9   CMAudioFormatDescriptionTest        0x0017c577 mono_jit_runtime_invoke + 1014
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	10  CMAudioFormatDescriptionTest        0x001804df mono_runtime_invoke + 90
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	11  CMAudioFormatDescriptionTest        0x0011ec95 native_to_managed_trampoline_MonoTouch_Foundation_NSObject_NSObject_Disposer_Drain + 180
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	12  CoreFoundation                      0x35700eef +[NSObject performSelector:withObject:] + 42
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	13  Foundation                          0x35295747 __NSThreadPerformPerform + 350
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	14  CoreFoundation                      0x35746ad3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	15  CoreFoundation                      0x3574629f __CFRunLoopDoSources0 + 214
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	16  CoreFoundation                      0x35745045 __CFRunLoopRun + 652
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	17  CoreFoundation                      0x356c84a5 CFRunLoopRunSpecific + 300
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	18  CoreFoundation                      0x356c836d CFRunLoopRunInMode + 104
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	19  GraphicsServices                    0x37364439 GSEventRunModal + 136
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	20  UIKit                               0x331d4cd5 UIApplicationMain + 1080
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	21  CMAudioFormatDescriptionTest        0x00047cf4 wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 272
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	22  CMAudioFormatDescriptionTest        0x000343d0 MonoTouch_UIKit_UIApplication_Main_string___string_string + 300
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	23  CMAudioFormatDescriptionTest        0x00027178 CMAudioFormatDescriptionTest_Application_Main_string__ + 172
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	24  CMAudioFormatDescriptionTest        0x000ef1cc wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 200
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	25  CMAudioFormatDescriptionTest        0x0017c577 mono_jit_runtime_invoke + 1014
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	26  CMAudioFormatDescriptionTest        0x001804df mono_runtime_invoke + 90
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	27  CMAudioFormatDescriptionTest        0x0018307b mono_runtime_exec_main + 306
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	28  CMAudioFormatDescriptionTest        0x001832cf mono_runtime_run_main + 482
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	29  CMAudioFormatDescriptionTest        0x001548c3 mono_jit_exec + 94
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	30  CMAudioFormatDescriptionTest        0x001b6f54 main + 2220
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 	31  CMAudioFormatDescriptionTest        0x00027028 start + 40
Aug 25 08:21:10 tomes-iPhone4S CMAudioFormatDescriptionTest[2997] <Error>: 
	=================================================================
	Got a SIGSEGV while executing native code. This usually indicates
	a fatal error in the mono runtime or one of the native libraries 
	used by your application.
	=================================================================

Anyway, this kind of 'Disposer Drain' issues are too hard to find out
So can you write the TYPE of the object or something into the stacktrace or somewhere?
Thank you for your help.
Comment 1 Sebastien Pouliot 2013-08-26 08:57:00 UTC
Fixed in master 794459f01634acce8b1dda21d5d57bf5a11dbd51