Skip to content

System.ObjectDisposedException : Cannot write to a closed TextWriter in printf in numerous tests #11800

@brettfo

Description

@brettfo

We've had several signed test runs fail recently with:

System.ObjectDisposedException : Cannot write to a closed TextWriter.

at System.IO.__Error.WriterClosed()
   at System.IO.StringWriter.Write(String value)
   at System.IO.TextWriter.SyncTextWriter.Write(String value)
   at [email protected](FSharpList`1 _args, FSharpFunc`2 initial) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\printf.fs:line 1266
   at Scripting.log[a](PrintfFormat`4 format) in D:\workspace\_work\1\s\src\scripts\scriptlib.fsx:line 81
   at TestFramework.logConfig(TestConfig cfg) in D:\workspace\_work\1\s\tests\FSharp.Test.Utilities\TestFramework.fs:line 360
   at TestFramework.initializeSuite() in D:\workspace\_work\1\s\tests\FSharp.Test.Utilities\TestFramework.fs:line 413
   at [email protected](Unit unitVar) in D:\workspace\_work\1\s\tests\FSharp.Test.Utilities\TestFramework.fs:line 418
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at TestFramework.testConfig(String testDir) in D:\workspace\_work\1\s\tests\FSharp.Test.Utilities\TestFramework.fs:line 436
   at SingleTest.singleTestBuildAndRun(String dir, Permutation p) in D:\workspace\_work\1\s\tests\fsharp\single-test.fs:line 375
   at [email protected](String dir, Permutation p) in D:\workspace\_work\1\s\tests\fsharp\tests.fs:line 35
   at FSharp.Tests.Core.GeneratedSignatureTests.innerpoly-GENERATED_SIGNATURE() in D:\workspace\_work\1\s\tests\fsharp\tests.fs:line 3131

There are usually ~500 failures, all with the same stack trace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Impact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions