Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

crash in ProcessShellCommand

333 views
Skip to first unread message

Joern Weichert

unread,
Aug 23, 2002, 9:57:26 AM8/23/02
to
Hallo Newsgroup,

I've written a program using Visual C++. When I start this program in
release-mode from within Developoer Studio I get an ugly crash. Starting the
program from windows explorer or the debug-version works fine.

the error message says, the instruction at "0x00401d5c" points to memory at
"0x0000008c". "read" not possible.

Whenever I try to debug the program everything works ok. No error.

This is how close I could get to the problem:
In CMyApp::InitInstance() there is the line
if (!ProcessShellCommand(cmdInfo)) return FALSE;

If I place a messagebox somewhere before this line
AfxMessageBox("Test");
the messagebox appears and the program works normally.
If I place my messagebox below that "ProcessShellCommand" I get the
described error.

What is the problem and what can I do?

I'm having this problem since my old Win-NT-AMD-K6 did retire and i got a
new Win2K-Pentium-4. So I thought this might be a time-dependant problem,
but inserting a Sleep(10000) instead of the messagebox didn't help. It must
be something different.

Hope anybody can help.

Greetings,
Joern Weichert.

Jay Nabonne

unread,
Aug 23, 2002, 12:16:05 PM8/23/02
to

"Joern Weichert" <weic...@tu-cottbus.de> wrote in message
news:ak5f06$1g5gbt$1...@ID-767.news.dfncis.de...

Some thoughts:

1) Check Debug options for Release build and see if a funky command line
("Program Arguments") is being passed in.
2) It could theoretically still be a timing issue if you're doing complex
stuff. In addition to a delay, AfxMessageBox also pumps messages. (I doubt
it, but you never know.)
3) Compile the Release build with debugging symbols. That way you can at
least look at the stack and figure out what badness is being passed to whom.
4) Something in ProcessShellCommand is causing a crash. So something on the
command line is probably not right (see 1 above). In your message box,
display the command line and what cmdInfo.m_nShellCommand is.

HTH

Jay


Joseph M. Newcomer

unread,
Aug 26, 2002, 2:09:05 AM8/26/02
to
Read my essay "Surviving the Release Build" on my MVP Tips site.
joe

Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm

0 new messages