[Geany-Devel] Blank completion popups on Windows

Colomban Wendling lists.ban at xxxxx
Wed Apr 15 20:38:06 UTC 2015


Le 14/04/2015 21:54, Enrico Tröger a écrit :
> 
> Windows 7 with GTK 2.24.10.
> Nick has the same problem, we talked about this in
> http://lists.geany.org/devel/2015-January/009257.html.

I just tested with GTK 2.24.10 on Windows 7, and it does fail the same.

I also tried with GTK 3.6.4 (!) and the problem wasn't present (but
there are several sub-optimal details with 3.6.

> Your patch works for me. I personally would not mind the minimal size
> increase. I completely agree it's better than an empty popup :).
> 
> What bothers me more is that for some reason this problem doesn't occur
> with the cross-compiled nightly binaries.
> This is what we noticed in the above mentioned thread already, I just
> re-tested it to get sure.
> Though I have not yet an idea what could cause the different behaviour
> by the different builds :(.

I just noticed this in the debug messages:

> GLib-GObject WARNING	: specified instance size for type `SmallScroller' is smaller than the parent type's `GtkScrolledWindow' instance size
> GLib CRITICAL	: g_once_init_leave: assertion `initialization_value != 0' failed
> GLib-GObject CRITICAL	: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed
> Gtk CRITICAL	: gtk_container_set_border_width: assertion `GTK_IS_CONTAINER (container)' failed
> Gtk CRITICAL	: gtk_scrolled_window_set_policy: assertion `GTK_IS_SCROLLED_WINDOW (scrolled_window)' failed
> Gtk CRITICAL	: gtk_container_add: assertion `GTK_IS_WIDGET (widget)' failed
> Gtk CRITICAL	: gtk_widget_show: assertion `GTK_IS_WIDGET (widget)' failed
> Gtk CRITICAL	: gtk_container_add: assertion `GTK_IS_CONTAINER (container)' failed

which explains at least why it's not working.  Why the structure
wouldn't have the correct size is more of a mystery, as it's defined as

> typedef GtkScrolledWindow SmallScroller;
> typedef GtkScrolledWindowClass SmallScrollerClass;

…any idea?  Of course if I try and see what the sizeof() of all those
are, they match (84 for the instances and 444 for the classes FTR).

The same happens if I try and create a structure wrapping them:

> typedef struct { GtkScrolledWindow parent; } SmallScroller;
> typedef struct { GtkScrolledWindowClass parent; } SmallScrollerClass;

However, a workaround is to add a small additional member:

> typedef struct { GtkScrolledWindow parent; int dummy; } SmallScroller;
> typedef struct { GtkScrolledWindowClass parent; int dummy; } SmallScrollerClass;

I still have no clue what the heck is going on though…

Regards,
Colomban

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.geany.org/pipermail/devel/attachments/20150415/a60527fa/attachment.sig>


More information about the Devel mailing list