TabularEditor icon indicating copy to clipboard operation
TabularEditor copied to clipboard

"Object reference not set to an instance of an object" when adding relationship

Open martin-guth opened this issue 10 months ago • 0 comments

Description I started a fresh data model with one fact table and multiple dimension tables. Some dimension tables act as role playing dimensions. I added multiple relationships to the same dimension table starting from the fact table. Then I noticed the following error message "Object reference not set to an instance of an object (Stack Trace see below). I tried to isolate the problematic component and could trace it back to one Dimension table (Dauer / Duration) which has 5 relationships from the fact table ingoing. Oddly enough...if I add these relationships first and then finish off with a relationship to another table (just one relationship from the fact table...no role playing involved) no error is shown.

To Reproduce Steps to reproduce the behavior:

  1. Click in Tom Editor on fact table column and create relationship using context menu new relationship
  2. Keep doing this for a couple of relationships and finish with a role playing dimension having multiple relationship from different columns in one fact table to the same column of the dimension table.

Expected behavior Multiple relationships to role playing dimensions are supported regardless in which order they are added

Observed behavior The order of addition of these relationships seems to have a connection to the error message. If I don't end with the role playing dimension everything works fine and no error is shown.

Application specifics

  • Tabular Editor 2.X version: 2.26.0
  • Semantic Engine used: SSAS 2022
  • Model Compatibility Level: 1600

Additional context System.NullReferenceException: Object reference not set to an instance of an object. at TabularEditor.UI.UIController.ContextMenu_DynamicMenuOpening(Object sender, EventArgs e) at System.Windows.Forms.ToolStripDropDownItem.OnDropDownShow(EventArgs e) at System.Windows.Forms.ToolStripMenuItem.OnDropDownShow(EventArgs e) at System.Windows.Forms.ToolStripDropDownItem.ShowDropDownInternal() at System.Windows.Forms.ToolStripDropDownItem.ShowDropDown(Boolean mousePush) at System.Windows.Forms.ToolStripMenuItem.OnMouseButtonStateChange(MouseEventArgs e, Boolean isMouseDown) at System.Windows.Forms.ToolStripMenuItem.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseDown(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseDown(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.8.4775.0 built by: NET48REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

TabularEditor Assembly Version: 2.26.9218.28510 Win32 Version: 2.26.9218.28510 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/TabularEditor.exe

System Assembly Version: 4.0.0.0 Win32 Version: 4.8.4770.0 built by: NET48REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

TOMWrapper Assembly Version: 2.26.9218.26604 Win32 Version: 2.26.9218.28510 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/TabularEditor.exe

System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.8.4739.0 built by: NET48REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.8.4762.0 built by: NET48REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

Microsoft.AnalysisServices.Core Assembly Version: 19.90.0.0 Win32 Version: 17.0.12.18 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/Microsoft.AnalysisServices.Core.DLL

System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.8.4690.0 built by: NET48REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll

System.Net.Http Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll

Microsoft.Identity.Client Assembly Version: 4.70.0.0 Win32 Version: 4.70.0.0 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/Microsoft.Identity.Client.DLL

Microsoft.AnalysisServices Assembly Version: 19.90.0.0 Win32 Version: 17.0.12.18 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/Microsoft.AnalysisServices.DLL

Microsoft.AnalysisServices.Tabular Assembly Version: 19.90.0.0 Win32 Version: 17.0.12.18 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/Microsoft.AnalysisServices.Tabular.DLL

Microsoft.AnalysisServices.SPClient.Interfaces Assembly Version: 19.90.0.0 Win32 Version: 17.0.12.18 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/Microsoft.AnalysisServices.SPClient.Interfaces.DLL

Microsoft.AnalysisServices.Tabular.Json Assembly Version: 19.90.0.0 Win32 Version: 17.0.12.18 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/Microsoft.AnalysisServices.Tabular.Json.DLL

System.Xml.Linq Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll

Microsoft.Identity.Client.Broker Assembly Version: 4.70.0.0 Win32 Version: 4.70.0.0 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/Microsoft.Identity.Client.Broker.DLL

Microsoft.Identity.Client.NativeInterop Assembly Version: 0.18.1.0 Win32 Version: 0.18.1.0 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/Microsoft.Identity.Client.NativeInterop.DLL

Microsoft.IdentityModel.Abstractions Assembly Version: 8.7.0.0 Win32 Version: 8.7.0.60321 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/Microsoft.IdentityModel.Abstractions.DLL

System.Buffers Assembly Version: 4.0.3.0 Win32 Version: 4.6.28619.01 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/System.Buffers.DLL

System.Diagnostics.DiagnosticSource Assembly Version: 7.0.0.2 Win32 Version: 7.0.423.11508 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/System.Diagnostics.DiagnosticSource.DLL

System.IO.Compression Assembly Version: 4.0.0.0 Win32 Version: 4.8.4762.0 built by: NET48REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.IO.Compression/v4.0_4.0.0.0__b77a5c561934e089/System.IO.Compression.dll

System.Memory Assembly Version: 4.0.1.2 Win32 Version: 4.6.31308.01 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/System.Memory.DLL

System.Net.Http.WebRequest Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http.WebRequest/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.WebRequest.dll

System.Numerics.Vectors Assembly Version: 4.1.4.0 Win32 Version: 4.6.26515.06 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/System.Numerics.Vectors.DLL

System.Runtime.CompilerServices.Unsafe Assembly Version: 6.0.0.0 Win32 Version: 6.0.21.52210 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/System.Runtime.CompilerServices.Unsafe.DLL

Newtonsoft.Json Assembly Version: 13.0.0.0 Win32 Version: 2.26.9218.28510 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/TabularEditor.exe

System.Design Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Design/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Design.dll

FastColoredTextBox Assembly Version: 2.16.24.0 Win32 Version: 2.26.9218.28510 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/TabularEditor.exe

Crad.Windows.Forms.Actions Assembly Version: 2.0.0.0 Win32 Version: 2.26.9218.28510 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/TabularEditor.exe

Antlr4.Runtime Assembly Version: 4.6.0.0 Win32 Version: 2.26.9218.28510 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/TabularEditor.exe

Microsoft.WindowsAPICodePack Assembly Version: 1.1.2.0 Win32 Version: 2.26.9218.28510 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/TabularEditor.exe

System.Numerics Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll

System.Runtime.Serialization Assembly Version: 4.0.0.0 Win32 Version: 4.8.4729.0 built by: NET48REL1LAST_B CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll

Accessibility Assembly Version: 4.0.0.0 Win32 Version: 4.8.3761.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

Microsoft.WindowsAPICodePack.Shell Assembly Version: 1.1.0.0 Win32 Version: 2.26.9218.28510 CodeBase: file:///C:/Program%20Files%20(x86)/Tabular%20Editor/TabularEditor.exe

martin-guth avatar Apr 01 '25 13:04 martin-guth