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.
I recently updated to monotouch 5.0, but every time I try to open any .xib from my project (note that this project was created with an older version of MonoDevelop and MonoTouch), it just shows this error and nothing follows :
Error updating Objective-C type information. Argument cannot be null.
Parameter name: type.
here's the call stack :
That's weird, it looks like it's getting a base class IType from the type database converting it to a type name string, then later is unable to resolve the string back to an IType.
Do you have a sample that we can use to reproduce this? If you can't reduce it to a test case and don't want to share the project publicly, you can mark it as private or send it privately to email@example.com.
I found the cause :
I made a generic controller inheriting from UIViewController (GenericController<T> : UIViewController), i then derived from that (StringController : GenericController<string>) and now every time i try to open a xib in that project from monodevelop, i get the error on from my first post.
note that GenericController has no xib and that StringController has one.
I'll add a test project.
Created attachment 782 [details]
Test Project for "Error updating Objective-C type"
Try to open any xib file from the project from inside monodevelop and it with won't work.
I reopened my test project and opening xib files seemed to work.
Then i just opened another project, closed it and reopened my test case and it stopped working again. I'm not yet sure what all the conditions are for the bug to occur, but right now i have the project opened and everytime i try to open a xib file, it doesn't work, and it just worked minutes ago, with the exact same project.
Thanks Louis, the "switching to another project and then back" trick was useful info. I'm able to reproduce this.
Now I just gotta figure out why...
Okay, so... if you add a [Register ("GenericController")] attr to GenericController.cs, it works fine.
Okay, got a fix for this. In the code that converts C# types to ObjC types, for the BaseCliType, we need to use type.BaseType.DecroatedFullName instead of just FullName because FullName leaves off generics decorations.