Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoColumnize throws an Exception with multiple files if no bookmarks are found #102

Closed
Hirogen opened this issue Apr 12, 2019 · 11 comments
Closed
Labels
bug Pesky little gritter, needs squashing

Comments

@Hirogen
Copy link
Collaborator

Hirogen commented Apr 12, 2019

Drag and Dropped 2 logfiles in the empty (new instance) of logexpert
This did happen a few Times, due to an important log analysis I had to switch to 1.6.13, after that I couldn't reproduce the error :/

The Exception in the bottom have been thrown (logexpert needed to be closed shutdown), after restarting the same problem.

  • LogExpert Version: 1.6.14
  • Windows Version: yes
  • Network: 2 files from network
  • AutoColumnizer was chosen automatically
  • Can only happen with Version 1.6.14+, AutoColumnizer was added!
  • Size of the files
    1.) 350mb
    2.) 250mb

Feature

AutoColumnicer

IMPORTANT NOTE:
Filename + Folders was about 244 Characters long!

The method or operation is not implemented.

NotImplementedException
at LogExpert.AutoColumnizer.GetColumnNames()
at LogExpert.PaintHelper.SetColumnizer(ILogLineColumnizer columnizer, DataGridView gridView)
at LogExpert.Dialogs.BookmarkWindow.SetColumnizer(ILogLineColumnizer columnizer)
at LogExpert.Dialogs.BookmarkWindow.SetCurrentFile(FileViewContext ctx)
at LogExpert.LogTabWindow.dockPanel_ActiveContentChanged(Object sender, EventArgs e)
at WeifenLuo.WinFormsUI.Docking.DockPanel.OnActiveContentChanged(EventArgs e)
at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.RefreshActiveWindow()
at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.HookEventHandler(Object sender, HookEventArgs e)
at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.LocalWindowsHook.OnHookInvoked(HookEventArgs e)
at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.LocalWindowsHook.CoreHookProc(Int32 code, IntPtr wParam, IntPtr lParam)

Luckily Logexpert logs its own logfile in the app-data of the user following exception was inserted there:
2019-04-12 10:29:10.3165|ERROR|LogExpert.LogWindow|Error loading bookmarks: Could not find file 'C:\Users\Username\Documents\LogExpert\LOGFILEWITHLONGNAME(244characters).log.lxp'. System.IO.FileNotFoundException System.IO.FileNotFoundException: Could not find file 'LOGFILEWITHLONGNAME(360characters).log.lxp'.
File name: 'LOGFILEWITHLONGNAME(360characters).log.lxp'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at LogExpert.Persister.Load(String fileName)
at LogExpert.LogWindow.LoadPersistenceData()
2019-04-12 10:32:07.1623|ERROR|LogExpert.LogWindow|Error loading bookmarks: Could not find file 'C:\Users\Username\Documents\LogExpert\LOGFILEWITHLONGNAME(244characters).log.lxp'. System.IO.FileNotFoundException System.IO.FileNotFoundException: Could not find file 'LOGFILEWITHLONGNAME(244characters).log.lxp'.
File name: 'LOGFILEWITHLONGNAME(244characters).log.lxp'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at LogExpert.Persister.Load(String fileName)
at LogExpert.LogWindow.LoadPersistenceData()
2019-04-12 10:35:55.2753|INFO|Program|

  • 2nd Exception same Problem:

2019-04-12 10:37:30.9754|ERROR|LogExpert.LogWindow|Error loading bookmarks: Could not find file 'C:\Users\Username\Documents\LogExpert\D__Logs_nlog.log.lxp'. System.IO.FileNotFoundException System.IO.FileNotFoundException: Could not find file 'C:\Users\Username\Documents\LogExpert\D__Logs_nlog.log.lxp'.
File name: 'C:\Users\Username\Documents\LogExpert\D__Logs_nlog.log.lxp'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at LogExpert.Persister.Load(String fileName)
at LogExpert.LogWindow.LoadPersistenceData()

zarunbal added a commit that referenced this issue Apr 13, 2019
removed Text from ILogLineColumnizer interface
moved GetPriority from ILogLineColumnizer  to IColumnizerPriority interface
@zarunbal
Copy link
Owner

Workaround could be to set the default columnizer again to "Default (single line)" in the Settings under Tools -> Settings

Was one or both files already opened and did you create some bookmarks for this? Currently I'm not able to reproduce this error. Maybe it could help to delete the "session" directory located here
<user dir>\Documents\LogExpert\. Did you use MultiFile or Single File?

@Hirogen
Copy link
Collaborator Author

Hirogen commented Apr 15, 2019

Currently trying to reproduce the exception, did It once today, but can not figure out what the problem seems to be.

Last time I had 5 Instances open and the same exception occurred.

Seems to happen, if a Bookmark is created in one instance and somehow the new instance trys to find the bookmark in the new logfile.

Will be testing a little bit more. Hopefully I can find a way to easily recreate it.

@Hirogen
Copy link
Collaborator Author

Hirogen commented Apr 25, 2019

I could finally reproduce it, reliable.

5 Logfiles in Folder structure
Drag and Drop 5 Folders (with the logfiles) into logexpert => will not open
Close the first with "strg + w" / "ctrl + w"

grafik

@Hirogen
Copy link
Collaborator Author

Hirogen commented Apr 25, 2019

Here the full exception from the dialog:

