April 22, 2025, 04:18:59 AM

See more Support incidents in our old archived forum.

Author Topic: NullReferenceException when editing the name of a collapsed element  (Read 4286 times)

d.laumaille

  • Customers
  • Newbie
  • *
  • Posts: 21
I think I found another bug, sorry ! ^^

I reproduce it in your sample CustomGanttLook :
When it opens, close "Task 3", then enter edition mode in the Task 3 name. When I exit edition mode after that, I've got a NullReferenceException with this stack trace :
Code: [Select]
   à RadiantQ.Windows.Controls.Gantt.ExpanderCue.IsExpandedChangedHandler(DependencyObject obj, DependencyPropertyChangedEventArgs args)
   à System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   à System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   à System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   à System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   à System.Windows.StyleHelper.ApplyTemplatedParentValue(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, DependencyProperty dp, FrameworkElementFactory templateRoot)
   à System.Windows.StyleHelper.InvalidatePropertiesOnTemplateNode(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, Boolean isDetach, FrameworkElementFactory templateRoot)
   à System.Windows.FrameworkTemplate.InvalidatePropertiesOnTemplate(DependencyObject container, Object currentObject)
   à System.Windows.FrameworkTemplate.HandleBeforeProperties(Object createdObject, DependencyObject& rootObject, DependencyObject container, FrameworkElement feContainer, INameScope nameScope)
   à System.Windows.FrameworkTemplate.<>c__DisplayClass6.<LoadOptimizedTemplateContent>b__3(Object sender, XamlObjectEventArgs args)
   à System.Xaml.XamlObjectWriter.OnBeforeProperties(Object value)
   à System.Xaml.XamlObjectWriter.Logic_CreateAndAssignToParentStart(ObjectWriterContext ctx)
   à System.Xaml.XamlObjectWriter.WriteStartMember(XamlMember property)
   à System.Xaml.XamlWriter.WriteNode(XamlReader reader)
   à System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
   à System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
   à System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
   à System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
   à System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
   à System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
   à System.Windows.FrameworkElement.ApplyTemplate()
   à System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   à System.Windows.UIElement.Measure(Size availableSize)
   à MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   à System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   à System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   à System.Windows.UIElement.Measure(Size availableSize)
   à System.Windows.ContextLayoutManager.UpdateLayout()
   à System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   à System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   à System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   à System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   à System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   à MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   à System.Windows.Threading.DispatcherOperation.InvokeImpl()
   à System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   à System.Windows.Threading.DispatcherOperation.Invoke()
   à System.Windows.Threading.Dispatcher.ProcessQueue()
   à System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   à MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   à MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   à MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   à System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   à MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   à MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   à System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   à System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   à System.Windows.Threading.Dispatcher.Run()
   à System.Windows.Application.RunDispatcher(Object ignore)
   à System.Windows.Application.RunInternal(Window window)
   à System.Windows.Application.Run(Window window)
   à System.Windows.Application.Run()
   à CustomGanttLook.App.Main() dans c:\Program Files (x86)\RadiantQ\WPF Gantt 6.5  Release\Samples\ProjectGantt\Appearance\CustomGanttLook\obj\x86\Debug\App.g.cs:ligne 0
   à System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   à System.Threading.ThreadHelper.ThreadStart()

The same bug appears in 4.0 and 4.5 versions...
I think I will try to force open the node when entering edition mode as a workaround, but could you fix it in your next release ?

Thanks in advance !

ForumAdmin

  • Administrator
  • Jr. Member
  • *****
  • Posts: 96
Re: NullReferenceException when editing the name of a collapsed element
« Reply #1 on: July 08, 2015, 05:00:31 PM »
This has been fixed too in our latest version.

What version of .NET are you working with? 4.0 or 4.5?

Thanks
RQ Support

d.laumaille

  • Customers
  • Newbie
  • *
  • Posts: 21
Re: NullReferenceException when editing the name of a collapsed element
« Reply #2 on: July 09, 2015, 01:36:33 PM »
Happy to know it has been fixed !

I'm working with version 4.0