TabularEditor / TabularEditor3

Bug reports, feature requests, discussion and documentation for Tabular Editor 3 (commercial version).
65 stars 7 forks source link

Getting the following message without an indication of where the error is: "Object reference not set to an instance of an object" #617

Open dpesante opened 2 years ago

dpesante commented 2 years ago

I am getting the following error when I run my C# script.

"Object reference not set to an instance of an object"

The issue is the it is not telling me where or which object is having this issue. I placed several "Info" boxes and I get this error after the last line executes in my script.

How do I go about debugging this. Is there a way to force a dump of where it blew up?

Any help on this would be greatly appreciated.

thanks!

dpesante commented 2 years ago

Here is a short video with what I am seeing: https://www.screencast.com/t/y1vFIWTYc

Here is the dump: Tabular Editor Unhandled Exception Error Report

Tabular Editor version: 3.3.3 (3.3.8233.2685) OS version: Microsoft Windows NT 10.0.19044.0 Model details: CompatibilityLevel: 1550 CompatibilityMode: PowerBI IsPbiDesktop: True SourceType: Database TableCount: 44 FirstTimeModelLoad: False DatabaseNameSHA256: 331b9f62ab74d1417bee2461db98fff10e49e803ffe13737 ServerVersion: 16.0.36.23 ServerLocation: OnPremise ServerProductLevel: RTM ServerProductName: Microsoft SQL Server Analysis Services ServerEdition: Enterprise64 ServerNameSHA256: 44d94d15149af2699afbd9942e68dc88cfe0aa072e1a9c08 User description: Exception message: Object reference not set to an instance of an object. Exception source: TOMWrapper Stack trace: at TabularEditor.TOMWrapper.Folder.CreateFolder(Table table, String path) at TabularEditor.TOMWrapper.TabularTree.BuildFolderForObject(IFolderObject obj) at TabularEditor.TOMWrapper.TabularTree.RebuildFolderCacheForTable(Table table) at TabularEditor.TOMWrapper.TabularTree.EndUpdate() at TabularEditor.UI.ViewModels.TabularExplorerData.EndUpdate() at TabularEditor.TOMWrapper.TabularModelHandler.EndUpdateAll(Boolean rollback) at TabularEditor.UI.Services.Actions.ModelAction.InternalExecute(Object arg, IEnumerable`1 alternateSelection) at TabularEditor.UI.Services.Actions.ModelAction.Execute(Object arg) at TabularEditor.UI.Utils.LinkWithModelAction.ExecuteLink() at TabularEditor.UI.Utils.SimpleLink.Click(Object sender, EventArgs e) at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link) at DevExpress.XtraBars.BarBaseButtonItem.OnClick(BarItemLink link) at DevExpress.XtraBars.BarButtonItem.OnClick(BarItemLink link) at DevExpress.XtraBars.BarItemLink.OnLinkClick() at DevExpress.XtraBars.BarButtonItemLink.OnLinkClick() at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs) at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link) at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link) at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e) at DevExpress.XtraBars.Controls.CustomPopupBarControl.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at DevExpress.XtraEditors.XtraControl.WndProc(Message& m) at DevExpress.XtraBars.Controls.CustomControl.WndProc(Message& msg) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam) Modules loaded: TabularEditor3.dll

otykier commented 2 years ago

Thanks for reporting and for the detailed video. Unfortunately, we're not able to reproduce this with the information you provided. Any chance you could share the C# script or some other step-by-step instructions on how to bring the model into the state where all table DAX script / delete attempts fail?

dpesante commented 2 years ago

Hi… I did find a workaround (basically delete all the tables that I will be recreating up front vs throughout the script). Looks like something was not done in the right order and ended up casing the crash. Once I changed the code to delete all the tables first, the problem went away.

I know this does not help you figure out what the problem was but at this point, the work around is a good solution for my case. If I can replicate with a smaller “non-proprietary” script, I will be more than happy to send it over… 😊

Thanks!

dp

From: Daniel Otykier @.> Sent: Monday, August 1, 2022 4:12 AM To: TabularEditor/TabularEditor3 @.> Cc: David Pesante @.>; Author @.> Subject: Re: [TabularEditor/TabularEditor3] Getting the following message without an indication of where the error is: "Object reference not set to an instance of an object" (Issue #617)

Thanks for reporting and for the detailed video. Unfortunately, we're not able to reproduce this with the information you provided. Any chance you could share the C# script or some other step-by-step instructions on how to bring the model into the state where all table DAX script / delete attempts fail?

— Reply to this email directly, view it on GitHubhttps://github.com/TabularEditor/TabularEditor3/issues/617#issuecomment-1200932685, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABGAVZPFL2RVGKLKBBAC75TVW6IFJANCNFSM55DXJUOA. You are receiving this because you authored the thread.Message ID: @.**@.>>