B1: Removing folders in explorer causes crash

Bugs and Suggestions in XnView Classic which have been resolved

Moderators: XnTriq, xnview

User avatar
foxyshadis
Posts: 387
Joined: Sat Nov 18, 2006 8:57 am

B1: Removing folders in explorer causes crash

Post by foxyshadis »

Basically, if a folder shows in xnview's folder pane, and it's deleted in explorer, and xnview is in one of those folders, accidentally clicking on it will cause a treeview error followed by a crash. Except one time I just got a long chain of non-fatal errors, but it didn't crash. If it's in another folder and you click on a removed folder, it'll show the error and then work fine. I guess the moral is "don't delete the folder xnview's in".
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France

Post by Olivier_G »

I didn't get the Crash on XP SP2.
But I do get the 3x repeated 'error message' (should happen once - maybe - and automatically update Tree).
Olivier
User avatar
helmut
Posts: 8240
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

I've removed the folder currently shown in browser and restored it several times and had no or little problems (an error message is shown with a very long text notifying the user that the folder is not available, I assume it is a Windows message).

@foxyshadis: Could you tell use the steps to reproduce the problem?
User avatar
foxyshadis
Posts: 387
Joined: Sat Nov 18, 2006 8:57 am

Post by foxyshadis »

Okay, I tested a little more and came up with this:

1. Start with a folder (1) with nothing but another folder (2) inside it, that folder should be empty. (Fines don't make a difference but just in case.)
2. Browse to folder (1) in xnview's tree view.
3. Delete folder (1) in explorer.
4. Browse to folder (2) in xnview's tree view.
5. Crash, usually.

If xnview put exclusive locks on the folder it was in, or just checked for the continued existence of its most recent folder, it wouldn't happen. Oddly, it does exclusive lock the parent, so you can't reverse the scenario above. I ended up doing this in the first place because in xnview, (del) never applies to folders, only to files, even if a folder is highlighted in the tree view.
User avatar
foxyshadis
Posts: 387
Joined: Sat Nov 18, 2006 8:57 am

Post by foxyshadis »

Confirmed fixed in B2.