zarunbal/LogExpert

Crash "unhandled error as occured" as soon as a file is opened

Closed this issue · 12 comments

Bug

  • LogExpert Version : 1.8.7
  • Windows Version : Windows Server 2016 standard, full update
  • Lokal file or Network : C:\Program Files\LogExpert\LogExpert.exe
  • Used Columnizer : I don'tjknow what it is. I use the default installation of Logexpert.
  • Is this version specific or a new problem : new problem. Same version of Logexpert works well on other servers.

List of .Net packages installed :
.Net 4.8
image

I double-clic LogExpert.exe from its location in C:
It crashes immediately. The GUI doesn't show up.

[following text translated to english]
Cannot load type 'ColumnizerLib.IFileSystemCallback' from assembly 'ColumnizerLib, Version=1.8.7.0, Culture=neutral, PublicKeyToken=4f1de4c770adbe0a'.

TypeLoadException
à System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
à System.Reflection.RuntimeConstructorInfo.GetParametersNoCopy()
à System.RuntimeType.FilterApplyMethodBase(MethodBase methodBase, BindingFlags methodFlags, BindingFlags bindingFlags, CallingConventions callConv, Type[] argumentTypes)
à System.RuntimeType.GetConstructorCandidates(String name, BindingFlags bindingAttr, CallingConventions callConv, Type[] types, Boolean allowPrefixLookup)
à System.RuntimeType.GetConstructorImpl(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
à System.Type.GetConstructor(BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers)
à LogExpert.PluginRegistry.TryInstantiate[T](Type loadedType, IFileSystemCallback fsCallback)
à LogExpert.PluginRegistry.TryAsFileSystem(Type type)
à LogExpert.PluginRegistry.LoadPlugins()
à LogExpert.PluginRegistry.GetInstance()
à LogExpert.LogWindow..ctor(LogTabWindow parent, String fileName, Boolean isTempFile, Boolean forcePersistenceLoading)
à LogExpert.LogTabWindow.AddFileTab(String givenFileName, Boolean isTempFile, String title, Boolean forcePersistenceLoading, ILogLineColumnizer preProcessColumnizer, Boolean doNotAddToDockPanel)
à LogExpert.LogTabWindow.LoadFiles(String[] names, Boolean invertLogic)
à LogExpert.LogTabWindow.OpenFileDialog()
à System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
à System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
à System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
à System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
à System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
à System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
à System.Windows.Forms.Control.WndProc(Message& m)
à System.Windows.Forms.ToolStrip.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Message for me : this happens on server WEBAPP, client Pastor

does this happen with an ealier version as well?

Working : 1.8.3, 1.8.4, 1.8.5 and pre-release 1.8.329

If its working with the pre-release, that's good, just need to find a way to create a proper release ;D

Hold on.
I moved 1.8.329 into C:\Program Files\LogExpert, and it crashes the same way as 1.8.7
So it's probably something about rights on the directory.

Feel free to give me debug versions if you want to track it down.

Please Check if this could be a problem on your machine => https://github.com/zarunbal/LogExpert/wiki/FAQ#error-during-load-of-plugins see also #55, #13 and #8

I have in the log :
2022-03-26 15:52:54.0573|FATAL|Program|System.Threading.ThreadExceptionEventArgs
2022-03-26 15:52:54.0573|FATAL|Program|System.Threading.ThreadExceptionEventArgs
2022-03-26 15:52:59.6707|ERROR|LogExpert.PluginRegistry|C:\Program Files\LogExpert\plugins\ChilkatDotNet2.dllIt is Cannot load the file or assembly 'file:///C:\Program Files\LogExpert\plugins\ChilkatDotNet2.dll' or one of its dependencies. Attempt to load a program with an incorrect format. System.BadImageFormatException System.BadImageFormatException: Unable to load the file or assembly 'file:///C:\Program Files\LogExpert\plugins\ChilkatDotNet2.dll' or one of its dependencies. Attempt to load a program with an incorrect format.
File name: 'file:///C:\Program Files\LogExpert\plugins\ChilkatDotNet2.dll'
to System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean deleteSecurityChecks)
to System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
to System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
to System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
to System.Reflection.Assembly.Load(String assemblyString)
to LogExpert.PluginRegistry.LoadPlugins()

