Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
582
NotifyPartitionIsZombie Exception - TabControl
posted

I'm getting this error with the new grid when changing tabitems, whie the grid is in one of those tabs, have you guys seen it before?

Will post sourcecode and steps to reproduce.

An unspecified error occurred on the render thread.

at System.Windows.Media.MediaContext.NotifyPartitionIsZombie(Int32 failureCode)

at System.Windows.Media.MediaContext.NotifyChannelMessage()

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.WrappedInvoke(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.DispatchMessage(MSG& msg)

at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)

at System.Windows.Threading.Dispatcher.Run()

at System.Windows.Application.RunDispatcher(Object ignore)

at System.Windows.Application.RunInternal(Window window)

at System.Windows.Application.Run(Window window)

at System.Windows.Application.Run()

at TestTabControl.App.Main() in C:\TEMP\TestTabControl\TestTabControl\obj\Debug\App.g.cs:line 0

at System.AppDomain._nExecuteAssembly(Assembly assembly, String[ args)

at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[ args)

at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading.ThreadHelper.ThreadStart()

 

  • 45
    posted

    Having the same issue -- this crashes our WPF app hard, making it unusable.  Were you able to find a workaround?

     

    Edit: This was reproduced on 32-bit Vista SP1, running .NET 3.5 SP1,  Infragistics 8.2 Express.

  • 582
    posted

    Sourcecode and steps to reproduce:

    Window1.xaml:

    <Window x:Class="TestTabControl.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:DataPresenter="clr-namespace:Infragistics.Windows.DataPresenter;assembly=Infragistics3.Wpf.DataPresenter.v8.2"
        Title="Window1" Height="1000" Width="1000" x:Name="Root">
        <Grid>
            <TabControl>
                <TabItem Header="Tab2">              
                </TabItem>
                <TabItem Header="Tab1">
                    <DataPresenter:XamDataGrid x:Name="Grid1"  DataSource="{Binding List1,ElementName=Root}">
                        <DataPresenter:XamDataGrid.FieldLayoutSettings>
                            <DataPresenter:FieldLayoutSettings AutoGenerateFields="False" AllowAddNew="True">                        </DataPresenter:FieldLayoutSettings>                       
                        </DataPresenter:XamDataGrid.FieldLayoutSettings>
                        <DataPresenter:XamDataGrid.FieldLayouts>
                            <DataPresenter:FieldLayout >
                                <DataPresenter:FieldLayout.FieldSettings>
                                    <DataPresenter:FieldSettings />
                                </DataPresenter:FieldLayout.FieldSettings>
                                <DataPresenter:FieldLayout.Fields>
                                    <DataPresenter:Field Name="Name"></DataPresenter:Field>
                                    <DataPresenter:Field Name="Email"></DataPresenter:Field>
                                </DataPresenter:FieldLayout.Fields>
                            </DataPresenter:FieldLayout>
                        </DataPresenter:XamDataGrid.FieldLayouts>
                    </DataPresenter:XamDataGrid>
                </TabItem>           
            </TabControl>
        </Grid>
    </Window>

    Window1.xaml.cs: 

    namespace TestTabControl
    {
        public partial class Window1 : Window
        {
            private BindingList<TestObject> list1 = new BindingList<TestObject>();
            public BindingList<TestObject> List1
            {
                get { return list1; }
                set { list1 = value; }
            }

            public Window1()
            {
                list1.Add(new TestObject() { Name = "my name", Email = "my email" });
               
                InitializeComponent();
            }

            public class TestObject
            {
                public string Name { get; set; }
                public string Email { get; set; }
            }
        }
    }

    And the steps:

    1. Click in the addNewRecord Row, write a new name, but, do not press enter! Instead click on the empty tab ( tab2 ).

    2. Click again on the first tab, Tab1, all rows have suddenly dissapeared !?

    3. Click in the addNewRecord Row, write a new name this time press enter. the new row moves up in the grid.

    4. Click the other tab again ( Tab2 ) -> The Application crashes.

    I'm using windows xp, .net 3.5 SP1, and infragistics version 8.2