Bug 6079 - Underlying mono runtime crashes when you expand NSEvent in MonoMac
Summary: Underlying mono runtime crashes when you expand NSEvent in MonoMac
Alias: None
Product: MonoMac
Classification: Desktop
Component: Bindings ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-07-11 11:01 UTC by Chris Hamons
Modified: 2015-02-17 14:03 UTC (History)
3 users (show)

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

Call Stack (3.22 KB, text/plain)
2012-07-11 11:01 UTC, Chris Hamons

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 or GitHub 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 Chris Hamons 2012-07-11 11:01:29 UTC
Every time I try to expand an NSEvent in MonoDevelop, it crashes the underlying Mono runtime (see attached stack trace).

I can reproduce this consistently.
Comment 1 Chris Hamons 2012-07-11 11:01:50 UTC
Created attachment 2185 [details]
Call Stack
Comment 2 Mikayla Hutchinson [MSFT] 2012-07-11 14:10:17 UTC
This could be problematic. It looks like several properties on NSEvent are only valid if the event is of a particular type; if not, then obj-c will throw an exception, which Mono cannot currently handle.

Maybe we could use a debugger proxy object that would return default for those properties if/when the event is not of the correct type.
Comment 3 Martin Baulig 2012-08-13 20:43:17 UTC
This is not perfect yet, but here's an implementation which at least fixes this for key and mouse events:
Comment 4 Martin Baulig 2012-08-21 15:22:04 UTC
I added [DebuggerBrowsableState.Never] to all the events on the base class, so expanding the "Raw View" will no longer crash.

Still need to test for events other than key or mouse.
Comment 5 Chris Hamons 2015-02-17 14:03:40 UTC
So, I'm responding to my past self here, but this has been fixed up in Xamarin.Mac 1.10.

Sorry me for the delay in response.

-- me