Bug 11046 - Completion window does not show content
Summary: Completion window does not show content
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: Trunk
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-03-11 13:06 UTC by Sergey Zhukov
Modified: 2015-04-03 00:40 UTC (History)
3 users (show)

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


Attachments
screenshot (49.20 KB, image/jpeg)
2013-03-11 13:06 UTC, Sergey Zhukov
Details
hack (793 bytes, patch)
2013-03-11 13:08 UTC, Sergey Zhukov
Details
Screenshot (50.26 KB, image/png)
2015-04-03 00:40 UTC, jpbruyere
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:
VERIFIED FIXED

Description Sergey Zhukov 2013-03-11 13:06:59 UTC
Created attachment 3572 [details]
screenshot

Description of Problem:
When completion window pop ups at the first time it does not show list of completion suggestions, but and empty border (see screenshot).

Steps to reproduce the problem:
1. Open any *.cs file.
2. Press 'f' key. Empty completion window will be shown.


Actual Results:
Empty completion window

Expected Results:
Completion window with list of suggestions.

How often does this happen? 
always

Additional Information:
Something overdraw list widget. If you click on the completion window scroll, completion window will be redrawn and shown correctly. 
Also, attached hack fixes the issue for completion windows.
Comment 1 Sergey Zhukov 2013-03-11 13:08:06 UTC
Created attachment 3574 [details]
hack
Comment 2 Mike Krüger 2013-03-11 13:10:08 UTC
Which distribution and gtk theme do you use ?
Comment 3 Sergey Zhukov 2013-03-11 14:23:31 UTC
Sorry, forgot to add version info details. Where can I find info about my current gtk theme? I did not perform any special actions to switch gtk theme. I am using Ubuntu 12.04 with gnome-panel instead of unity. 

MonoDevelop
Version 4.0
Installation UUID: 4d0efa62-e043-4e4f-9275-fedddecea0ca
Runtime:
	Mono 3.0.7 (master/6fc1c8d Sun Mar 10 04:39:22 NOVT 2013)
	GTK 2.24.10
	GTK# (2.12.0.0)

Build Information
a2b28c697b8e0ff28201b2546491e9cf18536a68

Operating System
Linux
Linux 3.2.0-38-generic-pae #61-Ubuntu SMP Tue Feb 19 12:39:51 UTC 2013 i686 i686 i386 GNU/Linux
Comment 4 Mike Krüger 2013-03-11 15:55:21 UTC
then I think you're using the pre installed one.

But your mono is newer than mine - I'll try to update tomorrow (atm the window renders fine for me)
Comment 5 Mike Krüger 2013-03-12 15:56:04 UTC
I can't repro it - I've added a show call to the list widget. Maybe that helps - but it's just a guess.

If that doesn't work can you try it out with show calls, maybe they need to be executed in a special order. I think it may be a bug in the used libraries (I've a newer gtk for exampe - ubuntu 12.10)

- my version info:
MonoDevelop
Version 4.0
Installation UUID: 6c6a9742-770d-411e-958d-de76359a59b0
Runtime:
	Mono 3.0.8 (master/42d7bdb Di 12. Mär 20:35:13 CET 2013) (64-bit)
	GTK 2.24.13
	GTK# (2.12.0.0)

Build Information
05affe038b5b82b278826140a12b80f151ffa53e

Operating System
Linux
Linux UbuntuDesktop 3.5.0-25-generic #39-Ubuntu SMP Mon Feb 25 18:26:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Comment 6 Sergey Zhukov 2013-03-12 18:43:57 UTC
I found the cause of this strange behaviour. In the file PopOverWindow.cs there is a code in method OnExposeEvent

if (SupportsAlpha) {
        context.Operator = Cairo.Operator.DestIn;
	context.SetSourceRGBA (1, 1, 1, 0);
} else

