Kromtec / LegendsViewer

Recreates Dwarf Fortress' Legends Mode from exported files.
GNU General Public License v3.0
62 stars 19 forks source link

When opening the page for a specific site, an error happens. #69

Open Uma410 opened 2 years ago

Uma410 commented 2 years ago

If you open the page of the castle "Honeytomb" in this legends export, an unhandled exception occurs, but the program can continue running as normal, it just won't open this specific page.

The error text says: See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at LegendsViewer.Legends.Events.EntityOverthrown.Print(Boolean link, DwarfObject pov) at LegendsViewer.Controls.HTML.HtmlPrinter.PrintEventLog(World world, List1 events, List1 filters, DwarfObject dfo) at LegendsViewer.Controls.HTML.SitePrinter.Print() at LegendsViewer.Controls.HTML.HtmlPrinter.GetHtmlPage() at LegendsViewer.Controls.HTML.HtmlControl.GetControl() at LegendsViewer.Controls.DwarfTabPage.LoadPageControl() at LegendsViewer.Controls.DwarfTabPage.NewPageControl(PageControl pageControl) at LegendsViewer.Controls.DwarfTabControl.Navigate(ControlOption controlOption, Object navigateObject) at LegendsViewer.Controls.Tabs.BaseSearchTab.ListSearch_SelectedIndexChanged(Object sender, EventArgs e) at System.Windows.Forms.ListView.OnSelectedIndexChanged(EventArgs e) at BrightIdeasSoftware.ObjectListView.OnSelectedIndexChanged(EventArgs e) at System.Windows.Forms.ListView.WmReflectNotify(Message& m) at System.Windows.Forms.ListView.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.4515.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll ---------------------------------------- LegendsViewer Assembly Version: 1.20.8.375 Win32 Version: 1.20.08.375 CodeBase: file:///C:/Users/Bruno/Programme/Peridexis%20Errant's%20DF%20Starter%20Pack/LNP/Utilities/Legends%20Viewer/LegendsViewer.exe ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Assembly Version: 4.0.0.0 Win32 Version: 4.8.4488.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.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.0b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.8.4515.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.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.0b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.8.4084.0 built by: NET48REL1 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0b77a5c561934e089/System.Xml.dll ---------------------------------------- ObjectListView Assembly Version: 2.9.1.1072 Win32 Version: 2.9.1.0 CodeBase: file:///C:/Users/Bruno/Programme/Peridexis%20Errant's%20DF%20Starter%20Pack/LNP/Utilities/Legends%20Viewer/ObjectListView.DLL ---------------------------------------- SevenZipSharp Assembly Version: 0.64.3890.29348 Win32 Version: 0.64.3890.29348 CodeBase: file:///C:/Users/Bruno/Programme/Peridexis%20Errant's%20DF%20Starter%20Pack/LNP/Utilities/Legends%20Viewer/SevenZipSharp.DLL ---------------------------------------- CommonMark Assembly Version: 0.1.0.0 Win32 Version: 0.1.0.0 CodeBase: file:///C:/Users/Bruno/Programme/Peridexis%20Errant's%20DF%20Starter%20Pack/LNP/Utilities/Legends%20Viewer/CommonMark.DLL ---------------------------------------- Jdenticon Assembly Version: 2.2.1.0 Win32 Version: 2.2.1.0 CodeBase: file:///C:/Users/Bruno/Programme/Peridexis%20Errant's%20DF%20Starter%20Pack/LNP/Utilities/Legends%20Viewer/Jdenticon.DLL ---------------------------------------- Jdenticon.Gdi Assembly Version: 2.2.1.0 Win32 Version: 2.2.1.0 CodeBase: file:///C:/Users/Bruno/Programme/Peridexis%20Errant's%20DF%20Starter%20Pack/LNP/Utilities/Legends%20Viewer/Jdenticon.Gdi.DLL ----------------------------------------

************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.

JakeTrans commented 2 years ago

Can reproduce the error with this file

Looks to be a issue with EntityOverthrown.cs as the OverthrownHistoricalFigure is returning Null for this line

eventString += OverthrownHistoricalFigure.ToLink(link, pov, this);

creating a new instance of OverthrownHistoricalFigure does seem to prevent the crash