Sounds like a bug. What version of Avalon are you running? Can you show me
the repro code? (the simpler the better)
Thanks,
Tom
"Philippe Lavoie" wrote:
> Hi,
>
> When I resize my PresentationHost window, the MediaElement throws an
> exception. Otherwise, it works fine. Please help
>
> Phil
>
> PS the animation is within a storyboard.
>
> System.Runtime.InteropServices.COMException crossed an AppDomain boundary
> Message="An outgoing call cannot be made since the application is
> dispatching an input-synchronous call. (Exception from HRESULT:
> 0x8001010D (RPC_E_CANTCALLOUT_ININPUTSYNCCALL))"
> Source="mscorlib"
> ErrorCode=-2147417843
> StackTrace:
> at
> System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32
> errorCode, IntPtr errorInfo)
> at
> System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
> at MS.Internal.HRESULT.Check(Int32 hr)
> at System.Windows.Media.MediaPlayer.GetPosition()
> at System.Windows.Media.MediaPlayer.get_Position()
> at System.Windows.Media.MediaClock.GetCurrentTimeCore()
> at
> System.Windows.Media.Animation.Clock.ComputeSyncSlip(TimeIntervalCollection&
> parentIntervalCollection, TimeSpan currentParentTime, Double
> currentParentSpeed, Double appliedSpeedRatio)
> at
> System.Windows.Media.Animation.Clock.ComputeLocalStateHelper(Boolean
> performTickOperations)
> at System.Windows.Media.Animation.Clock.ComputeLocalState()
> at System.Windows.Media.Animation.ClockGroup.ComputeTreeState()
> at System.Windows.Media.Animation.TimeManager.Tick()
> at
> System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object
> resizedCompositionTarget)
> at System.Windows.Media.MediaContext.RenderMessageHandler(Object
> resizedCompositionTarget)
> at System.Windows.Media.MediaContext.Resize(ICompositionTarget
> resizedCompositionTarget)
> at System.Windows.Interop.HwndTarget.OnResize()
> at System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg,
> IntPtr wparam, IntPtr lparam)
> at
> System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd,
> Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
> at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr
> wParam, IntPtr lParam, Boolean& handled)
> at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
> at
> System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate
> callback, Object args, Boolean isSingleParameter)
> at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object
> source, Delegate callback, Object args, Boolean isSingleParameter,
> Delegate catchHandler)
> at
> System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority
> priority, TimeSpan timeout, Delegate method, Object args, Boolean
> isSingleParameter)
> at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority
> priority, Delegate method, Object arg)
> at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg,
> IntPtr wParam, IntPtr lParam)
> at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc,
> IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
> at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg,
> IntPtr wParam, IntPtr lParam)
> at MS.Win32.UnsafeNativeMethods.SetWindowPos(HandleRef hWnd,
> HandleRef hWndInsertAfter, Int32 x, Int32 y, Int32 cx, Int32 cy, Int32
> flags)
> at MS.Internal.AppModel.RootBrowserWindow.ResizeMove(Int32
> xDeviceUnits, Int32 yDeviceUnits, Int32 widthDeviceUnits, Int32
> heightDeviceUnits)
> at
> MS.Internal.AppModel.ApplicationProxyInternal._MoveDelegate(Object moveArgs)
> at
> System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate
> callback, Object args, Boolean isSingleParameter)
> at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object
> source, Delegate callback, Object args, Boolean isSingleParameter,
> Delegate catchHandler)
> at
> System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority
> priority, TimeSpan timeout, Delegate method, Object args, Boolean
> isSingleParameter)
> at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority
> priority, Delegate method, Object arg)
> at MS.Internal.AppModel.ApplicationProxyInternal.Move(Int32 x,
> Int32 y, Int32 width, Int32 height)
>