Bug 900 - Could not access to directory: /Users/fejj/Projects.
Summary: Could not access to directory: /Users/fejj/Projects.
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: Trunk
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-09-19 10:19 UTC by Jeffrey Stedfast
Modified: 2011-11-15 15:05 UTC (History)
2 users (show)

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

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 Jeffrey Stedfast 2011-09-19 10:19:19 UTC
This should probably be worded differently, "Could not access *to* directory" doesn't make sense.

But that's only a minor detail compared to the rest. It doesn't seem to be at all related to having or not having access to directories:

GLib.GException: Unrecognized image file format
  at Gdk.PixbufLoader.Write (System.Byte[] buf, UInt64 count) [0x00036] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/PixbufLoader.cs:312 
  at Gdk.PixbufLoader.Write (System.Byte[] bytes, UInt32 count) [0x00000] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/PixbufLoader.custom:47 
  at Gdk.PixbufLoader.InitFromBuffer (System.Byte[] buffer) [0x00000] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/PixbufLoader.custom:127 
  at Gdk.PixbufLoader..ctor (System.Byte[] buffer, Int32 width, Int32 height) [0x0000e] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/PixbufLoader.custom:137 
  at Gdk.Pixbuf..ctor (System.Byte[] buffer, Int32 width, Int32 height) [0x0000b] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/Pixbuf.custom:141 
  at MonoDevelop.MacIntegration.MacPlatformService.OnGetPixbufForFile (System.String filename, IconSize size) [0x00108] in /Users/fejj/src/xamarin/monodevelop/main/src/addins/MacPlatform/MacPlatform.cs:334 
  at MonoDevelop.Ide.Desktop.PlatformService.GetPixbufForFile (System.String filename, IconSize size) [0x0001f] in /Users/fejj/src/xamarin/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs:141 
  at MonoDevelop.Ide.DesktopService.GetPixbufForFile (System.String filename, IconSize size) [0x00000] in /Users/fejj/src/xamarin/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs:124 
  at MonoDevelop.Ide.Gui.Components.FileBrowser.Populate () [0x0005f] in /Users/fejj/src/xamarin/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/FileBrowser.cs:141
