Bug 11063 - Xamarin Studio 4.0.1 - Menus appear blank after first show.
Summary: Xamarin Studio 4.0.1 - Menus appear blank after first show.
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Shell ()
Version: 4.0.1
Hardware: PC Windows
: Normal normal
Target Milestone: master
Assignee: Marius Ungureanu
URL:
Depends on:
Blocks:
 
Reported: 2013-03-12 04:55 UTC by Andras Zoltan
Modified: 2016-11-03 10:27 UTC (History)
12 users (show)

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


Attachments
Screen capture demonstrating disappearing menus. Description in bug report. (3.53 MB, video/x-ms-wmv)
2013-03-12 04:55 UTC, Andras Zoltan
Details
Blank menu after first use on Xamarin Studio 4.0.1 and 4.0.2b (9.16 KB, image/png)
2013-03-13 09:06 UTC, Marios Karagiannis
Details
Log files (1.54 KB, application/x-zip-compressed)
2013-03-13 21:53 UTC, Brad Moore
Details
My copy of the IDE log (6.84 KB, application/octet-stream)
2013-03-14 04:56 UTC, Andras Zoltan
Details
Environment variables (2.23 KB, text/plain)
2013-03-15 00:57 UTC, Brad Moore
Details
Environment Variables (Andras Zoltan) (2.38 KB, text/plain)
2013-03-15 06:06 UTC, Andras Zoltan
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 Andras Zoltan 2013-03-12 04:55:50 UTC
Created attachment 3576 [details]
Screen capture demonstrating disappearing menus.  Description in bug report.

Running on Windows 8 x64 Enterprise edition.  I had a previous installation of MonoDevelop & MfA tools, but they have all been uninstalled.

