I'm writing a basic GUI application that essentially invokes other processes given some parameters, while the output of those applications is displayed to the user via a richtext box in real-time. So basically I have a seperate process thread running the child processes.
Most of the processes work fine on that thread, except for xdiscbld.exe (an Xbox ISO image creator tool) which crashes saying:
Unhandled Exception: System.IO.IOException: The handle is invalid.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
at System.Console.get_BufferWidth()
at XDiscBld.XDiscBldProgram.ProcessDisc()
at XDiscBld.XDiscBldProgram.Run(String[] args)
at XDiscBld.XDiscBldProgram.Main(String[] args)
(BTW, xDiscBld runs fine via a command prompt, or single threaded Process call)
I wouldn't normally post such a specific error, but I'm really stumped and I think it could be something generic pertaining to a common issue with threads and holding onto some sort of IO handle. If anyone has had any experiance with a similar problem or has any insight on this, it would be appriciated.