Bug 10558 - Xamarin Studio doesn't load on windows 8 pro
Summary: Xamarin Studio doesn't load on windows 8 pro
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 4.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-02-21 18:16 UTC by John Colgrove
Modified: 2013-03-21 13:24 UTC (History)
3 users (show)

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


Attachments
The latest log (579 bytes, application/octet-stream)
2013-02-21 20:06 UTC, John Colgrove
Details
Results fromt he scan (3.89 MB, application/octet-stream)
2013-02-26 00:55 UTC, John Colgrove
Details
Potentially fixed MonoDevelop.Ide.dll (3.78 MB, application/x-msdownload)
2013-02-26 23:33 UTC, Mikayla Hutchinson [MSFT]
Details
Latest Log (185.65 KB, application/octet-stream)
2013-02-26 23:57 UTC, John Colgrove
Details
Xamarin Studio Log File (358 bytes, application/octet-stream)
2013-02-27 07:47 UTC, Martyn Swanick
Details
Updated MonoDevelop.Core.dll (954.00 KB, application/x-msdownload)
2013-02-28 00:08 UTC, Mikayla Hutchinson [MSFT]
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 John Colgrove 2013-02-21 18:16:45 UTC
I just installed Xamarin Studio on my Windows 8 Pro laptop but it doesn't run. When I click on the icon it gets highlighted like it wants to run but the highlighting goes away and therefor doesn't load the Xamarin Studio. I tried repairing the installation, installing the full mono framework, installing just mono with the new GTK# version, the full installation of mono with the new GTK# version and nothing. I also tried to run it with just the new GTK# version and no Mono Framework, thus trying to get it to load with .net framework 4.5 but nothing still. What's going on?
Comment 1 Mikayla Hutchinson [MSFT] 2013-02-21 19:55:24 UTC
Is there anything on the log?

AppData\Local\XamarinStudio-4.0\Logs
Comment 2 John Colgrove 2013-02-21 20:06:18 UTC
Created attachment 3449 [details]
The latest log

I guess I didn't know where to find a log before. I attached a log for you.
Comment 3 John Colgrove 2013-02-25 22:27:35 UTC
Any update on this since I attached a log?
Comment 4 Mikayla Hutchinson [MSFT] 2013-02-25 23:23:18 UTC
I looks like Xamarin Studio can't find GTK. Is "C:\Program Files (x86)\GtkSharp\2.12\bin" GTK in your PATH environment variable?

As a quick check, can you try running this in a command prompt and attach the output here?

gtk-query-immodules-2.0.exe
Comment 5 John Colgrove 2013-02-25 23:37:20 UTC
Here is the output and yes it looks like GTK is in the PATH environment variable:

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\Users\Arcadia>gtk-query-immodules-2.0.exe
# GTK+ Input Method Modules file
# Automatically generated file, do not edit
# Created by gtk-query-immodules-2.0.exe from gtk+-2.24.13
#
# ModulesPath = C:\Users\Arcadia\.gtk-2.0\2.10.0\i686-w64-mingw32\immodules;C:\U
sers\Arcadia\.gtk-2.0\2.10.0\immodules;C:\Users\Arcadia\.gtk-2.0\i686-w64-mingw3
2\immodules;C:\Users\Arcadia\.gtk-2.0\immodules;C:\Program Files (x86)\GtkSharp\
2.12\lib\gtk-2.0\2.10.0\i686-w64-mingw32\immodules;C:\Program Files (x86)\GtkSha
rp\2.12\lib\gtk-2.0\2.10.0\immodules;C:\Program Files (x86)\GtkSharp\2.12\lib\gt
k-2.0\i686-w64-mingw32\immodules;C:\Program Files (x86)\GtkSharp\2.12\lib\gtk-2.
0\immodules
#
Comment 6 Mikayla Hutchinson [MSFT] 2013-02-26 00:42:14 UTC
Yes, that appears to be correct.

Perhaps we're assuming some dependency which isn't present. Could you please could download the 32-bit  version of Dependency Walker, run it on C:\Program Files (x86)\GtkSharp\2.12\bin\libgtk-win32-2.0-0.dll, save the scan and attach it?
Comment 7 John Colgrove 2013-02-26 00:55:05 UTC
Created attachment 3480 [details]
Results fromt he scan

Sure, here you go.
Comment 8 Mikayla Hutchinson [MSFT] 2013-02-26 18:31:56 UTC
Hm, that looks exactly the same as on my machine.

Do you have any other GTK+ apps installed, e.g. GIMP, Inkscape, Pidgin?
Comment 9 John Colgrove 2013-02-26 21:02:48 UTC
Not that I know of. I do have libre office installed but I'm not sure if it uses gtk+ or not. I also have linux running on the same computer and that I know for a fact has GTK+ apps on it.
Comment 10 Mikayla Hutchinson [MSFT] 2013-02-26 23:33:45 UTC
Created attachment 3495 [details]
Potentially fixed MonoDevelop.Ide.dll

Here's a potential fix that also does some additional logging. Could you please copy it over the existing MonoDevelop.Ide.dll in C:\Program Files (x86)\Xamarin Studio\bin, try to run XS again, and attach the log?
Comment 11 John Colgrove 2013-02-26 23:57:28 UTC
Created attachment 3496 [details]
Latest Log

Xamarin Studio runs now, but it produced this log.
Comment 12 Mikayla Hutchinson [MSFT] 2013-02-27 02:54:22 UTC
Interesting. I'm glad we made progress, but those are some really weird errors. .NET seems to think that one of our remoted helper processes is loading its assemblies from a network location - but that location is the C drive.

