Bug 103220

Summary: UI is broken with GTK 3.22 on HiDPI screens
Product: LibreOffice Reporter: ⁨خالد حسني⁩ <khaled>
Component: UIAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED DUPLICATE    
Severity: major CC: caolan.mcnamara, khaled, shieldwed
Priority: medium    
Version: 5.2.2.2 release   
Hardware: All   
OS: Linux (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 90796, 103182    
Attachments: Screenshot

Description ⁨خالد حسني⁩ 2016-10-14 17:36:08 UTC
Description:
After upgarding to GTK 3.22, the UI became completely unusable. Only 1 quarter of the document area is drawn and everything inside it seems to be 2x scaled. The menu bar is drawn fine, but the menus are displaced and cropped, and eventually the application would crash after repeatedly opening the menus. The console shows the following errors and warnings (after I start opening the menus):

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug


(soffice:28076): Gtk-WARNING **: GtkAccelLabel 0x6167780 attempted to adjust its size allocation from 6,1594303988 109x797151984 to 6,1992879970 109x19. adjust_size_allocation must keep allocation inside original bounds
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug


(soffice:28076): Gtk-WARNING **: GtkAccelLabel 0x6157d60 attempted to adjust its size allocation from 6,2082248644 109x797151984 to 6,-1814142670 109x19. adjust_size_allocation must keep allocation inside original bounds
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug


(soffice:28076): Gtk-WARNING **: GtkAccelLabel 0x613a3d0 attempted to adjust its size allocation from 32,1463833972 83x797151984 to 32,1862409954 83x19. adjust_size_allocation must keep allocation inside original bounds
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug


(soffice:28076): Gtk-WARNING **: GtkAccelLabel 0x612b3c0 attempted to adjust its size allocation from 6,1951778628 109x797151984 to 6,-1944612686 109x19. adjust_size_allocation must keep allocation inside original bounds
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug


(soffice:28076): Gtk-WARNING **: GtkAccelLabel 0x611bb70 attempted to adjust its size allocation from 6,1642571292 109x797151984 to 6,2041147274 109x19. adjust_size_allocation must keep allocation inside original bounds
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug


(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(soffice:28076): Gtk-WARNING **: GtkAccelLabel 0x5e72790 attempted to adjust its size allocation from 6,1594303988 93x797151984 to 6,1992879970 93x19. adjust_size_allocation must keep allocation inside original bounds

(soffice:28076): Gtk-WARNING **: GtkAccelLabel 0x5e65b90 attempted to adjust its size allocation from 6,2082248644 93x797151984 to 6,-1814142670 93x19. adjust_size_allocation must keep allocation inside original bounds

(soffice:28076): Gtk-WARNING **: GtkAccelLabel 0x5e653d0 attempted to adjust its size allocation from 6,1773041308 93x797151984 to 6,-2123350006 93x19. adjust_size_allocation must keep allocation inside original bounds

(soffice:28076): Gtk-WARNING **: GtkAccelLabel 0x5e55b70 attempted to adjust its size allocation from 6,1463833972 93x797151984 to 6,1862409954 93x19. adjust_size_allocation must keep allocation inside original bounds


Actual Results:  
 

Expected Results:
 


Reproducible: Always

User Profile Reset: 

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Comment 1 ⁨خالد حسني⁩ 2016-10-14 17:37:13 UTC
Created attachment 128014 [details]
Screenshot
Comment 2 ⁨خالد حسني⁩ 2016-10-14 17:48:32 UTC
No problem with non-HiDPI screens.
Comment 3 Daniel Wilhelm 2016-10-15 16:56:07 UTC
Same happend to me on arch linux.

Temporary work around:

# gsettings set org.gnome.desktop.interface scaling-factor 1

logout and login again

then start libre office.
Comment 4 ⁨خالد حسني⁩ 2016-10-15 21:01:15 UTC
(In reply to Daniel Wilhelm from comment #3)
> Same happend to me on arch linux.
> 
> Temporary work around:
> 
> # gsettings set org.gnome.desktop.interface scaling-factor 1
> 
> logout and login again
> 
> then start libre office.

Sure, but will scale down the whole UI. Right now I’m just forcing the generic VCL plugin (SAL_USE_VCLPLUGIN=gen).
Comment 5 Daniel Wilhelm 2016-10-15 21:11:16 UTC
(In reply to Khaled Hosny from comment #4)
> Sure, but will scale down the whole UI. Right now I’m just forcing the
> generic VCL plugin (SAL_USE_VCLPLUGIN=gen).

You are right. Thank you for your work around. It is way easier.
Comment 6 ⁨خالد حسني⁩ 2016-10-17 13:53:56 UTC
It turns out to be Wayland not GTK 3.22, GNOME switched the default from Xorg to Wayland and I didn’t notice it until I read about it just now. Switching back to Xorg fixes the issue, so this is a duplicate of bug 99508.

*** This bug has been marked as a duplicate of bug 99508 ***