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 185 [details]
Reproduces the infinite loop detailed in the bug description
The method MonoMac.ObjCRuntime.Class.Lookup() enters an infinite loop when looking up an object whose root superclass is not registered with MonoMac, for example NSProxy.
One real-world example of this occurs when generating a print preview in the standard Print panel and trying to obtain the current graphics context using NSGraphicsContext.CurrentContext. The object returned is a subclass of NSProxy, not NSObject.
The attached MD project reproduces the bug.
I am using OS X 10.6.8, MonoMac from git, MonoDevelop 2.6RC2 and MonoMac add-in 22.214.171.124.
This was likely fixed a while ago. Running the attachment now throws:
System.ArgumentException has been thrown
Could not find a valid superclass for type NSPrintPreviewGraphicsContext. Did you forget to register the bindings at MonoMac.ObjCRuntime.Class.Register() or call NSApplication.Init()?