Exception on PersistanceManager.Save

6 posts, 0 answers
  1. Stefan
    Stefan avatar
    19 posts
    Member since:
    Jul 2012

    Posted 06 Nov 2012 Link to this post

    Hello,

    Because of broken Drag on Drop on GridView, I used now latest internal Build 1106.
    I cant serialize my GridView now (Build 1029 works fine).

    Object reference not set to an instance of an object

       at Telerik.Windows.Persistence.Serialization.Serializer.Serialize(Object obj) in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Frameworks\Persistence\Serialization\Serializer.cs:line 77
       at Telerik.Windows.Persistence.PersistenceManager.Save(Object obj) in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Frameworks\Persistence\PersistenceManager.cs:line 91
       at FileExplorer.View.ExplorerWindow.SaveState() in D:\Y\IZTMediaContainer\IZTMediaLibrary\View\ExplorerWindow.xaml.cs:line 105
       at IZTMediaLibrary.View.MainWindow.RadWindow_Closed(Object sender, WindowClosedEventArgs e) in D:\Y\IZTMediaContainer\IZTMediaLibrary\View\MainWindow.xaml.cs:line 83
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at Telerik.Windows.Controls.RadWindow.OnClosed(WindowClosedEventArgs args) in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\Window\RadWindow.cs:line 552
       at Telerik.Windows.Controls.RadWindow.OnClosed() in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\Window\RadWindow.cs:line 677
       at Telerik.Windows.Controls.WindowBase.TryClose(Boolean shouldCloseHost) in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\Window\WindowBase.cs:line 715
       at Telerik.Windows.Controls.WindowBase.TryClose() in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\Window\WindowBase.cs:line 702
       at Telerik.Windows.Controls.WindowBase.Close() in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\Window\WindowBase.cs:line 564
       at Telerik.Windows.Controls.WindowBase.<.cctor>b__0(WindowBase w) in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\Window\WindowBase.cs:line 205
       at Telerik.Windows.Controls.CommandsHelper.TryCast[T](Object value, Action`1 action) in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\Window\CommandsHelper.cs:line 60
       at Telerik.Windows.Controls.CommandsHelper.<>c__DisplayClass5`1.<RegisterClassHandler>b__3(Object s, ExecutedRoutedEventArgs e) in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Controls\Navigation\Window\CommandsHelper.cs:line 16
       at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
       at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
       at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
       at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
       at System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
       at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
       at System.Windows.Controls.Primitives.ButtonBase.OnClick()
       at System.Windows.Controls.Button.OnClick()
       at Telerik.Windows.Controls.RadButton.OnClick() in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Core\Controls\Buttons\RadButton.cs:line 389
       at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
       at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
       at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(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, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

  2. Stefan
    Stefan avatar
    19 posts
    Member since:
    Jul 2012

    Posted 06 Nov 2012 Link to this post

    you example application is not working too
    http://ysoft.de/373452_HierarchicalGridViewSerialization.zip
  3. UI for WPF is Visual Studio 2017 Ready
  4. PW
    PW avatar
    13 posts
    Member since:
    May 2009

    Posted 07 Nov 2012 Link to this post

    We, too, are experiencing the same problem with the latest internal build.  We had to move onto this build because the latest release had a crash involving the re-ordrering of radgridview columns via drag/drop.

    Currently we are blocked.  The second line (below) crashes with a null reference exception:

    PersistenceManager manager = new PersistenceManager(); 

     

    Stream str = manager.Save(this.radGridView1);

    This occurs when we attempt to persist column settings for the RadGridView (exactly the way you demonstrate it in your samples).

    Help!


  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 08 Nov 2012 Link to this post

    Hi guys,

    Thank you for reporting this issue. We managed to isolate its cause in the GridViewLength type - the type of the columns Width. However we'll need more time to further investigate it and look for solutions.

    In the meantime you can workaround the issue by introducing a new class - for example ColumnWidth, to hold the settings of the GridViewLength type. This means that in the GridViewCustomPropertyProvider implementation, instead of saving the Columns Width, you'll save the Columns Width DesiredValue, DisplayValue, UnitType and Value properties.

    I modified the HierarchicalGridViewSerializaiton sample to demonstrate this approach - all modifications are implemented in the way the RadGridView.Columns.Width property is persisted. Please give it a try and let me know if it helps.

    Kind regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Jeff
    Jeff avatar
    25 posts
    Member since:
    Feb 2009

    Posted 19 Dec 2012 Link to this post

    Is there an item in PITS that we could track to know whether this issue gets fixed in an upcoming build?
  7. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 21 Dec 2012 Link to this post

    Hello Jeff,

    This issue is already fixed and you can test your application with the Q3 2012 SP release. Let us know if you encounter any issues with it.

    Greetings,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready