Unable to read beyond the end of the stream

Unable to read beyond the end of the stream

I have NCover generating two code coverage files, merging them and creating a report in a NAnt script run under TeamCity. Round one is a small set of quick unit tests; the second round is a larger set of tests, about 400+ with outputs. The two coverage files are created, merged and a report is generated fine in most cases.

However, randomly NCover throws the following error, "Unable to read beyond the end of the stream" during the second run after about 391 tests have been completed and NUnit begins to report the number of tests that were ignored (about 67). This random error occurs in NCover 1.5.8 beta often. Thinking the error may disappear with a newer version of NCover I downloaded a trial version of NCover 2.1 but the error still occurs. I'm not sure if this is something specific to our script or a bug in NCover.

I have a blog write-up about my setup ( http://getonthetrail.blogsite.org/Blog/post/2008/09/TeamCity-NAnt-NUnit-NCover-Integration.aspx ). I did find an old support forum discussion about this issue related to NCover 1.5.8 ( http://www.ncover.com/forum/show_topic/71 ) but the tweak .dll is no longer available. Plus the tweak only seemed to work for a few folks. I was hoping the NCover team had addressed this issue in a newer version, for whatever reason, it remains.

My team was considering purchasing a few licenses but if I cannot get this resolved NCover ditched for another tool, maybe PartCover.NET.

Any help would be much appreciated.


RE: Unable to read beyond the end of the stream

Between 1.5.8 and 2.1 the back-end that gathers coverage and the data transfer algorithm has changed two times, and the "Unable to read beyond end of stream" error should be impossible (because of the means used to transfer data). It would be very helpful to us if you could post the exact error that NCover 2.1 shows.


RE: Unable to read beyond the end of the stream

I will gather captured output from our build log created by TeamCity and NCover log files and upload. We have had only one fail out of six runs with NCover 2.1. I did not backup the error files, so they were overwritten, doh, so I need to wait for another fail before I can get the files.


RE: Unable to read beyond the end of the stream

we'll be waiting for you to email us then.


RE: Unable to read beyond the end of the stream

I must set the record straight, I mistakenly confused the cut over from NCover 1.5.8 to NCover 1.2.1 in our environment. After installing NCover 2.1 we have not had a failure with the Unable to read beyond the end of the stream error. NCOver 2.1 has been running since Sept. 25th with one unrelated failure, 9 out of our last 10 builds have been a success. We are planning to monitor until Wed. of this week before we declare NCover 2.1 compatibale with our environment (if all goes well, we plan to purchase a license). I must say it looks more promising with NCover 2.1.

Sean


RE: Unable to read beyond the end of the stream

Great! I hope it goes well.


RE: Unable to read beyond the end of the stream

A week of success with NCover 2.1 and TeamCity 3.1.1. A purchase of a license is in the near future.

Thanks!