This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9050 - Amaya crashes due to not using proper user profile directory
Summary: Amaya crashes due to not using proper user profile directory
Status: NEW
Alias: None
Product: Amaya
Classification: Unclassified
Component: Misc (show other bugs)
Version: 11.3.1
Hardware: PC Windows 3.1
: P1 major
Target Milestone: ---
Assignee: lcarcone
QA Contact: lcarcone
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-17 10:55 UTC by Helder Magalh
Modified: 2014-11-05 15:58 UTC (History)
6 users (show)

See Also:


Attachments

Description Helder Magalh 2010-02-17 10:55:04 UTC
Amaya doesn't obtain the user profile directory using the proper Windows APIs.
What seems to be happening is that Amaya concatenates the global users directory with the current user name.

Currently my username, "foo", is different of my user profile folder, "bar". Instead of using "C:\Users\bar", Amaya is using "C:\Users\foo".
This has caused Amaya to stop working since this user/profile restructuration has occurred in my company.
So, put it simple, in my case (environment variable) %USERPROFILE% != [Users Directory]\[My Username]

Although this is an unusual use-case, it has just uncovered this underlying issue in Amaya.

I'm using Windows Vista SP2. This was seen in Amaya "11.3.1 (Dec 9 2009)", using the VC9 flavor. (This is probably specific to Windows Vista/7 due to UAC, but that particular target is missing in W3C bug tracker; I'm about to send a mail to the system's administrator regarding that.)


Suggestion:
Use the environment variable "USERPROFILE" (or the equivalent using Windows APIs) to find a handler to the current user's profile directory.


Additional information:
Amaya no longer worked after this change occurred. lib-www cache is trying to use the wrong directory and therefore plain crashes, probably due to lack of permissions (in trying to access [Users Directory]\[My Username]).


Workaround:
I was able to find a workaround which helps avoiding this issue until the Amaya team can put some time on it. Basically it consists in creating a symbolic link in the users directory, pointing the [My Username] to the proper folder in order to help Amaya (and possibly other faulty software).
This is performed using the 'mklink' utility shipped with the operating system:
  C:\Users>mklink /d [My Username] [Profile Folder]
  symbolic link created for [My Username] <<===>> [Profile Folder]