Windows: can't find chcp command

Bug #692957 reported by Heiko
40
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Hugin
Won't Fix
Medium
Unassigned

Bug Description

I use Windows 7 64bit. After starting the stitching I receive a message, that the command chcp couldn't be found. Originally in german: "Der Befehl "chcp" ist entweder falsch geschrieben oder konnte nicht gefunden werden."

I even changed the path variable from "%systemroot%\system32" into "c:\windows\system32", but it didn't help. All other things are working, so It looks like a bug for me.

Thanks for any help.

Tags: windows
tags: added: windows
Changed in hugin:
status: New → Triaged
Revision history for this message
Matthew Petroff (matthewpetroff) wrote :

What happens if you try to run "chcp" from the command prompt? Is "chcp.com" in the "c:\windows\system32" folder?

Yuv (yuv)
summary: - error during stitching
+ Windows: can't find chcp command
Revision history for this message
Chris P (2chrisp) wrote :

i have the same problem on win 7 x64.

chcp from the promt gives me "Active codepage: 850"

chcp.com is in the system32 folder

Yuv (yuv)
Changed in hugin:
status: Triaged → Confirmed
Revision history for this message
Matthew Petroff (matthewpetroff) wrote :

Are you running a 32-bit or 64-bit build?

Using the assumption that you are running a 32-bit build:
Is chcp.com located in the "c:\windows\syswow64\" folder?
Does "chcp" work if you run it from the "c:\windows\syswow64\cmd.exe" executable?
What path results from running "cd %windir%\system32\catroot\..\" from the "c:\windows\syswow64\cmd.exe" executable?

I unfortunately do not have access to a 64-bit Windows machine and cannot do any testing.

You should be able to work around the problem by copying chcp.com from system32 to the Hugin bin folder and renaming it to chcp.exe.

Revision history for this message
Chris P (2chrisp) wrote :

yes i am using the 32 bit build

chcp works from the 64bit prompt

"cd %windir%\system32\catroot\..\" results in changing to C:\Windows\System32

Revision history for this message
Chris P (2chrisp) wrote :

copying chcp.com from system32 to the Hugin bin folder and renaming it to chcp.exe did not help

Revision history for this message
Matthew Petroff (matthewpetroff) wrote :