The menu-items all appear blank after they first show, i.e. with no text or images, but also you can't click on them either on the second showing either - as you'll see from the attached video (it's a WMV).  There's not an awful lot more to add, I'm afraid, other than my software environment is pretty simple - Office 2013 and VS2012 are installed.

In the video I start by single-clicking menus (for some reason when running the screen capture, the menus don't auto-show when moving the mouse left to right).  I go through and open a few, demonstrating that each one, after displaying once, then appears blank, but the correct size.  I then move to keyboard input, using the cursor keys to navigate between some other menus that I've not shown yet, moving between them again to show the items disappearing.  I also show that the first sub menu on the 'File' menu still acts as a sub-menu - i.e. expanding - when you use the right cursor key.  Finally I start clicking the area with missing items to show that the menu items are not just empty, but don't respond to click events.

As a result of this, unfortunately Xamarin Studio is unusable on my machine.
Comment 1 Mikayla Hutchinson [MSFT] 2013-03-12 18:33:54 UTC
It looks like you have some other, broken GTK+ version in your PATH.

Are you certain you're using 4.0.1 and not 4.0?
Comment 2 Andras Zoltan 2013-03-12 19:02:37 UTC
Hi, yes definitely 4.0.1 as it updated just before I recorded the video. I'll check for an old GTK+ but I was quite careful to get rid of everything after initially having these problems.
Comment 3 Marios Karagiannis 2013-03-13 09:06:16 UTC
Created attachment 3597 [details]
Blank menu after first use on Xamarin Studio 4.0.1 and 4.0.2b
Comment 4 Marios Karagiannis 2013-03-13 09:06:59 UTC
Comment on attachment 3597 [details]
Blank menu after first use on Xamarin Studio 4.0.1 and 4.0.2b

I have the same problem on Windows 8 x64 with 4.0.1 and 4.0.2b. On first click all menus work, when I come back they are all blank as shown.
Comment 5 Andras Zoltan 2013-03-13 09:47:26 UTC
Looking in %PATH% shows c:\program files (x86)\gtksharp\2.12\bin - installed at the same time as the original Xamarin Studio installation.  I have no other GtkSharp installed.
Comment 6 Mikayla Hutchinson [MSFT] 2013-03-13 15:03:29 UTC
Can you please attach the context of the about box and the IDE log (AppData\Local\XamarinStudio-4.0\Ide.log)?
Comment 7 Brad Moore 2013-03-13 21:53:23 UTC
Created attachment 3608 [details]
Log files

Closed XS. Deleted all logs. Relaunched XS. Caused problem to occour. Closed XS. Zipped all logs that were in the folder.
Comment 8 Mikayla Hutchinson [MSFT] 2013-03-13 21:59:46 UTC
Ahah, these look very suspicious:

Gdk-Warning: gdkdrawable-win32.c:641: SelectObject failed: The operation completed successfully.
Gdk-Warning: gdkdrawable-win32.c:644: SelectObject failed: The handle is invalid.
Gdk-Warning: gdkdrawable-win32.c:660: SelectObject failed: The handle is invalid.
Gdk-Warning: gdkdrawable-win32.c:698: SelectObject failed: The handle is invalid.
Gdk-Warning: gdkdrawable-win32.c:711: MaskBlt failed: The operation completed successfully.
Gdk-Warning: gdkdrawable-win32.c:714: SelectObject failed: The handle is invalid.
Gdk-Warning: gdkdrawable-win32.c:715: SelectObject failed: The handle is invalid.
Comment 9 Andras Zoltan 2013-03-14 04:56:49 UTC
Created attachment 3610 [details]
My copy of the IDE log

Just adding a copy of my log - I've had a quick look through and can see exactly the same thing :)
Comment 10 Alan McGovern 2013-03-14 05:20:02 UTC
'BigBob85' in the #monotouch irc channel is reporting that he gets this error when building/running monodevelop from source:

http://pastebin.com/raw.php?i=zbFYR5WE

I recommended adding this try/catch to see if it would fix the vanishing toolbars issue for him, but it did not:

https://gist.github.com/alanmcgovern/c8c6ec56e92bece3426f
Comment 11 Alan McGovern 2013-03-14 05:41:36 UTC
So just to add more detail, Brad says that clicking on the menu bar to open a menu only works the first time you click on a menu. Every subsequent time it is empty. The gdk warning messages only appear when he clicks on the 'View' menu item.
Comment 12 Mikayla Hutchinson [MSFT] 2013-03-14 19:04:44 UTC
Maybe some other GTK+ app is setting an environment variable causing GTK+ to load the WIMP theme engine from some other GTK+ installation.

Could you attach a list of all your environment variables? You can get this by typing "set" in cmd.exe.
Comment 13 Brad Moore 2013-03-15 00:57:05 UTC
Created attachment 3621 [details]
Environment variables
Comment 14 Brad Moore 2013-03-15 05:56:59 UTC
Woot.

Workaround at the moment is to uninstall GtkSharp, remove its install directory, and then reinstall from new.

I am still using XS 4.0.2b at the moment.
Comment 15 Andras Zoltan 2013-03-15 06:06:16 UTC
Created attachment 3625 [details]
Environment Variables (Andras Zoltan)

My copy of environment variables.
Comment 16 Alan McGovern 2013-03-15 06:46:22 UTC
Brad sent me a copy of his original GtkSharp installation so I could run some tests on it and see what the problem was.

As far as I can tell, it's just a corrupt install. These are files in his bin directory which did *not* come with our gtk-sharp-2.12.20.msi. In the gist [0] I have put a listing of all files in his GtkSharp directory which were *not* installed by our installer. Some of the core gtk files like libcariro-2.dll are wrong. Our installer has one dated 4 Dec 2012 yet his installation has one which must've come from an older installer as it's dated 11 Sep 2009. Similarly for the theme engine like libwimp.

I am unsure what the best approach to fixing this is. Maybe we could re-issue a new installer which installs to GtkSharp/2.20 instead of GtkSharp/2.12 and will then remove the old directory from $PATH. We could also change our installer to look for previous GtkSharp installations and uninstall them before installing itself.

cc'ing in Duncan as this might need input from him if we're spinning a new installer.

[0] https://gist.github.com/alanmcgovern/5168941
Comment 17 Andras Zoltan 2013-03-15 06:53:48 UTC
Many of my GtkSharp files (Windows install) appear to have similar dates too.  Am reluctant to reinstall GtkSharp as I'll not be able to test any fix that you guys do roll out.

Am on a different project at the moment internally for the next week or two anyway - so I'll leave my install in a broken state for now and if a fix is available before, I can test it.
Comment 18 Mikayla Hutchinson [MSFT] 2013-04-08 14:32:56 UTC
This forum post seems to indicate that it case be caused by having two versions of GTK# installed:

http://forums.xamarin.com/discussion/2914/expanded-menus-are-blank-on-second-opening-and-random-blankness-in-other-fields-pages#latest
Comment 19 Andras Zoltan 2013-04-10 03:51:01 UTC
Hi Michael

Can confirm I definitely do not have two GTK versions installed so whilst that would indeed cause the problem also; it's actually because the *wrong* version is installed.
Comment 20 Andras Zoltan 2013-04-10 03:52:16 UTC
Or... sorry... as Alan's post further says - it's a corrupted install that might have been embedded with the Xamarin release...
Comment 21 Cody Russell 2013-08-09 18:55:44 UTC
This seems like it may be picking up the wrong gtkrc file somehow.  Perhaps an old install left a bad gtkrc file somewhere?
Comment 22 Marius Ungureanu 2016-11-03 10:27:59 UTC
This should no longer be an issue, as we've switched to native menus on Windows XS.