Comment 1 Jeffrey Stedfast 2011-09-19 10:21:11 UTC
FWIW the files in my Solution tree that don't have icons are *.png files, *.plist files and *.sqlite files (all of which I think used to have a plain sheet of paper as an icon)
Comment 2 Mikayla Hutchinson [MSFT] 2011-09-19 10:54:19 UTC
Should be fixed. Can you confirm?
Comment 3 Jeffrey Stedfast 2011-09-19 11:14:56 UTC
Unfortunately not :-(

Still getting the same issue after updating to:

commit 01031cf1c28837ed10b430551e0e2eb6619c0593
Author: Michael Hutchinson <m.j.hutchinson@gmail.com>
Date:   Mon Sep 19 16:53:49 2011 +0200

    [MacPlatform] Fix icon lookup fallback



Could not access to directory: /Users/fejj.

GLib.GException: Unrecognized image file format
  at Gdk.PixbufLoader.Write (System.Byte[] buf, UInt64 count) [0x00036] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/PixbufLoader.cs:312 
  at Gdk.PixbufLoader.Write (System.Byte[] bytes, UInt32 count) [0x00000] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/PixbufLoader.custom:47 
  at Gdk.PixbufLoader.InitFromBuffer (System.Byte[] buffer) [0x00000] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/PixbufLoader.custom:127 
  at Gdk.PixbufLoader..ctor (System.Byte[] buffer, Int32 width, Int32 height) [0x0000e] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/PixbufLoader.custom:137 
  at Gdk.Pixbuf..ctor (System.Byte[] buffer, Int32 width, Int32 height) [0x0000b] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/Pixbuf.custom:141 
  at MonoDevelop.MacIntegration.MacPlatformService.OnGetPixbufForFile (System.String filename, IconSize size) [0x00108] in /Users/fejj/src/xamarin/monodevelop/main/src/addins/MacPlatform/MacPlatform.cs:334 
  at MonoDevelop.Ide.Desktop.PlatformService.GetPixbufForFile (System.String filename, IconSize size) [0x0001f] in /Users/fejj/src/xamarin/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs:141 
  at MonoDevelop.Ide.DesktopService.GetPixbufForFile (System.String filename, IconSize size) [0x00000] in /Users/fejj/src/xamarin/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs:124 
  at MonoDevelop.Ide.Gui.Components.FileBrowser.Populate () [0x0005f] in /Users/fejj/src/xamarin/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/FileBrowser.cs:141 




Could not access to directory: /Users/fejj/Projects.

GLib.GException: Unrecognized image file format
  at Gdk.PixbufLoader.Write (System.Byte[] buf, UInt64 count) [0x00036] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/PixbufLoader.cs:312 
  at Gdk.PixbufLoader.Write (System.Byte[] bytes, UInt32 count) [0x00000] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/PixbufLoader.custom:47 
  at Gdk.PixbufLoader.InitFromBuffer (System.Byte[] buffer) [0x00000] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/PixbufLoader.custom:127 
  at Gdk.PixbufLoader..ctor (System.Byte[] buffer, Int32 width, Int32 height) [0x0000e] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/PixbufLoader.custom:137 
  at Gdk.Pixbuf..ctor (System.Byte[] buffer, Int32 width, Int32 height) [0x0000b] in /Users/fejj/src/xamarin/bockbuild/profiles/monodevelop-mac-dev/build-root/gtk-sharp-2-12-branch/_build/mono-gtk-sharp-b078aac/gdk/generated/Pixbuf.custom:141 
  at MonoDevelop.MacIntegration.MacPlatformService.OnGetPixbufForFile (System.String filename, IconSize size) [0x00108] in /Users/fejj/src/xamarin/monodevelop/main/src/addins/MacPlatform/MacPlatform.cs:334 
  at MonoDevelop.Ide.Desktop.PlatformService.GetPixbufForFile (System.String filename, IconSize size) [0x0001f] in /Users/fejj/src/xamarin/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs:141 
  at MonoDevelop.Ide.DesktopService.GetPixbufForFile (System.String filename, IconSize size) [0x00000] in /Users/fejj/src/xamarin/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs:124 
  at MonoDevelop.Ide.Gui.Components.FileBrowser.Populate () [0x0005f] in /Users/fejj/src/xamarin/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/FileBrowser.cs:141
Comment 4 Jeffrey Stedfast 2011-09-19 11:33:05 UTC
This might help... I added some CWL's to that method to see which path it was taking (rooted vs non-rooted):


Getting icon for rooted filename: /Users/fejj/Desktop
ERROR [2011-09-19 11:31:34Z]: Could not access to directory: /Users/fejj
GLib.GException: Unrecognized image file format

			//FIXME: better handling of names of files that haven't been saved yet
			if (Path.IsPathRooted (filename)) {
				icon = NSWorkspace.SharedWorkspace.IconForFile (filename);
				Console.WriteLine ("Getting icon for rooted filename: {0}", filename);
			} else {
				icon = NSWorkspace.SharedWorkspace.IconForFile ("/tmp/" + filename);
				Console.WriteLine ("Getting icon for tmp filename: {0}", filename);
			}
Comment 5 Mikayla Hutchinson [MSFT] 2011-09-19 12:29:13 UTC
Some things that could be investigated:
1) the method's called OnGetPixbufForFile, why is MD passing a folder to it?
2) can we improve the error message, e.g. "error getting icon for file"?
3) can we do more error checking before we try to give the Pixbuf ctor bad data?

We could also do some File.Exists checks, and only use IconForFile if the file exists and is rooted, else if the file has an extension use IconForFileType, else return base.
Comment 6 Jeffrey Stedfast 2011-11-15 15:05:53 UTC
I don't get this issue for 2.8.x releases, I was only seeing this in my bockbuild 2.7.x builds.