Many GTK warnings when running with debug build of GTK
Summary:
When GTK is compiled in debug mode, it enables some extra checks. Running Inkscape then reveals that some of these checks are failing. This may have unknown bad consequences.
Steps to reproduce:
- Download the GTK3 sources (I used 77f32a69 for version 3.24.29).
- Build in debug mode:
mkdir build meson setup build --buildtype=debug cd build ninja
- Run Inkscape with these debug libraries:
LD_PRELOAD="gtk/libgtk-3.so gdk/libgdk-3.so" inkscape
What happened?
Many more message than usual are printed to the console. They fall into three types:
- Allocating size to
...
without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate? - gtk_widget_size_allocate(): attempt to underallocate
...
. Allocation is 0x0, but minimum required size is...
. -
...
is drawn without a current allocation. This should not happen.
The full log is gtk-debug-log.txt.
What should have happened?
No messages should be printed, as is the case for official GNOME apps (e.g. calculator), but I'll settle for no more messages should be printed than with release GTK.
Version info
Observed on the very first release of 1.2 alpha, as well as all local development branches after it.