binary windows install puts the directory of msvcr90.dll onto the path

Bug #881203 reported by ccanepa on 2011-10-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Windows Installers
Medium
Unassigned

Bug Description

The exact observed problem is this:

1. The bzr-2.3.4-1-setup.exe installer ends with bzr.exe (an other executables) in the same dir as msvcr90.dll

2. It is a directory that most users will want to add to the PATH environment variable, and in fact the mentioned installer offers precisely that option

3. But this (exposing said dll though PATH) makes other apps to malfunction.

Two pages about problems when such a dll is exposed trough PATH are
http://forums.plexapp.com/index.php/topic/23267-resolved-c-runtime-library-error/
http://www.keysolutions.com/blogs/kenyee.nsf/d6plinks/KKYE-7C8NM8

They are more googling for 'python error R6034'

Concrete failure(s) detail:

windows xp sp3 32bits, python 2.6.5, pywin32 v216

0. Install bazaar using the aforementioned installer

1. Try to install psutil ( http://code.google.com/p/psutil/ ) with the binary installer, psutil-0.3.0.win32-py2.6.exe
Near the end of the installation a MsgBox will pop up saying :
"R6034 An application has made an attempt to load the C runtime library incorrectly"
(the install will continue after clicking ok in the message box, module seems to work but is unknown if something broke)

2. unistall pywin32 216

3. install pywin32 216 from the sourceforge binaries ( pywin32-216.win32-py2.6.exe )
Amidst the installation the same error will crop.
Installation continues ofter clicking ok in the warnings, damage is unknown.
They are other errors in the pywin32 bugtracker about the same 6034 error, not all at installation. I don't know if those are related to the issue.

4. uninstall both packages, rename the bzr directory (or remove the dir from the PATH)

5. install both packages. No error

Additionaly, in step 1, when the MsgBox is open, alt-Tab to Process Explorer from Sysinternals, select the psutil installer process, look at the dlls attached: the one from bazaar (and another legit) is attached.

 Remarks:

The bug *is not* adding the bzr dir to the PATH, thats a desired and reasonable thing.

The problem is exposing the dll to PATH

Related branches

ccanepa (ccanepacc) wrote :

Confirmed with the last available binary installer, bzr-2.5b2-1-setup.exe

Thats unsurprising because the installation dir end with the same layout as before.

By way of confirming is the presence or absence of said dll the culprit, I uninstalled bazaar, created a dir with only said dll (copied from the prev bzr installation), added that dir to the PATH and tried one more time the psutil intall; the observed error cropped up.

After unistalling psutil and removing from the PATH the offending dir, installation went smooth.

Martin Pool (mbp) on 2011-10-31
affects: bzr → bzr-windows-installers
summary: - binary windows install can broke others programs
+ binary windows install puts the directory of msvcr90.dll onto the path
Changed in bzr-windows-installers:
status: New → Confirmed
importance: Undecided → Medium
Martin Packman (gz) wrote :

Had an idea for updating my previous hack for the runtimes to avoid this problem, but only after already releasing 2.5b3 today and I've got nothing to test it on locally.

Changed in bzr-windows-installers:
assignee: nobody → Martin Packman (gz)
status: Confirmed → In Progress
Martin Packman (gz) wrote :

Unfortunately it seems this is not fixable without either a major change to the installed directory layout or moving away from including the runtime libraries in the bazaar directory at all.

This blocker for fixing this stems from Qt needing the cpp runtime library, but Bazaar itself does not. As we have a subdirectory 'lib' containing most of the modules when they get loaded they have a slightly different context to when the exe is initially run. If a library is already loaded (as is the case with the c runtime), the modules don't have any issue. But otherwise the required runtime *has* to be adjacent to the exe to be found.

The best way of fixing this is installing the runtimes to the shared Windows/WinSxS which is a convoluted process and can't practically be done without switching from Inno Setup to an .msi installer.

Changed in bzr-windows-installers:
assignee: Martin Packman (gz) → nobody
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers