Unhandled Exception error

241 views
Skip to first unread message

Anish

unread,
Mar 16, 2021, 6:57:05 PM3/16/21
to ImageGlass Community
I like this program but when I am browsing a network share (files on a NAS box - mapped network drive in Windows 10 Pro) i often get this Unhandled Exception error (see attached picture). Please advise !
error.PNG

Duong Dieu Phap

unread,
Apr 9, 2021, 8:16:15 AM4/9/21
to ImageGlass Community
This error was fixed in the latest build of IG Moon, you can try it at https://imageglass.org/moon/ 

Allan Holdt

unread,
May 12, 2021, 9:27:09 AM5/12/21
to ImageGlass Community
I see this error too when trying to save files opened from a network share.. 
I have tried ImageGlass Moon 8.1.5.2, and this will sometimes open the Save dialog. It is not consistent, but it seems to work first first time on a new install, and will fail thereafter.


2021-05-12_15-24-47.png

2021-05-12_15-25-37.png

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

************** Exception Text **************
System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
   at System.String.Substring(Int32 startIndex, Int32 length)
   at ImageGlass.frmMain.mnuMainSaveAs_Click(Object sender, EventArgs e)
   at ImageGlass.frmMain.mnuSaveImage_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.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.4300.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
ImageGlass
    Assembly Version: 8.1.5.2
    Win32 Version: 8.1.5.2
    CodeBase: file:///C:/ILVA.net/ImageGlass/ImageGlass.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4300.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.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
ImageGlass.Services
    Assembly Version: 8.0.7792.18301
    Win32 Version: 8.0.7792.18301
    CodeBase: file:///C:/ILVA.net/ImageGlass/ImageGlass.Services.DLL
----------------------------------------
ImageGlass.Base
    Assembly Version: 1.3.0.0
    Win32 Version: 1.3.0.0
    CodeBase: file:///C:/ILVA.net/ImageGlass/ImageGlass.Base.DLL
----------------------------------------
ImageGlass.Settings
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.0.0
    CodeBase: file:///C:/ILVA.net/ImageGlass/ImageGlass.Settings.DLL
----------------------------------------
ImageGlass.Library
    Assembly Version: 8.0.7780.41822
    Win32 Version: 8.0.7780.41822
    CodeBase: file:///C:/ILVA.net/ImageGlass/ImageGlass.Library.DLL
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4320.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
----------------------------------------
ImageGlass.UI
    Assembly Version: 8.0.7792.18301
    Win32 Version: 8.0.7792.18301
    CodeBase: file:///C:/ILVA.net/ImageGlass/ImageGlass.UI.DLL
----------------------------------------
ImageGlass.Heart
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.0.0
    CodeBase: file:///C:/ILVA.net/ImageGlass/ImageGlass.Heart.DLL
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Magick.NET-Q16-OpenMP-x64
    Assembly Version: 7.23.4.0
    Win32 Version: 7.23.4.0
    CodeBase: file:///C:/ILVA.net/ImageGlass/Magick.NET-Q16-OpenMP-x64.DLL
----------------------------------------
Magick.NET.Core
    Assembly Version: 6.2.0.0
    Win32 Version: 6.2.0.0
    CodeBase: file:///C:/ILVA.net/ImageGlass/Magick.NET.Core.DLL
----------------------------------------
Magick.NET.SystemDrawing
    Assembly Version: 2.0.15.0
    Win32 Version: 2.0.15.0
    CodeBase: file:///C:/ILVA.net/ImageGlass/Magick.NET.SystemDrawing.DLL
----------------------------------------
FileWatcherEx
    Assembly Version: 1.3.0.0
    Win32 Version: 1.3.0.0
    CodeBase: file:///C:/ILVA.net/ImageGlass/FileWatcherEx.DLL
----------------------------------------
ImageGlass.ImageBox
    Assembly Version: 8.0.7777.26600
    Win32 Version: 8.0.7777.26600
    CodeBase: file:///C:/ILVA.net/ImageGlass/ImageGlass.ImageBox.DLL