AVT: Assembly binding logging is disabled.
To enable assembly link failure logging, set the Registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some loss of performance associated with logging assembly link failures.
To disable this feature, delete the Registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

2022-03-26 15:52:59.6707|FATAL|Program|System.Threading.ThreadExceptionEventArgs
2022-03-26 15:52:59.6707|FATAL|Program|System.Threading.ThreadExceptionEventArgs

On ChilkatDotNet2.dll, I see no information saying it comes from internet.

It doesn't seem like the issues you give.

Also note, I have admin rights, as I could copy the files in C:\Program files.
I am logged as domain\administrator so I should not have rights related issues.

There are maybe 2 conflicting dlls, your version tries to load ChilkatDotNet2.dll from the plugins folder, but we use version ChilkatDotNet47.dll, so maybe that's the problem.

Can you confirm that this dll is in your plugin folder?
This particular dll is in the SftpFileSystem.x.zip!

In the plugin directory, I have ChilkatDotNet2.dll 9.1.1.0 (size 5 922 816 bytes).
In the Logexpert archives, there is no such DLL. So I don't know where it comes from...

On other servers, I don't have this plugin in the plugin directory and it works as expected.

So on the server where it crashes, I tried to remove the DLL from the directory. It still crashes.
Log says:

Cannot change type 'ColumnizerLib.IFileSystemCallback' from assembly 'ColumnizerLib, Version=1.8.329.0, Culture=neutral, PublicKeyToken=4f1de4c770adbe0a'.

TypeLoadException
à System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
à System.Reflection.RuntimeConstructorInfo.GetParametersNoCopy()
à System.RuntimeType.FilterApplyMethodBase(MethodBase methodBase, BindingFlags methodFlags, BindingFlags bindingFlags, CallingConventions callConv, Type[] argumentTypes)
à System.RuntimeType.GetConstructorCandidates(String name, BindingFlags bindingAttr, CallingConventions callConv, Type[] types, Boolean allowPrefixLookup)
à System.RuntimeType.GetConstructorImpl(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
à System.Type.GetConstructor(BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers)
à LogExpert.PluginRegistry.TryInstantiate[T](Type loadedType, IFileSystemCallback fsCallback)
à LogExpert.PluginRegistry.TryAsFileSystem(Type type)
à LogExpert.PluginRegistry.LoadPlugins()
à LogExpert.PluginRegistry.GetInstance()
à LogExpert.LogWindow..ctor(LogTabWindow parent, String fileName, Boolean isTempFile, Boolean forcePersistenceLoading)
à LogExpert.LogTabWindow.AddFileTab(String givenFileName, Boolean isTempFile, String title, Boolean forcePersistenceLoading, ILogLineColumnizer preProcessColumnizer, Boolean doNotAddToDockPanel)
à LogExpert.LogTabWindow.LoadFiles(String[] names, Boolean invertLogic)
à LogExpert.LogTabWindow.LogTabWindow_Load(Object sender, EventArgs e)
à System.Windows.Forms.Form.OnLoad(EventArgs e)
à System.Windows.Forms.Form.OnCreateControl()
à System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
à System.Windows.Forms.Control.CreateControl()
à System.Windows.Forms.Control.WmShowWindow(Message& m)
à System.Windows.Forms.Control.WndProc(Message& m)
à System.Windows.Forms.Form.WmShowWindow(Message& m)
à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Just in case, I looked for another ChilkatDotNet DLL on the system. There is no other dll with this name.

Installed and ... it works !
Thanks.

awesome :)