October 31, 2020, 02:21:17 AM

See more Support incidents in our old archived forum.

Author Topic: NullReferenceException when editing the name of a collapsed element  (Read 2653 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: 89
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