Bug 57773 - Console.WriteLine display inconsistent results
Summary: Console.WriteLine display inconsistent results
Status: RESOLVED FIXED
Alias: None
Product: Workbooks & Inspector
Classification: Xamarin
Component: Client: Mac (show other bugs)
Version: master
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: xamarininteractive
URL:
Depends on:
Blocks:
 
Reported: 2017-06-26 20:09 UTC by David Ortinau [MSFT]
Modified: 2017-08-25 14:36 UTC (History)
2 users (show)

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


Attachments
workbook (4.97 KB, application/zip)
2017-06-26 20:09 UTC, David Ortinau [MSFT]
Details


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 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:
Status:
RESOLVED FIXED

Description David Ortinau [MSFT] 2017-06-26 20:09:02 UTC
Created attachment 23122 [details]
workbook

1.3 Alpha 3

https://www.screencast.com/t/vjGnwEnk2OY

When I run this block (see screencast) repeatedly I see different results. The data isn't changing, so I'm wondering if the output panel just doesn't reveal everything.

I would expect to at a minimum see:

==============================
==============================


But instead I often see

==============================
 : 9


And then 

==============================
 : 9
DOWNSTREAM: 1

And then eventually

==============================
ANSWERED: 52
DOWNSTREAM: 1
DUPLICATE: 17
FEATURE: 3
FIXED: 82
INVALID: 19
NORESPONSE: 169
NOT_ON_ROADMAP: 25
NOT_REPRODUCIBLE: 53
Comment 1 David Ortinau [MSFT] 2017-06-26 20:13:59 UTC
Updating the blog to not use Console.WriteLine and instead use AsHtml works consistently.

var groupedByReason = bugs.GroupBy(x => x.resolution).OrderBy(c => c.Key);
var report = "<html><body><table><tr><th>Reason</th><th>Count</th></tr>";
foreach(var s in groupedByReason)
{
    report += $"<tr><td>{s.Key}</td><td>{s.Count()}</td></tr>";
}
report += "</table></body></html>";
report.AsHtml();
Comment 2 Bojan Rajkovic [MSFT] 2017-08-25 14:36:49 UTC
Fixed by https://github.com/xamarin/inspector/pull/1551. Will be in the upcoming 1.3 release.