wx related GTK warnings

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
gabre
Knows some wx things
Knows some wx things
Posts: 29
Joined: Sat Mar 02, 2013 9:45 am

wx related GTK warnings

Post by gabre »

When I start my Wx app, I get the following:
(Erlang:5078): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 13
(Erlang:5078): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 13
(Erlang:5078): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 13
(Erlang:5078): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 13

what can cause this, and how could I solve it?
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: wx related GTK warnings

Post by DavidHart »

Hi,
Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 13
what can cause this?
They're caused by attempting to allocate a widget with width of -5 ;) .

I've seen them in the wx2.9 wxAui, where a fairly recent change involving (iirc) borders meant that a control with a width of 0 (or -1?) ended up with a negative width once the border was subtracted. I don't think there's a solution except to supply a larger width for the offending control.

BTW you can investigate this more easily if you debug your app with the runtime option --g-fatal-warnings. See here for more information.

Regards,

David
Post Reply