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
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
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
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
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
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
This is starting to look more like a windows problem than a programming problem.