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
GitHub or 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.
Created attachment 16176 [details]
In an embedding scenario, I am calling mono_class_is_subclass_of on a class and an interface. In this case the class does actually implement the interface so I would expect TRUE to be returned. However, if the class has not been initialized the call returns FALSE since the interface check fails.
My assumption is that mono_class_is_subclass_of (and all embedding APIs) would call mono_class_init as needed. If this is not the case, I can work around it but it probably needs documented.
unzip the attachment on OSX.
Edit build.sh to a local mono install
The final line of the output will read: mono_class_if_subclass_of: 0
Edit main.c to call mono_class_init on the klass
The final line of the output will read: mono_class_if_subclass_of: 1
Fixed in mono master 97634ecfae6b2b7ec4b1efd0e1a1fdcd23e69224.