----------------------------------------
ImageGlass.ImageListView
    Assembly Version: 11.0.0.7
    Win32 Version: 11.0.0.7
    CodeBase: file:///C:/ILVA.net/ImageGlass/ImageGlass.ImageListView.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.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3761.0 built by: NET48REL1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.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:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

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.





Regards
Allan

lifeatt...@gmail.com

unread,
May 12, 2021, 10:55:29 AM5/12/21
to ImageGlass Community
Hi Allan -
>I see this error too when trying to save files opened from a network share.. 

Thanks for the detailed report! I'm having trouble actually reproducing the problem, although I can see where the problem is likely to be.

There seems to be something very specific going on here - I wonder if you can give me a few more details? Are you viewing an image from the clipboard or have cropped an image? What is an example of a network share path that is giving you problems? 

Thank you in advance,
Kevin

Allan Holdt

unread,
May 14, 2021, 3:09:39 AM5/14/21
to ImageGlass Community
Hi Kevin

I have done a bit more testing.

Quick note: 
I am looking to replace Microsoft Photo Viewer with ImageGlass on Windows Server 2019, so all my testing up until now has been done on server.
I have done a quick test on Windows 10 (20H2) as well, using same version of ImageGlas Moon, and I see the same error here.

What I am doing, is basically double-clicking on a file on a network share to open it in ImageGlass, then I click the menu top right and choose File -> Save Image As. 

The error seems to be linked to the number of files on the network share. I have 3 folders with a large number of files (15.000, 45.000 and 375.000 respectively). Files in folders are a mix of different filetypes, JPEG, TIFF, PDF etc.

On Windows Server the Save As dialog crashes on the folder with 375.000 files, but works on the two other folders.
On Windows 10, the Save As dialog crashes on all 3 folders. I made a test folder with a smaller amount of files (~50), and here it works.

Some of the files have very long and weird filenames, but I have tested by copying these files to a local disk and opening, and I see no error here.
As far as I can see, the images are not cropped in any way. Most are saved by our customer service department, and are images taken by customers with various types of mobile phones.


Hope this helps
Allan

Duong Dieu Phap

unread,
May 14, 2021, 3:18:37 AM5/14/21
to ImageGlass Community
It's probably due to the real-time file watcher engine.

I will investigate.




--
ImageGlass community
www.imageglass.org
---
You received this message because you are subscribed to a topic in the Google Groups "ImageGlass Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/imageglass/ZgdfAvJ9Ffg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to imageglass+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/imageglass/cbeb1a00-0620-4eb2-a315-ebb9a5b99d6bn%40googlegroups.com.

lifeatt...@gmail.com

unread,
May 15, 2021, 11:00:41 AM5/15/21
to ImageGlass Community
>The error seems to be linked to the number of files on the network share. I have 3 folders with a large number of files (15.000, 45.000 and >375.000 respectively). Files in folders are a mix of different filetypes, JPEG, TIFF, PDF etc.

Thanks, Allan, for the additional details! I'll set up some folders with a large number of images on my network shares and try some more testing.
Kevin

lifeatt...@gmail.com

unread,
May 15, 2021, 2:16:08 PM5/15/21
to ImageGlass Community
Allan -
I have successfully reproduced the problem on my own network. I don't have a fix for this yet.

>The error seems to be linked to the number of files on the network share.

You are absolutely correct. In this situation, what I've found is that ImageGlass doesn't display the image path and file details in the title bar for a period of time. That period of time takes longer for a folder with a large number of images, especially across the network.

In my testing it took about 3 seconds for a folder of 11,500 files; 19 seconds for a folder of 117,000 files.

While the image path/details are NOT displayed, File/SaveAs will not work. I.e. you can see the file you selected but IG won't let you Save it. There may be other things that fail too, I'm still testing.

Thanks for the help!
Kevin
Reply all
Reply to author
Forward
0 new messages