The method or operation is not implemented.
NotImplementedException
at LogExpert.AutoColumnizer.GetColumnNames()
at LogExpert.PaintHelper.SetColumnizer(ILogLineColumnizer columnizer, DataGridView gridView)
at LogExpert.Dialogs.BookmarkWindow.SetColumnizer(ILogLineColumnizer columnizer)
at LogExpert.Dialogs.BookmarkWindow.SetCurrentFile(FileViewContext ctx)
at LogExpert.LogTabWindow.dockPanel_ActiveContentChanged(Object sender, EventArgs e)
at WeifenLuo.WinFormsUI.Docking.DockPanel.OnActiveContentChanged(EventArgs e)
at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.RefreshActiveWindow()
at WeifenLuo.WinFormsUI.Docking.DockPanel.FocusManagerImpl.ResumeFocusTracking()
at WeifenLuo.WinFormsUI.Docking.DockPanel.ResumeLayout(Boolean performLayout, Boolean allWindows)
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.set_DockPanel(DockPanel value)
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Dispose(Boolean disposing)
at WeifenLuo.WinFormsUI.Docking.DockContentHandler.Form_Disposed(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.ComponentModel.Component.Dispose(Boolean disposing)
at System.Windows.Forms.Control.Dispose(Boolean disposing)
at System.Windows.Forms.Form.Dispose(Boolean disposing)
at System.Windows.Forms.Form.WmClose(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

@zarunbal zarunbal added the bug Pesky little gritter, needs squashing label May 9, 2019
@zarunbal
Copy link
Owner

zarunbal commented May 9, 2019

Ok, I think I'm able to reproduce your error.

  • create 5 folder with one log file in it
  • drag and drop the created 5 folder
  • close one tab with "ctrl + w"
  • -> Exception

I understand this is a error, but is this a use case? Or do I miss a point?

@miltob
Copy link

miltob commented May 14, 2019

Hi guys,

I am able to reproduce it. I'll working on this if you don't mind.

@zarunbal
Copy link
Owner

Feel free, I really appreciate this help!

@miltob
Copy link

miltob commented May 14, 2019

So far I find it's easy to reproduce this problem in 1.6.14 but not in latest master or development branch.

To reproduce this problem on 1.6.14:

  1. Create two files.
  2. First file with name: 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901.log.txt
  3. Second file with name: 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890.log.lll
  4. Open both files with LogExpert.
  5. Close LogExpert.
  6. Change the postfix of both file to something different.
  7. Open LogExpert again.
  8. Click the first tab.
  9. Get exception above and LogExpert crashes.

I believe this problem has been fixed in 1.7.0. @Hirogen please try it here https://github.com/zarunbal/LogExpert/releases/tag/v1.7.0

However, I'll submit a refactor anyway.

miltob pushed a commit to miltob/LogExpert that referenced this issue May 14, 2019
… are found zarunbal#102

Update the AutoColumnizer logic to fix the bug.
miltob pushed a commit to miltob/LogExpert that referenced this issue May 14, 2019
… are found zarunbal#102

Update the AutoColumnizer logic to fix the bug.
miltob pushed a commit to miltob/LogExpert that referenced this issue May 14, 2019
… are found zarunbal#102

Update the AutoColumnizer logic to fix the bug.
miltob pushed a commit to miltob/LogExpert that referenced this issue May 14, 2019
… are found zarunbal#102

Update the AutoColumnizer logic to fix the bug.
@Hirogen
Copy link
Collaborator Author

Hirogen commented May 17, 2019

I will test it on monday

@Hirogen
Copy link
Collaborator Author

Hirogen commented May 21, 2019

Ok, I think I'm able to reproduce your error.
* create 5 folder with one log file in it
* drag and drop the created 5 folder
* close one tab with "ctrl + w"
* -> Exception
I understand this is a error, but is this a use case? Or do I miss a point?

So with 1.7.0 i couldn't recreate the exception, currently It seems to be fixed.

Regarding the use case. I work a lot with big logfiles in different folders, we have between 1 and 10 Workstations that generate Logfiles and sometimes I need to check 3-4, so I just drag and drop the logfiles in the window and sometimes I forget that files in a folder structure are not opened (I create a separate issue for that)

@Hirogen Hirogen closed this as completed May 21, 2019
@zarunbal
Copy link
Owner

Thank you @Hirogen for the testing!

miltob pushed a commit to miltob/LogExpert that referenced this issue May 30, 2019
… are found zarunbal#102

Update the AutoColumnizer logic to fix the bug.
miltob pushed a commit to miltob/LogExpert that referenced this issue May 30, 2019
… are found zarunbal#102

Update the AutoColumnizer logic to fix the bug.
miltob pushed a commit to miltob/LogExpert that referenced this issue May 30, 2019
… are found zarunbal#102

Update the AutoColumnizer logic to fix the bug.
miltob pushed a commit to miltob/LogExpert that referenced this issue Jun 14, 2019
… are found zarunbal#102

Update the AutoColumnizer logic to fix the bug.
miltob pushed a commit to miltob/LogExpert that referenced this issue Jul 24, 2019
miltob pushed a commit to miltob/LogExpert that referenced this issue Jul 24, 2019
… are found zarunbal#102

All UI control operations should happens when the parent is loaded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Pesky little gritter, needs squashing
Projects
None yet
Development

No branches or pull requests

3 participants