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.
Extremely not-funny bug:
For some reason MonoDevelop decides that the C# files which correspond to the view controller in my storyboard do not exist.
It therefore writes new copies of them and adds them back to the project.
* I get two copies of the same file in my solution panel.
* My code for the view controller is completely nuked.
This started happening while we were refactoring our project. Maybe our project got corrupted? Anyway, this is extremely annoying as it means our work randomly gets wiped out (good thing we use git).
I've attached a listing of files in the project tree, which ones do you need to debug this?
Installation UUID: 46adcb2c-0fef-4128-a852-9a6bc9a39109
Mono 2.10.9 (tarball)
Package version: 210090011
Apple Developer Tools:
Xcode 4.4 (1484)
Mono for Android: 184.108.40.206234518
Android SDK: /Users/ruben/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
Version: 1.6 ApiLevel: 4
Version: 2.1 ApiLevel: 7
Version: 2.2 ApiLevel: 8
Version: 2.3 ApiLevel: 10
Version: 3.1 ApiLevel: 12
Version: 4.0 ApiLevel: 14
Version: 4.0.3 ApiLevel: 15
Java SDK: /usr/bin
Release ID: 30003005
Git revision: 3d53e1366933298a3fe0cdc6d0f7d00c9916564c-dirty
Build date: 2012-07-27 19:06:34+0000
Xamarin addins: 73ecde7c48d943adb6e33d511d3cf0661d006801
Mac OS X 10.8.0
Darwin tsukuba.local 12.0.0 Darwin Kernel Version 12.0.0
Sun Jun 24 23:00:16 PDT 2012
*** Bug 8018 has been marked as a duplicate of this bug. ***
*** Bug 6003 has been marked as a duplicate of this bug. ***
I've just committed a partial fix for this, which just prevents files from being added to the project multiple times (which, unfortunately, is just a minor bug in the grand scheme of the issue here).
I'm looking into the logic that scans storyboards for classes that it doesn't know about.
I've got a few questions that will hopefully help me track it down:
1. When MonoDevelop wrongly decides that a class doesn't exist, when it clobbers your existing source file, does the namespace stay the same?
I'm wondering if maybe it has something to do with the namespace...
2. can you get me a copy of an Xcode4Sync-<date>.log file for a session where this happens for you? You can find the log in ~/Library/Logs/MonoDevelop-3.0/Xcode4Sync-<date>.log
It might provide some clues...
Actually, perhaps I can add some more logging logic and provide you with a custom build from git master to hopefully narrow this down.
3. It sounds like for Ruben, this is happening for classes defined in Storyboards and not in xibs? Is this the same with everyone else having this problem? I've been looking at the regular header-file sync-back logic, but perhaps the bug is in the logic that scans Storyboards and decides whether or not to generate a new class. Will begin looking here...
Can you guys try out http://files.xamarin.com/~jeff/MonoDevelop-5d3d232b6f294e0e486121f872bd6d58be47b153.dmg and see if that fixes this bug?
I haven't had any luck reproducing the problem so this is a bit like shooting in the dark :-(
Another update which fixes some applescript exception handling:
Hi Jeffrey, I'll have a go at it in a bit. Our hit rate for triggering this is pretty big so it shouldn't be too hard. When I run into it, do you need anything besides the Xcode4Sync-<date>.log file?
Can't seem to reproduce it with the attached version. Will keep on testing though.
Ruben, thanks for testing!
If you are able to reproduce it, the Xcode4Sync will hopefully be all I need.
Does your Xcode4Sync log contain any messages like the following?
Generating custom class: ProjectNamespace.ClassName
File 'ClassName.cs' already exists; ignoring.
[2012-11-14 14:38:15.9] Generating custom class: SalesApp.iOS.LeadsViewController
[2012-11-14 14:38:15.9] File 'SalesApp.iOS/ProductCatalogue/LeadsViewController.cs' already exists; ignoring.
Yup. That is, by the way, the one where MD insisted on eating the code.
fudge. I was hoping you wouldn't have any of those... this indicates that the core bug still exists, it's just that my safety-net logic is preventing it from clobbering your existing code.
Could you send me your log file? maybe I can get a better idea of what is leading up to that
Created attachment 2920 [details]
I've installed the MonoDevelop from comment 6, and Xcode is still eating my code. I couldn't find the "already exists" in the log but I'm adding it anyway. I hope it helps. If you need more info, please let me know...
Thanks Ruben & Jan. I'll keep digging.
Okay, got another potential fix (and more verbose logging):
I periodically delete the temp dmgs that I upload because it starts using a lot of space after a while.
anyway, the fixes I did are probably in the 3.1.1 release that is in Beta right now.
Any updates on this? Can either of you reproduce these problems with MonoDevelop 3.1.1?
Haven't been able to do so recently. You can probably consider this as fixed. Thanks a lot!
ok, reopen if you hit it again!