[fixed] 1.92: XnView doesn't always restore associations

Bugs and Suggestions in XnView Classic which have been resolved

Moderators: XnTriq, xnview

User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow

[fixed] 1.92: XnView doesn't always restore associations

Post by ckv »

I some cases XnView doesn't restore previously replaced associations when using the "Restore All" button.

This bug is a little hard to reproduce and I don't know if it only occurs when using the button, but it appears that the backup restore fails only when "View as Name" is selected in the associations page. The best way to reproduce this bug is to simply use the "Add All" button and then restore the associations with "Restore All" button while "View as Name" is selected.
Better do this on VM or backup the associations that you know are going to be replaced.

I tried this couple times on my win2k VM system and when "View as Extension" was selected XnView restored all the replaced associations successfully, but while "View as Name" was selected it didn't restore all the replaced associations.
Last edited by ckv on Thu Jun 26, 2008 1:55 pm, edited 1 time in total.
XnView Tweak UI - Tool to customize your XnView beyond the regular XnView options.
UI-less Settings - Documentation of all the hidden settings in XnView.
XFAM - Tool to create and customize XnView file associations.
User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow

Post by ckv »

Still reproducible in XnView 1.93.6

Here's how to reproduce for the brave:
- Go to associations page in options.
- Click "Add All" button.
- Restart XnView.
- Go to associations page in options.
- Select "View as Name".
- Click "Restore All" button.

Result: XnView doesn't restore all previously replaced associations. I don't mean the association list in XnView I mean the actual associations in Windows registry.

On my case it didn't restore .bmp, .clp, .dcx, .ico, .jfif, .jpe, .jpeg and .jpg associations. But this will naturally vary system to system depending on what associations exist before creating the associations.

I still recomend using Virtual Machine to try this or at least manually backup your associations.
XnView Tweak UI - Tool to customize your XnView beyond the regular XnView options.
UI-less Settings - Documentation of all the hidden settings in XnView.
XFAM - Tool to create and customize XnView file associations.
User avatar
xnview
Author of XnView
Posts: 36389
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

Ok, i'll check
Pierre.
User avatar
xnview
Author of XnView
Posts: 36389
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

I've tried but i have correctly all previously associations.
For example, for .bmp or .clp what was the previous value?
Pierre.
User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow

Post by ckv »

.bmp = Paint.Picture
.clp = clpfile
.dcx = DCXImage.Document
.ico = icofile
.jfif = pjpegfile
.jpe = jpegfile
.jpeg = jpegfile
.jpg = jpegfile

I still have the .reg files from HKCR key taken before and after creating and restoring the associations. Not sure if those can help, but you can get them frm here: *snip*
Last edited by ckv on Sun Jul 27, 2008 9:20 pm, edited 1 time in total.
XnView Tweak UI - Tool to customize your XnView beyond the regular XnView options.
UI-less Settings - Documentation of all the hidden settings in XnView.
XFAM - Tool to create and customize XnView file associations.
User avatar
xnview
Author of XnView
Posts: 36389
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

I've tried on a fresh win2K isntall, and all associations are restored correctly :-(
Pierre.
User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow

Post by ckv »

xnview wrote:I've tried on a fresh win2K isntall, and all associations are restored correctly :-(
Did you use "Add All" to create the associations?


Here's what I think is causing this bug...

All the file extension that fail to restore are all under more than one name. E.g. .bmp is under Windows Bitmap, OS/2 Bitmap and Alpha Microsystems BMP

When "View as Extension" is selected this is no problem cause each extension is listed only once, but when "View as Name" is selected some of the extensions are in the list more than one time. Because of this those extensions are also processed more than one time.

So when restoring associations. The first time the extension processed, it restores the previous value successfully, but for the second time (for some reason) it still trys to restore the association and breaks it cause the bakup key doesn't exist anymore.

I took this Regmon log while restoring the associations. First the .bmp extension is restored successfully (line 772), but later on it's restored again (line 9389 and line 15665) and a null string is writen as value for .bmp
*snip*
Last edited by ckv on Sun Jul 27, 2008 9:20 pm, edited 1 time in total.
XnView Tweak UI - Tool to customize your XnView beyond the regular XnView options.
UI-less Settings - Documentation of all the hidden settings in XnView.
XFAM - Tool to create and customize XnView file associations.
User avatar
xnview
Author of XnView
Posts: 36389
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

ckv wrote:
xnview wrote:I've tried on a fresh win2K isntall, and all associations are restored correctly :-(
Did you use "Add All" to create the associations?
Yes
I took this Regmon log while restoring the associations. First the .bmp extension is restored successfully (line 772), but later on it's restored again (line 9389 and line 15665) and a null string is writen as value for .bmp
http://koti.mbnet.fi/vaultec/files/regmon.zip
I'll check again...
Pierre.
User avatar
xnview
Author of XnView
Posts: 36389
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

Ok, will be fixed in 1.94 beta 2
Pierre.
User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow

Post by ckv »

xnview wrote:Ok, will be fixed in 1.94 beta 2
:D

Not a one smile post :wink:
XnView Tweak UI - Tool to customize your XnView beyond the regular XnView options.
UI-less Settings - Documentation of all the hidden settings in XnView.
XFAM - Tool to create and customize XnView file associations.
User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow

Post by ckv »

xnview wrote:Ok, will be fixed in 1.94 beta 2
Confirmed. Fixed in 1.94 beta 2.
XnView Tweak UI - Tool to customize your XnView beyond the regular XnView options.
UI-less Settings - Documentation of all the hidden settings in XnView.
XFAM - Tool to create and customize XnView file associations.