473,595 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

I am attempting to place a call to make via System.Diagnost ics.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.St artInfo.FileNam e = makePath;
buildProcess.St artInfo.Argumen ts = makeArguments;
buildProcess.St artInfo.CreateN oWindow = true;
buildProcess.St artInfo.Redirec tStandardOutput = true; // problem line
buildProcess.St artInfo.Redirec tStandardError = true; // problem line
buildProcess.St artInfo.UseShel lExecute = false;
buildProcess.St art(); // exception line

buildReader = buildProcess.St andardOutput;
errorReader = buildProcess.St andardError;
buildProcess.Wa itForExit(milli secondsToWait);

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 1372
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.Diagnost ics.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.St artInfo.FileNam e = makePath;
buildProcess.St artInfo.Argumen ts = makeArguments;
buildProcess.St artInfo.CreateN oWindow = true;
buildProcess.St artInfo.Redirec tStandardOutput = true; // problem line
buildProcess.St artInfo.Redirec tStandardError = true; // problem line
buildProcess.St artInfo.UseShel lExecute = false;
buildProcess.St art(); // exception line

buildReader = buildProcess.St andardOutput;
errorReader = buildProcess.St andardError;
buildProcess.Wa itForExit(milli secondsToWait);

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
6047
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 = System.Diagnostics.Process.Start ("cmd.exe", " /c echo y| CACLS C:\\Temp /E /T /G test:F");
6
2197
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 =================================== System.Diagnostics.Process p = new Process() p.StartInfo.RedirectStandardOutput=false p.StartInfo.FileName = "C:\\ftp_scripts\\script.bat" p.StartInfo.UseShellExecute=true p.Start() p.WaitForExit() p.Dispose();
5
2065
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 the c:\bin\xcacls starts nothing happens. How can I see output from the console i was trying to get the ProcessStartInfo.RedirectStandardOutput Property to work but even if I got the system to process it I didn;t know where the output was being...
1
4331
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 this??): System.Diagnostics.Trace.WriteLine(System.DateTime.Now.ToLongTimeString()+ "--" + dirException.ToString()); System.Diagnostics.Trace.Flush(); ((System.Diagnostics.TraceListener) System.Diagnostics.Trace.Listeners).Close();
11
3736
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 simple batch file (echo hello world) and was trying to retrieve the standard output but every time I run the code it returns ExitCode as 1.
7
5816
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
3067
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 reading the 1st 5 lines or so when there is about 100 lines of data. I also tried using the Process.BeginOutputReadlin and a DataReceivedEvntHandler to gather output but I also only get about 5 lines of the data. There seems to be a buffer...
2
6862
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 program. That works for 95 %, but the other 5 % it doesn't. It seems to me that the started process just hangs, and therefor my program hangs, too (p.WaitForExit()). I researched that this only happens when the output of the program is longer than...
1
3761
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 capture the results of the compile and display them in a RichTextBox. The problem I'm having is that when I intentionally introduce an error in the C code I'm compiling, I can't read the error output in my C# program. I've tried redirecting both...
0
7955
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8261
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8019
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5418
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3873
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3911
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2391
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1490
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.