Are you on a AD domain? Do you have group policies applied to your machine, or maybe a networked C drive (if that's possible)?

I don't think these particular error will cause problem for anything except loading custom controls in the toolbox for ASP.NET and GTK#, but it's possible other remote process such as the msbuild builder could break. Have you noticed any problems using XS?
Comment 13 John Colgrove 2013-02-27 04:12:49 UTC
What's an AD domain? I don't believe I have any group policies applied or a networked C drive. No clue where to check. I do have problems using XS. Two errors.

This one happened when I created a GTK# project and every time I load it pops up:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Void MonoDevelop.Projects.SolutionItem.add_ExecutionTargetsChanged(System.EventHandler)'.

   at MonoDevelop.Components.MainToolbar.MainToolbar.TrackStartupProject()

   at MonoDevelop.Components.MainToolbar.MainToolbar.HandleCurrentSelectedSolutionChanged(Object sender, SolutionEventArgs e)

   at MonoDevelop.Ide.ProjectOperations.OnCurrentSelectedSolutionChanged(SolutionEventArgs e)

   at MonoDevelop.Ide.ProjectOperations.set_CurrentSelectedWorkspaceItem(WorkspaceItem value)

   at MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectSolutionPad.OnSelectionChanged(Object sender, EventArgs args)

   at System.EventHandler.Invoke(Object sender, EventArgs e)

   --- End of inner exception stack trace ---

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

   at System.Delegate.DynamicInvokeImpl(Object[] args)

   at GLib.Signal.ClosureInvokedCB(Object o, ClosureInvokedArgs args)

   at GLib.SignalClosure.Invoke(ClosureInvokedArgs args)

   at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)

This one happens every time I exit the program:

System.MissingMethodException: Method not found: 'Void MonoDevelop.Projects.SolutionItem.add_ExecutionTargetsChanged(System.EventHandler)'.

   at MonoDevelop.Components.MainToolbar.MainToolbar.TrackStartupProject()

   at MonoDevelop.Components.MainToolbar.MainToolbar.HandleCurrentSelectedSolutionChanged(Object sender, SolutionEventArgs e)

   at MonoDevelop.Ide.ProjectOperations.OnCurrentSelectedSolutionChanged(SolutionEventArgs e)

   at MonoDevelop.Ide.ProjectOperations.set_CurrentSelectedWorkspaceItem(WorkspaceItem value)

   at MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectSolutionPad.OnCloseWorkspace(Object sender, WorkspaceItemEventArgs e)

   at MonoDevelop.Ide.RootWorkspace.NotifyItemRemovedGui(WorkspaceItem item, Boolean reloading)

   at MonoDevelop.Ide.RootWorkspace.NotifyItemRemoved(WorkspaceItem item)

   at MonoDevelop.Ide.RootWorkspaceItemCollection.RemoveItem(Int32 index)

   at System.Collections.ObjectModel.Collection`1.Remove(T item)

   at MonoDevelop.Ide.RootWorkspace.Close(Boolean saveWorkspacePreferencies, Boolean closeProjectFiles)
Comment 14 Martyn Swanick 2013-02-27 07:47:09 UTC
Created attachment 3498 [details]
Xamarin Studio Log File

As discussed in http://forums.xamarin.com/discussion/1506/xamarin-studio-fails-to-start-due-to-missing-libgtk-win32-2-0-0-dll I have been having the exact same issue on a Windows 7 x64 box.

I tried the new MonoDevelop.Ide.dll, like John Xamarin studio now opens and I get  nearly the exact same log file created.
Comment 15 Mikayla Hutchinson [MSFT] 2013-02-27 16:33:12 UTC
The MissingMethodException is because I just have you an updated MonoDevelop.Ide.dll - it depends on changes in MonoDevelop.Core.dll. I'll attach that in a bit.

I'm beginning to suspect this may be due to the SafeDllSearchMode key. Do you see any value for this key in regedit?

HKLM\System\CurrentControlSet\Control\Session Manager\SafeDllSearchMode
Comment 16 John Colgrove 2013-02-27 21:08:46 UTC
I don't have SafeDllSearchMode in that path.
Comment 17 Mikayla Hutchinson [MSFT] 2013-02-28 00:06:41 UTC
I think I figured out those assembly load exceptions. It's because your web browser marked the updated MonoDevelop.Ide.dll as "from the internet" and therefore potentially unsafe:
http://screencast.com/t/duWm3eTrHn
Comment 18 Mikayla Hutchinson [MSFT] 2013-02-28 00:08:10 UTC
Created attachment 3507 [details]
Updated MonoDevelop.Core.dll

Here's the updated MonoDevelop.Core.dll that should fix that MissingMethodException. Don't forget to "Unblock" this one too!
Comment 19 John Colgrove 2013-02-28 02:32:19 UTC
It's fixed now. Thanks.
Comment 20 Martyn Swanick 2013-02-28 04:12:00 UTC
Yeah, brilliant, that's reduced the logging to:

ERROR [2013-02-28 09:07:27Z]: Failed to load MonoAndroid entitlements: Invalid entitlements
WARNING [2013-02-28 09:07:27Z]: First run content index not found.
node `classlib-gecko' is not defined on the documentation map
node `classlib-taglib-sharp' is not defined on the documentation map
node `classlib-webkit' is not defined on the documentation map


Unsure if those are important or not but it seems to be working now. 

If you don't mind me asking, what did you change with your detection of GTK# to get this working? When investigating this myself I noticed I couldn't get a single app that depended on GTK# to load so would by nice to know.

Thanks!
Comment 21 Mikayla Hutchinson [MSFT] 2013-02-28 15:41:01 UTC
I use SetDllDirectory to override the dll search locations instead of depending on PATH: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx#alternate_search_order_for_desktop_applications

Her's the fix: https://github.com/mono/monodevelop/commit/ad672ce79a50ce844398ae30cce8005163e41d0e