Skip to content

Program crashes on start #388

Description

@andrii-borzylo-pv

I loaded JSON log file and have selected the JsonColumnizer.
After close it start to crash with NRE every start.

Object reference not set to an instance of an object.\n\n
NullReferenceException
   at LogExpert.Log4jXmlColumnizerConfig.FillDefaults(String[] columnNames)
   at LogExpert.Log4jXmlColumnizerConfig..ctor(String[] columnNames)
   at Void .ctor(System.String[])(Object[])
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at LogExpert.Log4jXmlColumnizer.LoadConfig(String configDir)
   at LogExpert.Classes.PluginRegistry.LoadPluginAssembly(String dllName, String interfaceName)
   at LogExpert.Classes.PluginRegistry.LoadPlugins()
   at LogExpert.Classes.PluginRegistry..ctor()
   at LogExpert.Classes.PluginRegistry.<>c.<.cctor>b__32_0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at LogExpert.Classes.PluginRegistry.get_Instance()
   at LogExpert.Controls.LogWindow.LogWindow..ctor(LogTabWindow parent, String fileName, Boolean isTempFile, Boolean forcePersistenceLoading)
   at LogExpert.Controls.LogTabWindow.LogTabWindow.AddFileTab(String givenFileName, Boolean isTempFile, String title, Boolean forcePersistenceLoading, ILogLineColumnizer preProcessColumnizer, Boolean doNotAddToDockPanel)
   at LogExpert.Controls.LogTabWindow.LogTabWindow.OnLogTabWindowLoad(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Control.CreateControl(Boolean ignoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)

Activity

  1. Hirogen commented on May 22, 2025

    @Hirogen
    Member

    Which version are you using?
    Could you provide a test log file?

  2. added theissue type on May 22, 2025
  3. added
    bugPesky little gritter, needs squashing
    on May 22, 2025
  4. Hirogen commented on May 22, 2025

    @Hirogen
    Member

    Are you sure you selected the json columnizer, because in the exception the "LogExpert.Log4jXmlColumnizer" is shown?

  5. andrii-borzylo-pv commented on May 28, 2025

    @andrii-borzylo-pv
    Author

    Which version are you using? Could you provide a test log file?

    Sorry sure, the version is 1.12.0.0
    It doesn't open any log files. The app is starting empty because the file that was opened last time was deleted.

    Are you sure you selected the json columnizer, because in the exception the "LogExpert.Log4jXmlColumnizer" is shown?

    This is the strange part. I remember switched once to the Xml and it have crashed with a similar message. But after that I switched back to Json. And after app restart I start getting this error constantly. And I tried to remove the XML plugin and managed to start the app normally. Then I tried to switch the columnizer to different options then close the app and return the XML plugin. And the error returns back despite the fact that XML plugin should not be selected.

    I found some hint. If to delete the AppData/Roaming/LogExpert folder - the app start working. There is a file in this folder that I guess the reason of the crash:

    log4jxmlcolumnizer.json

  6. Hirogen commented on May 28, 2025

    @Hirogen
    Member

    thanks for the log, I'll have a look

  7. andrii-borzylo-pv commented on May 28, 2025

    @andrii-borzylo-pv
    Author

    thanks for the log, I'll have a look

    This is not a log file. This is file that LogExpert writes into USER/AppData/Roaming/LogExpert folder
    After removing it - it stop crashing so possibly the reason is in some data containing here.
    Try to drop it into the folder and see if it start crashing on your side.

  8. self-assigned this
    on Jun 5, 2025
  9. added this to the 1.20.0 milestone on Jun 12, 2025
  10. Hirogen commented on Jul 4, 2025

    @Hirogen
    Member

    This is the strange part. I remember switched once to the Xml and it have crashed with a similar message. But after that I switched back to Json. And after app restart I start getting this error constantly. And I tried to remove the XML plugin and managed to start the app normally. Then I tried to switch the columnizer to different options then close the app and return the XML plugin. And the error returns back despite the fact that XML plugin should not be selected.

    I think there maybe a problem with the persister, but not sure, will move this to a later version, since it's not easily reproducible, and the workaround is to delete the json

  11. modified the milestones: 1.20.0, 1.21.0 on Jul 4, 2025
  12. linked a pull request that will close this issuePrepare release #501on Dec 10, 2025
  13. linked a pull request that will close this issueupdate settings, should now no longer be lost #485on Dec 10, 2025
  14. linked a pull request that will close this issuePersister in json #472on Dec 10, 2025
  15. Hirogen commented on Dec 10, 2025

    @Hirogen
    Member

    this should be fixed with version 1.21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugPesky little gritter, needs squashing

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions