Bug 7550 - Exception when double clicking xib in new project
Summary: Exception when double clicking xib in new project
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 3.0.x
Hardware: Macintosh Mac OS
: --- major
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-09-30 10:37 UTC by Mike Bluestein
Modified: 2013-11-01 03:40 UTC (History)
4 users (show)

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


Attachments
test case (7.58 KB, application/zip)
2012-09-30 10:37 UTC, Mike Bluestein
Details


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:
Status:
RESOLVED FIXED

Description Mike Bluestein 2012-09-30 10:37:36 UTC
Created attachment 2650 [details]
test case

Description of Problem:

I made a new proj named "testcase" and then got this error when double-clicking the xib for the vc:

System.ArgumentException: Multiple types (testcase.AppDelegate and TestCase.AppDelegate) registered with the same Objective-C name: AppDelegate
  at MonoDevelop.MacDev.ObjCIntegration.NSObjectProjectInfo.Update () [0x00118] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.4-branch/ea010826/source/monodevelop/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs:98 
  at MonoDevelop.MacDev.ObjCIntegration.NSObjectProjectInfo.Update (Boolean force) [0x0000c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.4-branch/ea010826/source/monodevelop/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs:72 
  at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.UpdateTypes (IProgressMonitor monitor) [0x00031] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.0.4-branch/ea010826/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:415

Here's the version info:

MonoDevelop 3.0.4.7
Installation UUID: 19aae8d9-e5eb-4aef-a2fc-1d5f35cb7e69
Runtime:
	Mono 2.10.9 (tarball)
	GTK 2.24.10
	GTK# (2.12.0.0)
	Package version: 210090011
Apple Developer Tools:
	 Xcode 4.5 (1839)
	 Build 4G182
Monotouch: 6.0.2
Mono for Android: 4.2.7
Android SDK: /Developer/SDKs/android-sdk-mac_x86
	Supported Android versions:
		2.2   (API level 8)
		2.3   (API level 10)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
Java SDK: /usr
Build information:
	Release ID: 30004007
	Git revision: ea0108260c6a376ecaeffcdb7d03387bd51edda3
	Build date: 2012-09-17 14:09:17+0000
	Xamarin addins: ec43fd5cb223ead4234a9858d1b56eef03dad53a-dirty
Operating System:
	Mac OS X 10.8.2
	Darwin Michaels-MacBook-Air.local 12.2.0 Darwin Kernel Version 12.2.0
	    Sat Aug 25 00:48:52 PDT 2012
	    root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
Comment 1 Mikayla Hutchinson [MSFT] 2012-09-30 17:18:47 UTC
Any idea where the type "TestCase.AppDelegate" could have come from? Did you do anything after creating the project? It works fine for me...
Comment 2 Mike Bluestein 2012-09-30 17:33:18 UTC
Hi Michael,

I created the project (named "testcase" all lower case) and double-clicked the xib...didn't do anything else.
Comment 3 Jeffrey Stedfast 2012-09-30 21:38:50 UTC
Sounds like a type system bug
Comment 4 Mike Krüger 2012-10-01 01:11:07 UTC
The project works for me.

Jeff: You should be more specific what doesn't work in the type system - if you say it's a bug there. I can't repro that one.
Comment 5 Marlon 2012-11-16 12:01:31 UTC
This has happened to me a couple times too, and it's annoying. For me it seems to only happen when I've imported an outside Reference project, for example: Clancey's UICalendar. 

This morning I discovered that you don't need the AppDelegate.cs inside that referenced project folder (which is in a blue folder); you only need the one inside your main project folder. Delete the former and the double-click to open the NIB should work again
Comment 6 Sebastien NUSSBAUMER 2013-03-05 11:18:44 UTC
I've just had this problem today and have a real repro that works 100%.
Complete Repro : 
 1. Create a new solution with template "iOS Universal Master-Detail Application" in Xamarin Studio (XS) Mac, with Name "testcase"
 2. Double click on one of the xib file to verify that the file opens in Xcode.
 3. Close XCode AND XS
 4. In Finder delete the "testcase" folder (solution and project)
 5. Open XS
 6. Repeat step 1 but change the case of the project name, for example "TestCase".
 7. Double click on one the the xib file and you'll get the "Error updating Objective-C type information. Multiple etc..." message.

Notes : 
If you show the "Classes" panel, you will see "Solution TestCase", "TestCase" (the project), and under it you'll see TWO namespaces : "testcase" AND "TestCase". This is where the problem comes from

This is how I solved my problem : 
 1. Close XS
 2. Delete ~/Library/Caches/XamarinStudio-4.0 folder
 3. Open XS : voilà everything works again now !
Maybe overkill but didn't find how to refresh what was needed in XS.
Comment 7 Jeffrey Stedfast 2013-10-01 13:47:29 UTC
haven't gotten any reports of this in months, so it's probably fixed now
Comment 8 Adam 2013-11-01 03:40:05 UTC
Reproduced on XS 4.0.14 (Build 5)

Error updating Objective-C type information. Multiple types (Lawfusion_ipad.AppDelegate and LawFusion_iPad.AppDelegate) registered with the same Objective-C name: AppDelegate

System.ArgumentException: Multiple types (Lawfusion_ipad.AppDelegate and LawFusion_iPad.AppDelegate) registered with the same Objective-C name: AppDelegate
  at MonoDevelop.MacDev.ObjCIntegration.NSObjectProjectInfo.Update () [0x00118] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.14-branch/8ecd3543/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs:92 
  at MonoDevelop.MacDev.ObjCIntegration.NSObjectProjectInfo.Update (Boolean force) [0x0000e] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.14-branch/8ecd3543/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs:68 
  at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.UpdateTypes (IProgressMonitor monitor) [0x00040] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.14-branch/8ecd3543/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:483