On my system these two lines produce effect mentioned above. If I change to 'if (!SupportsAlpha)' all works fine. Also this fixes same bug with debugger popup windows.
Comment 7 Sergey Zhukov 2013-03-12 19:09:47 UTC
Also, I tried several variants of context.Operatop. Only Operator.In and Operator.DestIn produce this effect, other operators allows to see text in ListWidget.
Comment 8 Mike Krüger 2013-03-13 01:43:43 UTC
Interresting - maybe it's some side effect.

Can you try this one instead (it destroys the cairo context before the children are drawn and creates a new one:

--- /home/mkrueger/work/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWindow.cs		(Basis)
+++ /home/mkrueger/work/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PopoverWindow.cs		(Arbeitskopie)
@@ -352,6 +352,7 @@
 				context.Restore ();
 
 				OnDrawContent (evnt, context); // Draw content first so we can easily clip it
+			}
 				retVal = base.OnExposeEvent (evnt);
 
 				changed = Theme.SetBorderPath (context, BorderAllocation, position);
@@ -353,6 +354,7 @@
 
 				OnDrawContent (evnt, context); // Draw content first so we can easily clip it
 				retVal = base.OnExposeEvent (evnt);
+			using (var context = Gdk.CairoHelper.Create (evnt.Window)) {
 
 				changed = Theme.SetBorderPath (context, BorderAllocation, position);
 				context.Operator = Cairo.Operator.DestIn;
Comment 9 Sergey Zhukov 2013-03-13 06:09:01 UTC
It didn't help... Btw, I can create vmware virtual machine image with ubuntu 12.04 and latest mono/monodevelop and share it to you.
Comment 10 Mike Krüger 2013-03-13 08:55:24 UTC
Would be helpful for me :)
Comment 11 Sergey Zhukov 2013-03-13 19:30:12 UTC
vmware image is located here:

https://s3-eu-west-1.amazonaws.com/svg-eur/ubuntudev.tar.gz

Image was created with VmWare player 5.0.1

ubuntu credentials:
username: dev
password: dev

The latest version of monodevelop is located in /home/dev/mono/monodevelop

type 'make run' from there, open 'test' project and type the 'f' symbol.

Hope this helps in resolving the issue.
Comment 12 Mike Krüger 2013-03-14 13:10:41 UTC
I'll look at it - thanks
Comment 13 Mike Krüger 2013-03-15 02:55:06 UTC
fixed - the vm was very helpful
Comment 14 Mike Krüger 2013-03-15 02:55:46 UTC
btw. I don't know why this bug only occurs on this system - I've no problems with my ubuntu 12.10
Comment 15 Sergey Zhukov 2013-03-15 06:19:05 UTC
verified
Comment 16 Jatin 2013-03-25 08:48:35 UTC
We have verified this issue with the latest builds:

XS 4.0.3.13
MT 6.2.1.201
MFA 4.6.01081
Mono 2.10.12

And we have observed that the now the issue is not appearing, as now the auto completion drop down is showing the correct content.

Hence, closing this issue.
Comment 17 jpbruyere 2015-04-03 00:39:14 UTC
I had a similar issue with the declaration tooltip window (also derived
from PopoverWindow)

Popup Window is empty only if arrow position is left (cairo DestIn operation fails), if I force the position (not left), it's fill with infos.

I've solve the issue by disabling the DestIn cairo operation, which does not seem to have bad effect on rendering.

I've double check cairo pathes, and all seems good, so I think it's maybe a cairo bug.

=== MonoDevelop ===

Version 6.0
Installation UUID: dd69334d-0134-4884-b8ea-aef4a1d18220
Runtime:
	Mono 3.2.8 (Debian 3.2.8+dfsg-10) (64-bit)
	GTK+ 2.24.25 (Clearlooks theme)

=== Build Information ===

312c5b65456131f6e979f27c85674bb90093336f

=== Operating System ===

Debian testing Jessie(8)
Linux deb64 3.19.0-rc4 #0 SMP Mon Jan 12 14:53:06 CET 2015 x86_64 GNU/Linux

libcairo2:amd64 (1.14.0-2.1)
Comment 18 jpbruyere 2015-04-03 00:40:28 UTC
Created attachment 10614 [details]
Screenshot