Console.Clear crashes raven.server with redirected input / output

48 views
Skip to first unread message

Jason Dentler

unread,
Aug 11, 2012, 5:31:54 PM8/11/12
to rav...@googlegroups.com
I'm running build 960.

I'm launching raven.server with the /ram argument using System.Diagnostic.Process with redirected input & output to reset the database between tests and quit after the last test.

A critical error occurred while starting the server. Please see the exception details bellow for more details:
System.IO.IOException: The handle is invalid.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
   at System.Console.Clear()
   at Raven.Server.Program.<>c__DisplayClass32.<InteractiveRun>b__2d()
   at Raven.Server.Program.InteractiveRun()
   at Raven.Server.Program.RunServerInDebugMode(RavenConfiguration ravenConfiguration, Boolean lauchBrowser)
   at Raven.Server.Program.RunInDebugMode(Nullable`1 anonymousUserAccessMode, RavenConfiguration ravenConfiguration, Boolean launchBrowser)
   at Raven.Server.Program.<>c__DisplayClass1c.<InteractiveRun>b__f()
   at Raven.Server.Program.InteractiveRun(String[] args)
   at Raven.Server.Program.Main(String[] args)
Press any key to continue...

A quick Google search says you can't call Console.Clear() when the output is redirected. Ideas?

I'm doing black-box testing with Selenium, so embedded isn't an acceptable alternative. I need to clear the database between tests without recycling the app pool.

Thanks,
Jason

Oren Eini (Ayende Rahien)

unread,
Aug 12, 2012, 6:18:34 AM8/12/12
to rav...@googlegroups.com
Is there a way to detect this? A pull request for NOT clearing would be great.

Oren Eini (Ayende Rahien)

unread,
Aug 13, 2012, 4:31:40 AM8/13/12
to rav...@googlegroups.com
Next build will have a fix for this
Reply all
Reply to author
Forward
0 new messages