Bug 35458 - AVPlayer constructor exception
Summary: AVPlayer constructor exception
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-11-02 09:15 UTC by Andrew
Modified: 2016-06-09 12:40 UTC (History)
5 users (show)

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


Attachments
sample app (2.10 MB, application/x-7z-compressed)
2015-11-02 09:16 UTC, Andrew
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 Andrew 2015-11-02 09:15:48 UTC
using a renderer to create an AVPlayer.  Player works until I subclass AVPlayer and pass in AVPlayerItem to the base constructor.  The item is not null.  If I remove the base constructor (below), it works without an exception, but the AVPlayerItem is not set (no video)

sample attached.


class:
VideoSamples.iOS/Controls/MyAVPlayer.cs

Line: constructor, line 18:
public MyAVPlayer (AVPlayerItem item) : base (item)  


Exception:

2015-10-27 10:42:22.471 FormsTemplateiOS[9270:2651166] critical:   at <unknown> <0xffffffff>
2015-10-27 10:42:22.472 FormsTemplateiOS[9270:2651166] critical:   at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr (intptr,intptr,intptr) <IL 0x0002f, 0xffffffff>
2015-10-27 10:42:22.472 FormsTemplateiOS[9270:2651166] critical:   at MonoTouch.AVFoundation.AVPlayer..ctor (MonoTouch.AVFoundation.AVPlayerItem) [0x00052] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/src/build/ios/compat/AVFoundation/AVPlayer.g.cs:103
2015-10-27 10:42:22.472 FormsTemplateiOS[9270:2651166] critical:   at VideoSamples.iOS.MyAVPlayer..ctor (MonoTouch.AVFoundation.AVPlayerItem) [0x00000] in /Users/mccorma/Desktop/Samples/VideoPlayer/VideoPlayer.iOS/Controls/MyAVPlayer.cs:18
2015-10-27 10:42:22.472 FormsTemplateiOS[9270:2651166] critical:   at VideoSamples.iOS.MyPlayerView..ctor (bool,System.Drawing.RectangleF) [0x0002e] in /Users/mccorma/Desktop/Samples/VideoPlayer/VideoPlayer.iOS/Controls/MyPlayerView.cs:21
2015-10-27 10:42:22.472 FormsTemplateiOS[9270:2651166] critical:   at VideoSamples.iOS.Controls.MyVideoPlayerRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1<VideoSamples.Controls.MyVideoPlayer>) [0x00033] in /Users/mccorma/Desktop/Samples/VideoPlayer/VideoPlayer.iOS/MyVideoPlayerRenderer.cs:40
2015-10-27 10:42:22.472 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1.SetElement (TElement) <IL 0x00118, 0x00691>
2015-10-27 10:42:22.473 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1.Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement) <IL 0x00007, 0x0005f>
2015-10-27 10:42:22.473 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement) <IL 0x0001d, 0x000ba>
2015-10-27 10:42:22.473 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement) <IL 0x00007, 0x0005f>
2015-10-27 10:42:22.473 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () <IL 0x00026, 0x000de>
2015-10-27 10:42:22.473 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1.SetElement (TElement) <IL 0x000d2, 0x0050f>
2015-10-27 10:42:22.473 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1.Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement) <IL 0x00007, 0x0005f>
2015-10-27 10:42:22.473 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement) <IL 0x0001d, 0x000ba>
2015-10-27 10:42:22.473 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement) <IL 0x00007, 0x0005f>
2015-10-27 10:42:22.474 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () <IL 0x00026, 0x000de>
2015-10-27 10:42:22.474 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1.SetElement (TElement) <IL 0x000d2, 0x0050f>
2015-10-27 10:42:22.474 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1.Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement) <IL 0x00007, 0x0005f>
2015-10-27 10:42:22.474 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement) <IL 0x0001d, 0x000ba>
2015-10-27 10:42:22.474 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement) <IL 0x00007, 0x0005f>
2015-10-27 10:42:22.474 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () <IL 0x00026, 0x000de>
2015-10-27 10:42:22.474 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () <IL 0x00083, 0x002c3>
2015-10-27 10:42:22.475 FormsTemplateiOS[9270:2651166] critical:   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0005e, 0xffffffff>
2015-10-27 10:42:22.475 FormsTemplateiOS[9270:2651166] critical:   at <unknown> <0xffffffff>
2015-10-27 10:42:22.475 FormsTemplateiOS[9270:2651166] critical:   at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (intptr,intptr) <IL 0x0002e, 0xffffffff>
2015-10-27 10:42:22.475 FormsTemplateiOS[9270:2651166] critical:   at MonoTouch.UIKit.UIViewController.get_View () [0x00030] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/src/build/ios/compat/UIKit/UIViewController.g.cs:2411
2015-10-27 10:42:22.475 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () <IL 0x00009, 0x0003c>
2015-10-27 10:42:22.476 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement) <IL 0x00026, 0x000fb>
2015-10-27 10:42:22.476 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement) <IL 0x0001d, 0x000ba>
2015-10-27 10:42:22.476 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.NavigationRenderer.CreateViewControllerForPage (Xamarin.Forms.Page) <IL 0x0002d, 0x000c3>
2015-10-27 10:42:22.476 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.NavigationRenderer/<OnPushAsync>d__47.MoveNext () <IL 0x00016, 0x0007b>
2015-10-27 10:42:22.476 FormsTemplateiOS[9270:2651166] critical:   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<Xamarin.Forms.Platform.iOS.NavigationRenderer/<OnPushAsync>d__47> (Xamarin.Forms.Platform.iOS.NavigationRenderer/<OnPushAsync>d__47&) [0x00038] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:841
2015-10-27 10:42:22.476 FormsTemplateiOS[9270:2651166] critical:   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<bool>.Start<Xamarin.Forms.Platform.iOS.NavigationRenderer/<OnPushAsync>d__47> (Xamarin.Forms.Platform.iOS.NavigationRenderer/<OnPushAsync>d__47&) [0x00000] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:447
2015-10-27 10:42:22.476 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.NavigationRenderer.OnPushAsync (Xamarin.Forms.Page,bool) <IL 0x00037, 0x00153>
2015-10-27 10:42:22.476 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.NavigationRenderer.PushPageAsync (Xamarin.Forms.Page,bool) <IL 0x00003, 0x00036>
2015-10-27 10:42:22.477 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.NavigationRenderer/<<ViewDidLoad>b__29_0>d.MoveNext () <IL 0x00017, 0x0007b>
2015-10-27 10:42:22.477 FormsTemplateiOS[9270:2651166] critical:   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<Xamarin.Forms.Platform.iOS.NavigationRenderer/<<ViewDidLoad>b__29_0>d> (Xamarin.Forms.Platform.iOS.NavigationRenderer/<<ViewDidLoad>b__29_0>d&) [0x00038] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:841
2015-10-27 10:42:22.477 FormsTemplateiOS[9270:2651166] critical:   at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start<Xamarin.Forms.Platform.iOS.NavigationRenderer/<<ViewDidLoad>b__29_0>d> (Xamarin.Forms.Platform.iOS.NavigationRenderer/<<ViewDidLoad>b__29_0>d&) [0x00000] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:83
2015-10-27 10:42:22.477 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.NavigationRenderer.<ViewDidLoad>b__29_0 (Xamarin.Forms.Page) <IL 0x0002f, 0x00153>
2015-10-27 10:42:22.477 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.EnumerableExtensions.ForEach<T> (System.Collections.Generic.IEnumerable`1<T>,System.Action`1<T>) <IL 0x00012, 0x000bf>
2015-10-27 10:42:22.477 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.NavigationRenderer.ViewDidLoad () <IL 0x00111, 0x005bb>
2015-10-27 10:42:22.477 FormsTemplateiOS[9270:2651166] critical:   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0005e, 0xffffffff>
2015-10-27 10:42:22.477 FormsTemplateiOS[9270:2651166] critical:   at <unknown> <0xffffffff>
2015-10-27 10:42:22.478 FormsTemplateiOS[9270:2651166] critical:   at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (intptr,intptr) <IL 0x0002e, 0xffffffff>
2015-10-27 10:42:22.478 FormsTemplateiOS[9270:2651166] critical:   at MonoTouch.UIKit.UIViewController.get_View () [0x00030] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/src/build/ios/compat/UIKit/UIViewController.g.cs:2411
2015-10-27 10:42:22.478 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.NavigationRenderer.get_NativeView () <IL 0x00001, 0x00027>
2015-10-27 10:42:22.478 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.NavigationRenderer.SetElement (Xamarin.Forms.VisualElement) <IL 0x00025, 0x0010b>
2015-10-27 10:42:22.478 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement) <IL 0x0001d, 0x000ba>
2015-10-27 10:42:22.478 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.Platform.AddChild (Xamarin.Forms.VisualElement) <IL 0x00028, 0x000d7>
2015-10-27 10:42:22.478 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.Platform.WillAppear () <IL 0x00042, 0x000f7>
2015-10-27 10:42:22.479 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.PlatformRenderer.ViewWillAppear (bool) <IL 0x00016, 0x0007f>
2015-10-27 10:42:22.479 FormsTemplateiOS[9270:2651166] critical:   at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___byte (object,intptr,intptr,intptr) <IL 0x00064, 0xffffffff>
2015-10-27 10:42:22.479 FormsTemplateiOS[9270:2651166] critical:   at <unknown> <0xffffffff>
2015-10-27 10:42:22.479 FormsTemplateiOS[9270:2651166] critical:   at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging.void_objc_msgSend (intptr,intptr) <IL 0x0002c, 0xffffffff>
2015-10-27 10:42:22.479 FormsTemplateiOS[9270:2651166] critical:   at MonoTouch.UIKit.UIWindow.MakeKeyAndVisible () [0x00010] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/src/build/ios/compat/UIKit/UIWindow.g.cs:186
2015-10-27 10:42:22.479 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.SetMainPage () <IL 0x0000c, 0x00046>
2015-10-27 10:42:22.479 FormsTemplateiOS[9270:2651166] critical:   at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication,MonoTouch.Foundation.NSDictionary) <IL 0x00029, 0x00103>
2015-10-27 10:42:22.480 FormsTemplateiOS[9270:2651166] critical:   at VideoSamples.iOS.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication,MonoTouch.Foundation.NSDictionary) [0x00014] in /Users/mccorma/Desktop/Samples/VideoPlayer/VideoPlayer.iOS/AppDelegate.cs:23
2015-10-27 10:42:22.480 FormsTemplateiOS[9270:2651166] critical:   at (wrapper runtime-invoke) <Module>.runtime_invoke_bool__this___object_object (object,intptr,intptr,intptr) <IL 0x00076, 0xffffffff>
2015-10-27 10:42:22.480 FormsTemplateiOS[9270:2651166] critical:   at <unknown> <0xffffffff>
2015-10-27 10:42:22.480 FormsTemplateiOS[9270:2651166] critical:   at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x000ae, 0xffffffff>
2015-10-27 10:42:22.480 FormsTemplateiOS[9270:2651166] critical:   at MonoTouch.UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/src/UIKit/UIApplication.cs:74
2015-10-27 10:42:22.480 FormsTemplateiOS[9270:2651166] critical:   at MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/src/UIKit/UIApplication.cs:58
2015-10-27 10:42:22.480 FormsTemplateiOS[9270:2651166] critical:   at VideoSamples.iOS.Application.Main (string[]) [0x00008] in /Users/mccorma/Desktop/Samples/VideoPlayer/VideoPlayer.iOS/Main.cs:17
2015-10-27 10:42:22.480 FormsTemplateiOS[9270:2651166] critical:   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00060, 0xffffffff>
2015-10-27 10:42:22.481 FormsTemplateiOS[9270:2651166] critical:
Comment 1 Andrew 2015-11-02 09:16:04 UTC
Created attachment 13614 [details]
sample app
Comment 2 Rolf Bjarne Kvinge [MSFT] 2015-12-23 13:41:47 UTC
As a workaround delete the default MyAVPlayer constructor.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2016-01-05 11:33:03 UTC
Fixed.

maccore/master: 8ef70d1fdad6aacc555d823fd15f7fd8aa7045da