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.
After adding an image to this project, while Xcode is closed, I got this exception:
System.IO.DirectoryNotFoundException: Directory '/Users/jackson/Projects/edictate/edictate/eDictate3/obj/Xcode/6' not found.
at System.IO.Directory.ValidateDirectoryListing (System.String path, System.String searchPattern, System.Boolean& stop) [0x00000] in <filename unknown>:0
at System.IO.Directory+<EnumerateKind>c__Iterator0.MoveNext () [0x00000] in <filename unknown>:0
at MonoDevelop.MacDev.XcodeSyncing.XcodeMonitor.ScanForAddedFiles (MonoDevelop.MacDev.XcodeSyncing.XcodeSyncBackContext ctx, System.Collections.Generic.HashSet`1 knownFiles, System.String directory, System.String relativePath) [0x000e7] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs:195
at MonoDevelop.MacDev.XcodeSyncing.XcodeMonitor.GetChanges (IProgressMonitor monitor, MonoDevelop.MacDev.ObjCIntegration.NSObjectInfoService infoService, MonoDevelop.Projects.DotNetProject project) [0x00043] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs:242
at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.SyncXcodeChanges (IProgressMonitor monitor) [0x00017] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:345
Followed by this exception:
System.NullReferenceException: Object reference not set to an instance of an object
at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.OpenFileInXcodeProject (System.String path) [0x00056] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:166
I added a Directory.Exists() before requesting a dir listing which should prevent the first exception, but not sure how it's happening in the first place (I mean, I doubt you rm -rf'd /Users/jackson/Projects/edictate/edictate/eDictate3/obj/Xcode/6 yourself)
I think I figured out how the second exception happened (MD got into an inconsistent state due to the first exception).
Added a try-finally around XcodeSyncChanges() so that won't happen.