Bug 7514 - Stack overflow when using <audio> tag in WebView
Summary: Stack overflow when using <audio> tag in WebView
Status: RESOLVED FIXED
Alias: None
Product: MonoMac
Classification: Desktop
Component: Bindings ()
Version: GIT
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-09-27 14:22 UTC by Curtis Wensley
Modified: 2012-09-27 16:06 UTC (History)
2 users (show)

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


Attachments
Reproduces the problem (49.57 KB, application/zip)
2012-09-27 14:34 UTC, Curtis Wensley
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 Curtis Wensley 2012-09-27 14:22:05 UTC
A stack overflow exception is called when using the audio tag in a WebView.  It seems to stem from the AVUrlAsset.AudiovisualMimeTypes static method, and it seems to be calling itself.

Before the stack overflow, there are warnings that it found the class implemented in multiple places:


objc[85709]: Class AVAsset is implemented in both ?? and /System/Library/Frameworks/AVFoundation.framework/AVFoundation. One of the two will be used. Which one is undefined.
objc[85709]: Class AVURLAsset is implemented in both ?? and /System/Library/Frameworks/AVFoundation.framework/AVFoundation. One of the two will be used. Which one is undefined.
objc[85709]: Class AVAssetImageGenerator is implemented in both ?? and /System/Library/Frameworks/AVFoundation.framework/AVFoundation. One of the two will be used. Which one is undefined.
objc[85709]: Class AVAssetTrack is implemented in both ?? and /System/Library/Frameworks/AVFoundation.framework/AVFoundation. One of the two will be used. Which one is undefined.
objc[85709]: Class AVPlayer is implemented in both ?? and /System/Library/Frameworks/AVFoundation.framework/AVFoundation. One of the two will be used. Which one is undefined.
... etc

Stack overflow snippet:
System.StackOverflowException: The requested operation caused a stack overflow.
  at (wrapper managed-to-native) object:__icall_wrapper_mono_string_new_wrapper (intptr)
  at (wrapper native-to-managed) object:[MonoMac.AVFoundation.AVUrlAsset:System.String[] get_AudiovisualMimeTypes()] (intptr,MonoMac.ObjCRuntime.Selector)
  at (wrapper managed-to-native) MonoMac.ObjCRuntime.Messaging:IntPtr_objc_msgSend (intptr,intptr)
  at MonoMac.AVFoundation.AVUrlAsset.get_AudiovisualMimeTypes () [0x00000] in <filename unknown>:0 
  at (wrapper native-to-managed) object:[MonoMac.AVFoundation.AVUrlAsset:System.String[] get_AudiovisualMimeTypes()] (intptr,MonoMac.ObjCRuntime.Selector)
  at (wrapper managed-to-native) MonoMac.ObjCRuntime.Messaging:IntPtr_objc_msgSend (intptr,intptr)
  at MonoMac.AVFoundation.AVUrlAsset.get_AudiovisualMimeTypes () [0x00000] in <filename unknown>:0 
  at (wrapper native-to-managed) object:[MonoMac.AVFoundation.AVUrlAsset:System.String[] get_AudiovisualMimeTypes()] (intptr,MonoMac.ObjCRuntime.Selector)
  at (wrapper managed-to-native) MonoMac.ObjCRuntime.Messaging:IntPtr_objc_msgSend (intptr,intptr)
  at MonoMac.AVFoundation.AVUrlAsset.get_AudiovisualMimeTypes () [0x00000] in <filename unknown>:0 
  at (wrapper native-to-managed) object:[MonoMac.AVFoundation.AVUrlAsset:System.String[] get_AudiovisualMimeTypes()] 
... etc
Comment 1 Curtis Wensley 2012-09-27 14:34:21 UTC
Created attachment 2641 [details]
Reproduces the problem
Comment 2 Curtis Wensley 2012-09-27 15:07:54 UTC
Fixed it with this PR:

https://github.com/mono/monomac/pull/78
Comment 3 Miguel de Icaza [MSFT] 2012-09-27 16:06:15 UTC
Thans, applied