login
Header Space

 
 

App Bombs in CMD Window but Not in Msys

July 26, 2008 - 3:36pm
Submitted by Anonymous on July 26, 2008 - 3:36pm.

Hello. For some reason my app runs just flawlessly in the msys window but from a windows cmd window I get this:

timecodecalc.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

I tried a static compile but got the same result.

App Bombs in CMD Window but Not in Msys

July 26, 2008 - 3:49pm
The Lightning Stalker (not verified)

Also, I just noticed that if I run it by double clicking on the exe that it runs just fine. I don't seem to remember this happening before.

Thank you,
Robert

environment

July 26, 2008 - 4:17pm

have you checked the environment variables? too many, too few, overwriting something important, %PATH% or something else not pointing to a library directory? does it work as a different user (i.e. the one (administrator?) who installed msys)? is something in the windows application event log?

Re: environment

July 26, 2008 - 5:03pm
Anonymous (not verified)

Ahh, thanks for the quick reply. I did manage to trace it down a little bit. It bombs when it calls strcpy in msvcrt.dll The event log says

Faulting application timecodecalc.exe, version 0.0.0.0, faulting module msvcrt.dll, version 7.0.2600.2180, fault address 0x000360ad.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

versions

July 27, 2008 - 1:36pm

are there different versions of msvcrt.dll lying around one working, one crashing? iirc dlls are at least searched for in the the application directory and in the %PATH%, what about the current directory and %WINDIR% and its subdirectories (e.g. %WINDIR%\system32)? are more environment variables involved and how are these variables set in which situation? why does your program use the msvcrt.dll implementation of strcpy at all, when you talk about msys i would assume it to use glibc?

Re: environment

July 26, 2008 - 5:29pm
The Lightning Stalker (not verified)

Well, I just ran it in a debugger and it works fine. It only seems to bomb when it's called from a command window. Very strange.

Re: environment

July 26, 2008 - 5:52pm
Anonymous (not verified)

This is starting to look more like a windows problem than a programming problem.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary