Bug 1483 - Circular dependency arising from static constructor in ConsoleDriver
Summary: Circular dependency arising from static constructor in ConsoleDriver
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-10-13 15:07 UTC by John Cronin
Modified: 2014-03-06 16:47 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description John Cronin 2011-10-13 15:07:12 UTC
The static constructor for System.ConsoleDriver sets the ConsoleDriver.driver field.  If it is not running on Windows driver is set to a TermInfoDriver object.  The constructor in TermInfoDriver that is called will, in the situation that Console.stdout is not an instance of CStreamWriter, call the constructor of CStreamWriter.  This constructor expects the driver field of ConsoleDriver to be filled in with an instance of type TermInfoDriver but this only occurs when the TermInfoDriver constructor has completed (which is still running).
Comment 1 Zoltan Varga 2011-10-14 02:49:06 UTC
Do you have a testcase for this problem ?
Comment 2 Zoltan Varga 2012-01-20 00:10:57 UTC
Comment 3 Marek Safar 2014-03-06 16:47:10 UTC
No reponse