473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Call to GNUmake via System.Diagnostics.Process results in error only if redirecting output

I am attempting to place a call to make via System.Diagnostics.Process
using the sample code below. If I comment out the two problem lines
indicated, then the code runs smoothly and make performs quite well.
If I leave the two problem lines in, then make "encounters a problem"
at the exception line indicated, and pops up a dialog box for sending
the error report to microsoft.

The technical information in the error report itself is undecipherable
in its native format and cannot be copied and pasted as far as I can
gather... I have however, included a truncated copy of the event
information below. While I do not have the inclination to debug a
Visual Studio disassembled make, I was wondering if anyone had any
thoughts on why redirecting standard output and error would have such a
drastic effect.

CODE

StreamReader errorReader;
StreamReader buildReader;

buildProcess = new Process();
buildProcess.StartInfo.FileName = makePath;
buildProcess.StartInfo.Arguments = makeArguments;
buildProcess.StartInfo.CreateNoWindow = true;
buildProcess.StartInfo.RedirectStandardOutput = true; // problem line
buildProcess.StartInfo.RedirectStandardError = true; // problem line
buildProcess.StartInfo.UseShellExecute = false;
buildProcess.Start(); // exception line

buildReader = buildProcess.StandardOutput;
errorReader = buildProcess.StandardError;
buildProcess.WaitForExit(millisecondsToWait);

ERROR

Event Type: Error
Event Source: Application Error
Event Category: None
Event ID: 1000
Description:
Faulting application make.exe, version 0.0.0.0, faulting module
make.exe, version 0.0.0.0, fault address 0x00012b64.

Jan 10 '06 #1
1 1351
Also of note : I am using the.Net Framework v1.1.4322 and GNU Make
version 3.75, by Richard Stallman and Roland McGrath.

rubikzube* wrote:
I am attempting to place a call to make via System.Diagnostics.Process
using the sample code below. If I comment out the two problem lines
indicated, then the code runs smoothly and make performs quite well.
If I leave the two problem lines in, then make "encounters a problem"
at the exception line indicated, and pops up a dialog box for sending
the error report to microsoft.

The technical information in the error report itself is undecipherable
in its native format and cannot be copied and pasted as far as I can
gather... I have however, included a truncated copy of the event
information below. While I do not have the inclination to debug a
Visual Studio disassembled make, I was wondering if anyone had any
thoughts on why redirecting standard output and error would have such a
drastic effect.

CODE

StreamReader errorReader;
StreamReader buildReader;

buildProcess = new Process();
buildProcess.StartInfo.FileName = makePath;
buildProcess.StartInfo.Arguments = makeArguments;
buildProcess.StartInfo.CreateNoWindow = true;
buildProcess.StartInfo.RedirectStandardOutput = true; // problem line
buildProcess.StartInfo.RedirectStandardError = true; // problem line
buildProcess.StartInfo.UseShellExecute = false;
buildProcess.Start(); // exception line

buildReader = buildProcess.StandardOutput;
errorReader = buildProcess.StandardError;
buildProcess.WaitForExit(millisecondsToWait);

ERROR

Event Type: Error
Event Source: Application Error
Event Category: None
Event ID: 1000
Description:
Faulting application make.exe, version 0.0.0.0, faulting module
make.exe, version 0.0.0.0, fault address 0x00012b64.


Jan 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Morten | last post by:
Hi! Does anyone know why the code below always returns an "access is denied" error? private void Page_Load(object sender, System.EventArgs e) { System.Diagnostics.Process meProc =...
6
by: danl | last post by:
I need to be able to execute a .bat file from a C# web application I have the following code that compliles and seems to run fine, but the bat file never does it's work...
5
by: Paul Bergson | last post by:
I have been trying to get a process to start up and run with arguments passed to it. I have gotten close (Thanks to help from this board) but I there is a failure while I'm running this because...
1
by: Patrick | last post by:
When Tracing in ASP.NET, the IIS process (on IIs5.1) is locking on the Trace file, and I can't read the trace file without restarting the IIS: Even the following does NOT work (how could I fix...
11
by: Nurit N | last post by:
This is the third newsgroup that I'm posting my problem. I'm sorry for the multiple posts but the matter becoming urgent. I hope this is the right place for it... I have created a very...
7
by: Sheikko | last post by:
Hi all, i have an application and i wan to call another program into it, like notepad, so when i minimize the notepad, or maximize, it must rest in my application. thank you
1
by: lapucca | last post by:
Hi, I'm using VS 2005, ,.net 2 for C# windows application. I'm using Process to run a C application and redirecting its standard output so I can read it with StreamReader.ReadToEnd. It's only...
2
by: test3 | last post by:
Hello folks, I'm using System.Diagnostics.Process to start a thirdparty program (that works perfectly when started via command line). I'm using Process.StandardOutput to get the output of the...
1
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I have a C# application in which I start another process which produces output to stdout and stderr. In fact, that process is the uSoft VS2005 C/C++ compiler itself! I would like to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.