Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pause logging when the race condition occurs in (Colored)Console Target #1643

Merged
merged 3 commits into from
Sep 14, 2016

Conversation

304NotModified
Copy link
Member

@304NotModified 304NotModified commented Sep 14, 2016

fixes #1631

Console.Out.Writeline / Console.Error.Writeline could throw IndexOutOfRangeException' which is a bug.
See Stackoverflow
and Microsoft connect/bug report

Full error:

   Error during session close: System.IndexOutOfRangeException: Probable I/ O race condition detected while copying memory.
   The I/ O package is not thread safe by default.In multithreaded applications, 
   a stream must be accessed in a thread-safe way, such as a thread - safe wrapper returned by TextReader's or 
   TextWriter's Synchronized methods.This also applies to classes like StreamWriter and StreamReader.

This change is Reviewable

@304NotModified 304NotModified force-pushed the handle-console-writeline-race-condition-bug branch from 8fedd41 to 4ed9a76 Compare September 14, 2016 19:08
@codecov-io
Copy link

codecov-io commented Sep 14, 2016

Current coverage is 79% (diff: 55%)

Merging #1643 into master will decrease coverage by <1%

@@             master      #1643   diff @@
==========================================
  Files           273        273          
  Lines         16665      16704    +39   
  Methods        2652       2654     +2   
  Messages          0          0          
  Branches       1836       1846    +10   
==========================================
+ Hits          13262      13274    +12   
- Misses         2983       2999    +16   
- Partials        420        431    +11   

Sunburst

Powered by Codecov. Last update 0f9a3ed...2abb062

@304NotModified 304NotModified changed the title Pause logging when the race conditin occurs in Console.WriteLine Pause logging when the race condition occurs in Console.WriteLine Sep 14, 2016
@304NotModified 304NotModified changed the title Pause logging when the race condition occurs in Console.WriteLine Pause logging when the race condition occurs in (Colored)Console Target Sep 14, 2016
@304NotModified 304NotModified added bug Bug report / Bug fix enhancement Improvement on existing feature labels Sep 14, 2016
@304NotModified 304NotModified force-pushed the handle-console-writeline-race-condition-bug branch from adaa323 to 2abb062 Compare September 14, 2016 20:28
@304NotModified 304NotModified merged commit 359b576 into master Sep 14, 2016
@304NotModified 304NotModified added this to the 4.3.9 milestone Sep 14, 2016
@304NotModified 304NotModified deleted the handle-console-writeline-race-condition-bug branch September 18, 2016 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report / Bug fix console-target enhancement Improvement on existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants