Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 9445 [details]
Screenshot Subclassed NSTextview pretending to be NSEvent
I keep getting weird things I have subclassed being passed to NSEvent methods
PerformKeyEquivalent( NSEvent aEvent) on subclassed TextField being passed not NSEvent but NSView
public override void SendEvent(NSEvent aEvent) on Window being passed subclassed NSTextView.
See Picture Attached.
Could you attach an example showing this and what version of Xamarin Studio / Xamarin.Mac you are using.
I just tried and i'm seeing seems pretty reasonable:
Does not seem to be a issue now. I believe it might to do with GC, Since I have done a lot of clean up of removing Events when removing the View, It no longer shows.
Created attachment 12195 [details]
Constrained example csproj
I am attaching a constrained example that reproduces this bug. In order to use, build and run this example. Watch the Console output. After seeing "Reload Data" a couple times, type into the keyboard. You will see in the Console Output that our override for NSWindow.SendEvent is receiving invalid NSEvents.
You can reproduce a worse version of the same error by dragging the window using the image on the right. In this case, the NextEvent function throws an exception because it is trying to cast an invalid NSEvent.
Also: I just rolled back to Xamarin.Mac 126.96.36.199 and this stopped happening.
I was able to reproduce the issue on 188.8.131.52. I'll look into it.
I was curious myself and noticed the following point
NSLabelCellView is using Layer, which should be no problem.
but comment the following out and its no problem. Not sure if that helps ?
// WantsLayer = true;
// Layer.BackgroundColor = NSColor.White.CGColor;
Ok you don't; need it in the example but perhaps a work around is to paint the background on the DrawRect Method ?
Just wondering what the progress is on this. The 2.3 builds in the Alpha channel are still exhibiting this bug, which means that we won't be able to release for El Capitan!
Sorry or the long delay in response.
This issue appears to be fixed in the latest XM in stable. Please reopen with steps to reproduce if you are still running into trouble.