Bug 10790 - tabs stop responding to clicks
Summary: tabs stop responding to clicks
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Shell ()
Version: 4.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
: 10838 10842 11045 11282 11575 11960 12176 12570 ()
Depends on:
Reported: 2013-02-28 19:49 UTC by Dave Wolfe
Modified: 2013-07-16 12:34 UTC (History)
21 users (show)

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

Processhacker view of Handles and DLLs matching search for gtk (256.65 KB, image/png)
2013-06-27 15:54 UTC, Gary____
AddRemove Programs list on affected computer (41.42 KB, image/png)
2013-06-27 15:55 UTC, Gary____

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:

Description Dave Wolfe 2013-02-28 19:49:09 UTC
Tabs fail to respond to clicks after a short time, it seems to be related to building the project.  You can still select a tab by pressing ctrl-tab, or by using the View menu.
Comment 1 Mikayla Hutchinson [MSFT] 2013-03-01 21:04:37 UTC
*** Bug 10838 has been marked as a duplicate of this bug. ***
Comment 2 Aleksander Morgado 2013-03-07 05:40:37 UTC
I have experienced this myself right now; and I wasn't doing anything really, just switched to XS and the tabs were not responsive at all: they wouldn't glow during mouse move, they wouldn't allow closing with the X button, they wouldn't allow switching by clicking. Will try to add debug logs and see what could be happening.
Comment 3 Aleksander Morgado 2013-03-07 06:27:31 UTC
And quite easy steps to reproduce:
 * Make sure to have the solution window unpinned (e.g. auto-hide)
 * Click on the button to show the solution window, which expands it to the right
 * Click back in the text view
 * Tabs are no longer working
Comment 4 Aleksander Morgado 2013-03-11 11:35:32 UTC
Upstream bug report for the issue, with suggested patch for the issue:

