Windows Vista Forums

Bug: MediaElement throws exception on application resize
  1. #1


    Philippe Lavoie Guest

    Bug: MediaElement throws exception on application resize

    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)



      My System SpecsSystem Spec

  2. #2


    Tom Mulcahy [MSFT] Guest

    RE: Bug: MediaElement throws exception on application resize

    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)
    >


      My System SpecsSystem Spec

  3. #3


    Philippe Lavoie Guest

    Re: Bug: MediaElement throws exception on application resize

    I forwarded a sample to Robert Wlodarczyk at Microsoft. He says that he
    can't reproduce locally. But that problem occurs on every machine here...

    Phil


    Tom Mulcahy [MSFT] wrote:
    > 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)
    >>


      My System SpecsSystem Spec

Bug: MediaElement throws exception on application resize problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
TcpClient throws "invalid pointer address" exception on Server 2008 TDC .NET General 0 16 Jan 2009
Using the ObjectDataProvider always throws an exception... Desmond Cassidy Avalon 1 20 Jun 2007
SendKeys throws "Hook cannot be created" security exception in Vista Beta 2 Dan Dautrich Vista security 1 28 Mar 2007
Printing some fonts throws exception in XPS to GDI conversion GeneW Avalon 0 24 Jan 2007
BUG: MediaPlayer throws an exception after multiple play / pause Philippe Lavoie Avalon 0 06 Apr 2006