Blank screen when clicking an image

Nov 17, 2009 at 1:59 PM


I'm using slide.show2, when I click on an image   and move the mouse at the same time the screen goes blank and I have to refresh the page to see the viewer again. The problem occurs in all browsers, so it's not a browser issue. 

Simply moving the mouse over the image will not trigger the problem but clicking while moving the mouse over an image will. I'm talking about the actual image displayed in the viewer, not the thumbnails at the bottom.

Nov 18, 2009 at 12:29 AM
Edited Nov 18, 2009 at 12:59 AM

Hello Bindher,

I just reproduced your problem and it seems to be a bug and should be reported as a issue in the Issue Tracker section.

I was able to intercept the exception and got the following information : 

   ArgumentException:Value does not fall within the expected range.

      at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)

   at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)

   at MS.Internal.XcpImports.MouseEventArgs_GetPosition(MouseEventArgs args, UIElement relativeTo)

   at System.Windows.Input.MouseEventArgs.GetPosition(UIElement relativeTo)

   at System.Windows.Controls.Primitives.ButtonBase.OnMouseMove(MouseEventArgs e)

   at System.Windows.Controls.Control.OnMouseMove(Control ctrl, EventArgs e)

   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

The reason of the error seems to be that your current transition is removing the slide from the mediaroot and the mouse event is getting fired at the same time.

I tried the following fix and I could not reproduce the bug anymore:

           In the current transition class: (ex: CrossFadeTransition.cs => SkipToFill())

Change the current line: MediaRoot.Children.Remove(fromSlide); 

       To: MediaRoot.Dispatcher.BeginInvoke(() => MediaRoot.Children.Remove(fromSlide));





            MediaRoot.Dispatcher.BeginInvoke(() => MediaRoot.Children.Remove(fromSlide));
            //MediaRoot.Children.Remove(fromSlide);            MediaRoot.Dispatcher.BeginInvoke(() => MediaRoot.Children.Remove(fromSlide));