Skip to content

NullReferenceException when loading a new log file without persistence data #493

@AndisGrossteins

Description

@AndisGrossteins

I'm seeing this on recent snapshot builds when loading a log file without saved persistence data:

2025-11-25 15:02:48.1585|ERROR|LogExpert.Core.Classes.Log.LogfileReader|System.NullReferenceException: Object reference not set to an instance of an object.Object reference not set to an instance of an object. System.NullReferenceException System.NullReferenceException: Object reference not set to an instance of an object.
   at LogExpert.UI.Controls.LogWindow.LogWindow.LoadPersistenceData() in D:\a\LogExpert\LogExpert\src\LogExpert.UI\Controls\LogWindow\LogWindow.cs:line 2489
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
--- End of stack trace from previous location ---
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method)
   at LogExpert.UI.Controls.LogWindow.LogWindow.OnLogFileReaderFinishedLoading(Object sender, EventArgs e) in D:\a\LogExpert\LogExpert\src\LogExpert.UI\Controls\LogWindow\LogWindow.cs:line 832
   at LogExpert.Core.Classes.Log.LogfileReader.OnLoadingFinished() in D:\a\LogExpert\LogExpert\src\LogExpert.Core\Classes\Log\LogfileReader.cs:line 1819
   at LogExpert.Core.Classes.Log.LogfileReader.MonitorThreadProc() in D:\a\LogExpert\LogExpert\src\LogExpert.Core\Classes\Log\LogfileReader.cs:line 1458

Closing and subsequently opening same log file doesn't produce the exception because there's a persistence file now.

Currently I'm running LogExpert snapshot downloaded yesterday from action run 19582622322.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions