d2phap / d2phap/ImageGlass

Accessing images via URN often results in IG becoming unresponsive

Open
#2,193 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🐞 bug
Dominant language
C#
Stars
14.4k
Forks
752
Avg merge
10d 14h
Merged PRs (30d)
1

Description

Windows OS version

Windows 11 24H2

ImageGlass version

9.3.2.520

ImageGlass release

Classic

1️⃣ Steps to reproduce

Open an image file (via double click) that IG is associated with. The file should be accessed via a URN (e.g. \server\media\images\example.jpg) not a drive letter (D:\images\example.jpg). Failure rate is not 100%, so this may need to be tried repeatedly.

2️⃣ Actual behavior

Sometimes the image will open fine, sometimes IG will become unresponsive and need to be force closed.

3️⃣ Expected behavior

IG should open (via double click) any undamaged, supported, and associated image without issue.

4️⃣ Screenshots / Video / Sample image file

No response

5️⃣ Additional context

With ImageGlass set as the default handler for all the image types it supports, opening an image (via double click) from any location that is assigned a letter works fine (e.g. D: or X:)- regardless of whether the location is local or on a network.

However, attempting to open an image (via double clicking) from a network location using a URN rather than a drive letter (e.g. \server\media\images\example.jpg rahter than D:\images\example.jpg) sometimes opens the image and sometimes results in ImageGlass becoming unresponsive. In fact, when ImageGlass becomes unresponsive, Task Manager can't close it - even attempting a force close via command line tools won't work. All that can be done is to click on the unresponsive IG window until a busy cursor comes up, then click the close 'X' on the IG window, then click the center of the IG window again and you should get a pop-up from Windows stating that the program is unresponsive. Select the option to close the window - you can wait for it to search for solutions or click cancel - doesn't matter. Then minimize the IG window to get it out of the way. It will eventually close - sometimes in seconds, sometimes several minutes later.

This behavior can be duplicated in Windows 10 and 11 (various releases), and with IG versions 9, 8, and possibly even 7.

To verify the URN vs. drive letter problem, I created an encrypted volume with VeraCrypt on a network drive. I used VeraCrypt to access the volume via URN, and to assign a drive letter to the decrypted volume. Regardless of the number of images in the volume (tested with several hundred), or how many images were opened individually via double click, failure rate was zero, indicating that ImageGlass has no problem opening images in locations that are assigned a drive letter, even though the volume itself is being accessed by VeraCrypt via URN.

EDIT: With further testing I've found that sometimes the image will eventually load, but it takes an unacceptably long time.

The issue ultimately appears to be that ImageGlass doesn't handle URNs directly in a reliable manner.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the intermittent hang when opening an undamaged associated image through a UNC network path such as \server\media\images\example.jpg, and compare it with an equivalent drive-letter path. Check whether the image eventually loads or ImageGlass becomes unresponsive; done means reliable opening without prolonged blocking on the reported Windows versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.