Bug 17907 - Cannot inspect Dictionary<T1, T2> - item has been garbage collected
Summary: Cannot inspect Dictionary<T1, T2> - item has been garbage collected
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 1.10.x
Hardware: PC Windows
: Normal normal
Target Milestone: 3.8
Assignee: vsx
Depends on:
Reported: 2014-02-20 09:22 UTC by René Ruppert
Modified: 2014-11-06 06:20 UTC (History)
7 users (show)

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

bug_17907 (33.99 KB, application/zip)
2014-02-25 13:10 UTC, Udham Singh

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:

Description René Ruppert 2014-02-20 09:22:07 UTC
VS2013, Plugin 1.10.

I'm inside a PCL used by an iOS app.
I'm inspecting the "Errors" field which is a Dictionary<Constants.ResponseCodes, string>.
The dictionary contains one element. If I try to inspect the "Items" property of the dictionary, I get the info that inspection is not possible because the element has been garbage collected.
I can reproduce this for all dictionaries.

Note that the code is actually working. It's just the debugger that's unable to evaluate the contents.

View the recording here: http://screencast.com/t/iQJw46y4vC
Comment 1 Sadik Ali 2014-02-25 06:20:26 UTC
I have checked this issue in VS 2013 with sample iOS and tried to create Dictionary with key value pair (Constants.ResponseCodes, string), but getting error for key "Constants.ResponseCodes".
can you please suggest how to create Dictionary with same or provide me sample of code.
Comment 2 René Ruppert 2014-02-25 08:19:21 UTC
Constants.ResponseCodes is just an enum. I cannot inspect _any_ Dictionary<T1, T2>.
Comment 3 Udham Singh 2014-02-25 13:09:58 UTC
I have checked this issue, To reproduce this issue i have created a PCL project and then added it's reference to the Sample IOS application and got the same issue mentioned in the bug description.

Attached sample project: bug_17907

Refer screen cast: http://screencast.com/t/i2A8oBKNIy

Checked With:
Windows 8.1
VS 2013
X.Ios for VS 1.10.39
Comment 4 Udham Singh 2014-02-25 13:10:46 UTC
Created attachment 6142 [details]
Comment 5 Udham Singh 2014-11-06 06:20:27 UTC
I have checked this issue with builds below

Windows 8
VS 2013
Xamarin.iOS Build Host

Now this is working fine for Classic API templates.

Screencast : http://www.screencast.com/t/JSAWSNiLNry

Hence closing this issue.

For Unified API, we are not able to add PCL reference in iOS app and filed a bug https://bugzilla.xamarin.com/show_bug.cgi?id=24303 for the same.