Bug 35592 - System.ObectDisposeException annot access a disposed object
Summary: System.ObectDisposeException annot access a disposed object
Status: RESOLVED FIXED
Alias: None
Product: Workbooks & Inspector
Classification: Xamarin
Component: Agent: iOS ()
Version: 0.3.1
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: inspectordev-discuss
URL:
Depends on:
Blocks:
 
Reported: 2015-11-05 15:33 UTC by Andreas Klapperich
Modified: 2015-11-13 12:25 UTC (History)
2 users (show)

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

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 Andreas Klapperich 2015-11-05 15:33:54 UTC
Sometimes by clicking in the Xamarin Insight screen, I get the System.ObectDisposeException message


Screencast is here http://www.screencast.com/t/hDgLsiZSU


Code is on https://github.com/EifelMono/Tausendblatt
Comment 1 Sandy Armstrong [MSFT] 2015-11-05 19:06:04 UTC
Thanks for the report. Having code to test is always super helpful.

This is a bug in our exception handling, mostly. Although we maintain a GC handle to each view, that doesn't necessarily extend to the values of the properties of each view.

What's happening here is that you're trying to inspect a disposed view (note that you needed to refresh your app, creating a new view hierarchy). Loading its properties is what results in an eventual ObjectDisposedException. If you were to refresh the visual tree in the Inspector client, you'd be good to go again.

On our end, we are mishandling the ObjectDisposedException, letting it propagate and crash your app. I'll fix that.

Longer-term, perhaps we could use exceptions like that as a signal to tell the client (or prompt the user) to refresh the visual tree.
Comment 2 Sandy Armstrong [MSFT] 2015-11-13 12:25:22 UTC
Will be fixed in next release.