Comment 5 Mikayla Hutchinson [MSFT] 2013-03-11 13:44:11 UTC
*** Bug 11045 has been marked as a duplicate of this bug. ***
Comment 6 Mikayla Hutchinson [MSFT] 2013-03-20 20:02:18 UTC
*** Bug 11282 has been marked as a duplicate of this bug. ***
Comment 7 Mikayla Hutchinson [MSFT] 2013-03-25 18:33:20 UTC
Alan, Duncan, can we get a new GTK+ build with this and the fix for bug 10644?
Comment 8 Mikayla Hutchinson [MSFT] 2013-04-04 23:04:27 UTC
*** Bug 11575 has been marked as a duplicate of this bug. ***
Comment 9 Mikayla Hutchinson [MSFT] 2013-04-22 17:09:23 UTC
*** Bug 10842 has been marked as a duplicate of this bug. ***
Comment 10 eduard.qualls 2013-04-24 13:18:28 UTC
After starting XS (on Windows 7 Ultimate 64b), loading project successfully, then starting AVD debug session (project rebuild or not doesn't seem to matter):

Document tabs in editor stop responding to all (left or right) mouse clicks at very start of debug session, and are never re-enabled, even if AVD is closed. Other means of source-window selection still work.

The only way to restore mouse functionality is to exit XS and restart it.

[Seems to me that the handles are possibly lost during the recasting of the editor  and its subwindows for debugging.]
Comment 11 eduard.qualls 2013-04-24 18:18:06 UTC
Another way to recreate the problem:

Start Xamarin Studio, load the example "EmployeeDirectory", and have only one file open for editing, such as person.cs. Have the "Classes" and "Solution" panels docked on the left.

Double-click the "Person.cs" tab so that the Classes and Solutions panels collapse. The "Person.cs" tab is immediately unresponsive to mouse clicks.

As stated previously, the only way to get the tabs to respond to mouse clicks again is to kill XS and reload it.
Comment 12 Aleksander Morgado 2013-04-25 03:57:38 UTC
eduard: root issue is already known, and a patch was suggested already, see comment #4.
Comment 13 Mikayla Hutchinson [MSFT] 2013-04-25 10:11:15 UTC
*** Bug 11960 has been marked as a duplicate of this bug. ***
Comment 14 Duncan Mak 2013-04-25 11:48:41 UTC
We're working on making a newer GTK installer for Windows (with the patch) as we speak.
Comment 15 Alan McGovern 2013-04-25 23:22:10 UTC
Patch added to our build. Closing the bug as the next release should contain the fix.
Comment 16 Alan McGovern 2013-04-25 23:25:08 UTC
Actually this patch was already in the build, maybe we just need to use the newer binaries.
Comment 19 eduard.qualls 2013-05-12 17:42:01 UTC
re: version 4.0.5 (build 4) -- Bug still not fixed.

Spy++ still shows that the flow of mouse messages to the individual open-document tabs changes (diminishes) after one of the tabs has been double-clicked on (which collapses the Solution/Classes panel) and resizes both doc area and tab-display rectangle.
The flow and content of the mouse messages to the tabs is never re-established, so that the tabs of the non-foreground docs are apparently never sent the complete, original "come forward" messages (or they're being sent off to something else or to null), and so the tabs still remain incapacitated in this latest build.
Comment 20 Mikayla Hutchinson [MSFT] 2013-05-12 18:56:53 UTC
The fix is in GTK# 2.12.21, not XS. Have you installed the GTK# update?
Comment 21 eduard.qualls 2013-05-13 08:27:52 UTC
Win control panel reports "GTK# for .Net" 2.12.21, installed on 5/12/2013.

Updater.log reports:
MSI (s) (10:94) [07:49:20:805]: Product: Gtk# for .Net 2.12.21 -- Installation completed successfully.
MSI (s) (10:94) [07:49:20:806]: Windows Installer installed the product. Product Name: Gtk# for .Net 2.12.21. Product Version: 2.12.21. Product Language: 1033. Manufacturer: Xamarin, Inc.. Installation success or error status: 0.
=== Logging stopped: 5/12/2013  7:49:20 ===

However, XS's About=>Show Details says "GTK# (" 
And "LoadedAssemblies" [sic] reports the same thing on "gtk-sharp".
(Are these just static text that didn't get updated?)

Everything I posted yesterday (here && on bug 12153) was of conditions after this installation. Let me know if you need me to check anything else.
Comment 22 Mikayla Hutchinson [MSFT] 2013-05-13 14:02:09 UTC
In the Windows installed programs list, does it show any other GTK# versions, or just that one?
Comment 23 eduard.qualls 2013-05-13 17:59:05 UTC
Just that one.
Comment 24 Mikayla Hutchinson [MSFT] 2013-05-14 16:52:48 UTC
Do you have repro steps for triggering this bug with the latest GTK+? The fix definitely fixed the repro cases we knew about.
Comment 25 Oldrich Svec 2013-05-15 01:39:30 UTC
I can confirm that the bug persists. I have Windows 8 x64. I have installed and uninstalled both Mono and Xamarin Studio several times during the last couple of weeks. Quite interestingly, installed F# language bindings persist between individual uninstall / install steps.

* Today, I have uninstalled the old version of Mono and Xamarin Studio.
* I have downloaded and installed mono-3.0.10-gtksharp-2.12.11-win32-0.exe
* I have downloaded and installed Xamarin Studio 4.0.1
* Xamarin studio asked for update to 4.0.3, so I installed it
* I created a new C# console project
* I tried to close Program.cs by clicking on (x) on the tab.
* Nothing happens...
Comment 26 eduard.qualls 2013-05-15 07:53:37 UTC
The 2 steps required to reproduce:
[this is with XS 4.0.6, which was just installed automatically]
[Windows 7 Ultimate (64-bit)]

1) Open XS with any project (such as the Database demo).
[In my case, this reloads its previous environment that has 12 files/tabs open; the Classes/Solution column opens on the left. Any left-clicks on the tabs will change foreground file/window as expected. For this bug it doesn't matter, however, whether you switch child windows or not before going to the next step.]

2) Double-(left-)click on any file tab.

The Classes/Solution column closes; the dblclicked tab/file takes over the now child-window max area; and none of the non-focus tabs react to any mouse clicks, and cannot be used to switch windows. Even clicking on the 'X' on the tab has no effect.

The only way to restore tab functionality is to close XS and restart it.
On this, the Classes/Solution column re-opens as if it had not been collapsed.

Frankly, I actually prefer this behavior on double-clicking to that of the VS IDE (which throws the file into a floating/undocked child window), if XS just didn't lock out the other tabs.
Comment 27 eduard.qualls 2013-05-15 08:25:01 UTC
It will also occur apparently randomly after moving through several files doing a project wide search and replace, particularly if you double click on the line of a "found" listing within a layout resource's source listing. (Double-clicking always brings up the graphic-design window rather than the source window.)

NOTE: This tab-switching response failure also appears to screw up the list of files that have changes and need to be saved before closing XS. I keep getting "An autosave file has been found for this file." warning after restartin XS, when I click on one of the now-active tabs, even after I have told XS to save all the files it lists as needing to be saved before closing.
Comment 28 eduard.qualls 2013-05-15 08:37:04 UTC
More info for comment 27: from a cs file, do a global search for a string that appears in strings.xml. Double-click on the search-result listing to go to strings.xml. Tabs lock up.
Comment 29 Mikayla Hutchinson [MSFT] 2013-05-15 17:32:12 UTC
*** Bug 12176 has been marked as a duplicate of this bug. ***
Comment 30 Mikayla Hutchinson [MSFT] 2013-05-15 20:30:13 UTC
I tried all your repro steps and I still can't reproduce this. Could you try uninstalling GTK# and reinstalling it from http://download.xamarin.com/GTKforWindows/Windows/gtk-sharp-2.12.21.msi ?
Comment 31 eduard.qualls 2013-05-15 21:46:28 UTC
Uninstalled then installed from the download of the link supplied.
No change.

Are you testing on a native installation, or on a vm? The reason I ask is that we have found a lot of hardware/driver related problems don't show up when using a vm because of the emulation layer(s).

Is it OK for me to install XS on a second machine when I have a single user license? If so, I can try another copy of Win 7 Ult/64, and even go back to a [spit spit] Vista 64 box to see if I can replicate it there.
Comment 32 Aleksander Morgado 2013-05-16 12:13:03 UTC
I retried the steps from comment 26 with a fully clean local build of latest GTK+ 2.24.18 *with* the patch applied, and cannot reproduce the issue.

If I remove the patch, the issue is reproduced. So probably the users are either not getting the proper GTK+ used, or the GTK+ build they are using doesn't have the patch...

BTW, the steps from comment #26 would clearly trigger the bug; as the double-click makes the Solution dock auto-hide, and it's actually the hiding of the Solution dock the one making the surfaces already-finished. So the steps to reproduce would really be:

 * Open solution
 * Double-click in one of the tabs (solution dock is hidden)
 * Open solution dock by sliding pointer to the left
 * Close solution dock by clicking back in the document
 * Now tabs get stuck

As said, anyway, I cannot reproduce it with the patched GTK+ :/
Comment 33 eduard.qualls 2013-05-16 12:42:22 UTC
I re-uninstalled gtk+, then did a full shutdown and cold boot.
Then I re-installed the gtk+ downloaded through the reference in comment 30.
The problem persists.
Comment 34 Mikayla Hutchinson [MSFT] 2013-05-16 17:22:07 UTC
That's very strange. Do you have any other GTK+ apps on your system? Can you paste the Details section from the Xamarin Studio About dialog? The GTK# assembly version doesn't matter, it's frozen, but I'd like to see the GTK+ version value.

I'm using Windows 8 x64 on bare metal, I don't have a Win7 box right now.
Comment 35 eduard.qualls 2013-05-16 17:25:38 UTC
Xamarin Studio
Version 4.0.7 (build 3)
Installation UUID: 317f130a-adee-4873-9b95-11871747e379
	Microsoft .NET 4.0.30319.18034
	GTK 2.24.13
	GTK# (

Version: 4.6.5 (Indie Edition)
Android SDK: C:\Program Files (x86)\Android\android-sdk
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_31

Build Information
Release ID: 400070003
Build date: 2013-05-15 17:41:09Z
Xamarin addins: 9d3dcd5b80ef94f6d91065e914c053a708c5e65b

Operating System
Windows 6.1.7601.65536 (64-bit)
Comment 36 eduard.qualls 2013-05-16 17:33:19 UTC
No other GTK+ apps on system.
Comment 37 Aleksander Morgado 2013-05-20 06:38:36 UTC
Michael, could you maybe verify that the patch was really added to the build?
Comment 38 Mikayla Hutchinson [MSFT] 2013-05-20 12:27:21 UTC
Duncan verified that the patch had been applied by running the known repro steps (comment #3) on the binaries installed by the old installer, which repro'd the issue, then running the new installer, and running the repro steps again, which did not repro the issue.
Comment 39 Gary____ 2013-06-12 08:02:04 UTC
Still not fixed for me...

I had MD/XS 4.0 installed on WinXP (in a VirtualBox VM). It exhibited the 'tabs don't respond to clicks' issue. I ran the auto updater which resulted in the "About" info as displayed in [1]. I downloaded and ran the gtk-sharp-2.12.21.msi from [2], this only gave me a repair and remove option, so i removed and installed it again. Tabs still exhibited the issue (and the "About" info looks the same). I uninstalled and reinstalled XS, the problem remained. I then uninstalled gtk-sharp 2.12.21.msi from control panel this time, confirmed XS wouldn't load up, then installed it again. Still no joy. FYI the gtk dll is being loaded from [3]. The only thing i haven't tried is removing gtk-sharp, XS and then trying running the XS installer and letting it install gtk-sharp, (presuming it does automatically).

To reproduce the issue:
When XS starts and I open a solution the tabs for files that auto load seem to work OK. When I then open a new file from the solution explorer (i keep it in auto hide mode) the tabs either stop responding right away, or on opening a few more files they stop responding.

Xamarin Studio
Version 4.0.8 (build 2)
Installation UUID: 393ae7fd-47f2-4ea2-ada5-a4dda5970175
	Microsoft .NET 4.0.30319.1
	GTK 2.24.13
	GTK# (

Not Installed

Build Information
Release ID: 400080002
Build date: 2013-05-16 17:54:42Z
Xamarin addins: 78d0437c3f92ae13042f81e5fd9487e2c28d5fbc

Operating System
Windows 5.1.2600.196608


Comment 40 eduard.qualls 2013-06-12 09:32:13 UTC
Same here. Neither resolved nor fixed.
Just trying to keep working around it...
Comment 41 eduard.qualls 2013-06-12 11:50:39 UTC
yet another way to reproduce it:

1. bring up a project with layouts
(test tabs with mouse--should be working)

2. in "Solution" window, double click layout file name OR highlight with mouse then hit return. Wait for editor to switch and bring up design mode.

3. click on a non-active tab

4. tabs cease to work

Thereafter, the easiest way to get around is to double-click the file names in the Solution windows.

So far today, I've shut down and restarted XS around 14 times. (But then, I've been up since 4:30am CDT, and have gotten a testbed written from scratch and running on the emulator today. So once you get used to closing and restarting XS the tab-handling failure fades...)
Comment 42 Mikayla Hutchinson [MSFT] 2013-06-17 21:25:03 UTC
*** Bug 12570 has been marked as a duplicate of this bug. ***
Comment 43 eduard.qualls 2013-06-27 12:47:46 UTC
XS 4.0.9 (Build 12) problem still exists. Started happening very quickly: as soon as I started working on a new XML layout file, dbl-clicking in Solution pane to reach files.
[Don't know if it's important, but this is a dual-monitor system.]
Comment 44 Duncan Mak 2013-06-27 14:00:20 UTC
Which Mono/GTK are you running? On which OS?
Comment 45 Mikayla Hutchinson [MSFT] 2013-06-27 14:14:50 UTC
I've tried those repro steps and I still can't repro it. Maybe the double monitor does make a difference.

Just to be sure that there is no other GTK+ in play here, could you please run Process Explorer from Microsoft (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) and use "Find->Find Handle or DLL..." while Xamarin Studio is running.

All paths should be in
C:\Program Files(x86)\GtkSharp
C:\Program Files(x86)\Xamarin Studio
Comment 46 eduard.qualls 2013-06-27 14:35:22 UTC
Michael: Yep, those three dir's are the only ones in which anything containing the string "GTK" appears.

Win 7 Ultimate [64] SP1 {i7:8 cpus; 8GB RAM; 4TB HD}
NVidia GeForce GTS 240 (yeah I know it's dated, but it works for me)

Could this be related to this bug whose info I just amended? (Looks like something is really messing up the settings associated with window handles.)
Comment 47 eduard.qualls 2013-06-27 15:41:28 UTC
Going to single monitor didn't help this.

Recreated by restarting XS, opening project, going to Main.xml, switching between Content and Source, then clicking on tab of strings.xml.

Strings.xml came to the foreground, but tabs were then dead.
Comment 48 Gary____ 2013-06-27 15:54:04 UTC
Created attachment 4214 [details]
Processhacker view of Handles and DLLs matching search for gtk

Usually the problem arises without building a project, but today tabs worked until i did. (WinXP SP3 in VM)
Comment 49 Gary____ 2013-06-27 15:55:48 UTC
Created attachment 4215 [details]
AddRemove Programs list on affected computer
Comment 50 eduard.qualls 2013-07-06 15:51:57 UTC
Additional symptom when the error is active--

Action: move mouse pointer over a document tab to get the bubble pop-up of file name
Result: pop-up has same text, no matter which tab it's over, and the displayed info is not that of the active text window.
Comment 51 Mikayla Hutchinson [MSFT] 2013-07-12 16:30:29 UTC
We have prepared a new build of GTK+ that contains a possible fix. To test it, please download https://mjhutchinson.com/files/temp/gtk-2.24.20-2013-07-11.zip and copy the directories it contains "C:\Program Files (x86)\GtkSharp\2.12". You can verify it is installed by checking that "Help->About->Show Details" shows "GTK 2.24.20".
Comment 52 Gary____ 2013-07-15 12:32:10 UTC
I tried the fix...

Initially I deleted the existing contents of "C:\Program Files\GtkSharp\2.12" (im on 32bit xp) and copied the directories over. XS wouldn't load up at all. I then put the original contents back in and pasted the new directories over the top. XS loads up, the About page shows "GTK 2.24.20" and the problem seems to be resolved - yay.

I notice the issue still happens on my windows 7 machine even though MD auto upgraded itself to 4.0.9. I haven't loaded gtk-sharp-2.12.21.msi on that machine let alone tried this fix, so I'll get back to you on that.
Comment 53 eduard.qualls 2013-07-15 12:45:40 UTC
Just copied the files in this morning, but looks good so far!
(Also watching for replication of Bug 10644.)
Comment 54 Mikayla Hutchinson [MSFT] 2013-07-16 12:34:45 UTC
That's great to hear!

The new GTK+ binaries have been included in the GTK# 2.12.22 installer, which is now in the beta update channel and will roll out to stable after we're reasonably confident there are no regressions.