I suspect the problem is resulting from the file system redirector 64-bit Windows uses when it runs 32-bit programs.
(See http://msdn.microsoft.com/en-us/library/aa384187%28v=vs.85%29.aspx)

I've attached a build that uses a path exempt from the redirector to call chcp.

Could use please extract hugin.exe, replace your current version with it, and see if it fixes the problem?

Also, could you see if a 64-bit build fixes the problem?

Revision history for this message
Matthew Petroff (matthewpetroff) wrote :

Ignore the previous attachment. Try this one instead.

Changed in hugin:
importance: Undecided → Medium
Revision history for this message
Chris P (2chrisp) wrote :

i just tried the 2010.4 rc1 x64 installation. i did not manage to get cpfind or autopano sift c up and running even with manually setting the paths to the exe files in the preferences. after setting some CPs manually i tried to create the panorama but again getting the same error message.

Revision history for this message
Chris P (2chrisp) wrote :

2010.4 rc1 x86 does not find chcp too. i copied your hugin build into the 32 bit install bin folder but the application crashes:

Problemsignatur:
  Problemereignisname: APPCRASH
  Anwendungsname: hugin.exe
  Anwendungsversion: 0.0.0.0
  Anwendungszeitstempel: 4d1a9df4
  Fehlermodulname: hugin.exe
  Fehlermodulversion: 0.0.0.0
  Fehlermodulzeitstempel: 4d1a9df4
  Ausnahmecode: c0000005
  Ausnahmeoffset: 0012dfe8
  Betriebsystemversion: 6.1.7600.2.0.0.256.48
  Gebietsschema-ID: 3079
  Zusatzinformation 1: 0a9e
  Zusatzinformation 2: 0a9e372d3b4ad19135b953a78882e789
  Zusatzinformation 3: 0a9e
  Zusatzinformation 4: 0a9e372d3b4ad19135b953a78882e789

Revision history for this message
Chris P (2chrisp) wrote :

i have another older build from http://lemur.dreamhosters.com/hugin/ Hugin win32 2010.1 svn.5118.

when i copy your hugin exe build into the folder and start it i get the following crash information:

ASSERTATION:
(..\..\..\..\hugin\src\hugin1\hugin\AssistantPanel.cpp:143)
AssitantPanel::Create():(): m_alignBatchButton

Revision history for this message
Matthew Petroff (matthewpetroff) wrote :

Sorry, I should have specified what version to run it with. It runs fine for me in 2010.4.0-rc3.

Revision history for this message
Chris P (2chrisp) wrote :

i used the rc4 32bit installer. copied over your exe. no crash but still no chcp found

Revision history for this message
Chris P (2chrisp) wrote :

rc4 64bit does not find chcp either.

in both installations cpfind did not run too. manual CP creation only.

Revision history for this message
Matthew Petroff (matthewpetroff) wrote :

I'm not sure what else to try other than recording where Hugin looks for chcp.

Could you download Process Monitor from:
http://technet.microsoft.com/en-us/sysinternals/bb896645

Then use the following procedure:

1. Save this attachment

2. Open Hugin and have it ready to stitch

3. Open Process Monitor (procmon.exe)

4. In procmon: "File --> Import Configuration..." then select the attachment

5. Try to stitch with Hugin.

6. In procmon: "File --> Capture Events" to stop the event tracer

7. In procmon: "File --> Save..." the default options are fine

8. Add the resulting log file to this bug report.

The log file will contain all attempts to access chcp and where those attempts were.

Revision history for this message
Yuv (yuv) wrote :

does this problem also happens when using a 64bit version of Hugin on the 64bit Windows system?

what is the rationale to install/use a 32bit version of Hugin on a 64bit Windows system (assuming there is a 64bit version of Hugin)?

Revision history for this message
Chris P (2chrisp) wrote :

the 64bit version has the same problem on my system.

i used the rc4 64bit during the event logging.

i am only posting a screenshot of the result, as i do not have the time to look into the log file, to know if there is sensitive information in it, and i am not able to delete events from the log.
if you need some more details of the the events just tell me i will post them.

Revision history for this message
Chris P (2chrisp) wrote :

i do not know if it matters, but as I saw it in the log too, i have tortoise svn 32bit and 64bit installed. as it hooks into the file management, perhaps it is connected to the problem.

F:\spanien\
is the folder where the images are located

Revision history for this message
Matthew Petroff (matthewpetroff) wrote :

There appears to be a problem with your PATH environment variable. Based on your screenshot, it appears that the only place in your PATH is the "c:\windows\system32\nv\" folder. Could you check your PATH to make sure it contains "%SystemRoot%\system32". If you don't want to change your PATH, you could work around the problem by copying "chcp.com" from "c:\windows\system32\" to "c:\windows\system32\nv\" since that's where Hugin is looking.

@Yuv there isn't a good reason to use a 32-bit version of Hugin on a 64-bit Windows system. Unfortunately, SourceForge does not let one specify different default packages for 32-bit and 64-bit Windows so unless a 64-bit user specifically selects a 64-bit build, he or she will end up with a 32-bit version.

Revision history for this message
Chris P (2chrisp) wrote :

Here is my full system path. I changed %SystemRoot%\System32 to C:\Windows\System32 in an attempt to fix the problem

C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\System32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\TortoiseSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\MinGW\bin

Revision history for this message
Matthew Petroff (matthewpetroff) wrote :

"c:\windows\system32\nv\" isn't in your PATH so I am at a loss why Hugin is looking there. Either there's something very peculiar about your Windows install, or there's a bug upstream in wxWidgets.

Revision history for this message
Chris P (2chrisp) wrote :

I think I found the problem. I used a modified nvidia driver from laptopvideo2go. after installing a new driver from nvidia, that was compatible with my laptop, hugin works. that would also be the reason why the lookups from hugin were redirected to c:\windows\system32\nv

tmodes (tmodes)
Changed in hugin:
status: Confirmed → Won't Fix
Revision history for this message
Heiko (werbung-harzbecker) wrote :

Thanks alot for your help. I installed a new driver and now everything works perfectly.

Revision history for this message
Robert Glover (rglover) wrote :

I have been having this same issue with version 2011.0.0.0fd3e119979c for Windows XP 64. This is being run on a work computer andI have found that I don't get the error when my IT admin logs into and tries it, but when I, a lowly user with very limited access, (who has been working on and in computers since I could walk) tries to run it, I can't. I believe this is because the chcp.exe in the Windows/System32 folder is not accessable with my restricted rights. My IT department will not give me the rights to access it. Anytime an admin runs Hugin on this computer is works.
I don't know if this access rights issue will help anyone else, but I hope it does. Also seen mentioned to check you are running the correct version, x64 or x32. Also to try updating or backdating video card drivers. I didn't try the video card drivers, but did update to x64 from x32.

Revision history for this message
Peter Newman (petermnewman) wrote :

Has anyone found a simple solution to this chcp problem yet. I have Intel HD graphics 4000 and I don't know how to change the driver. I really like Hugin but it is currently unusable for defishing images.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.