Skip to main content

Microsoft Silverlight

Unanswered Question Silverlight 2 Crash/Exception in Firefox but not in IE6.0RSS Feed

(0)

mbrodersen
mbrodersen

Member

Member

0 points

2 Posts

Silverlight 2 Crash/Exception in Firefox but not in IE6.0

 I am using the following code to change the UI:

         void setUI(UIElement ui)
        {
            RootVisual.Dispatcher.BeginInvoke
            (
                () =>
                {
                    Grid root = RootVisual as Grid;

                    root.Children.Clear();
                    root.Children.Add(ui);
                }
            );
        } 

And it works fine in IE6.0 but not in the latest version of Firefox (3.0.9) if I rapidly click buttons to switch between UIElements. It is a bit random when the crash happens in Firefox. The actual exception that happens is:

 {System.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 exception might happen after clicking a button a few times but sometimes it takes 10+ clicks to make it happen. The setUI() code is called every time a button is clicked. And again: It works fine in IE6.0 but not in Firefox.

 

mbrodersen
mbrodersen

Member

Member

0 points

2 Posts

Re: Silverlight 2 Crash/Exception in Firefox but not in IE6.0

Work around reported here:

http://silverlight.net/forums/t/31071.aspx

But it doesn't fix this problem.

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities