GNOME Bugzilla – Bug 730356
Ensure reasonable values are written/used for window position GSettings
Last modified: 2016-08-16 15:30:23 UTC
Hi, i don't know what may have happened but since last week i cannot start geary anymore (i am compiling from source on Debian testing). Everytime i start geary i get the following error: (geary:7066): Gdk-WARNING **: Native Windows wider or taller than 32767 pixels are not supported (geary:7066): Gdk-ERROR **: The program 'geary' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAlloc (insufficient resources for operation)'. (Details: serial 304 error_code 11 request_code 53 (core protocol) minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) Trace/Breakpoint ausgelöst Cheers, Sebastian
> To debug your program, run it with the GDK_SYNCHRONIZE environment > variable to change this behavior.
Hi André, doesn't seem to change much: [buster@Fry➔ ~] GDK_SYNCHRONIZE="1" geary --debug [msg] 12:12:42 0,026077 geary-application.vala:170: Geary 0.6.0 prefix=/home/buster exec_dir=/home/buster/bin is_installed=true [deb] 12:12:42 0,187698 null-indicator.vala:13: No messaging menu support in this build [deb] 12:12:42 0,012303 conversation-web-view.vala:181: Loading new message viewer style from /home/xxxx/.config/geary/user-message.css... [deb] 12:12:42 0,131793 db-versioned-database.vala:77: VersionedDatabase.upgrade: current database schema for /home/xxxx/geary.db: 21 [deb] 12:12:42 0,090492 db-versioned-database.vala:77: VersionedDatabase.upgrade: current database schema for /home/xxxx/geary.db: 21 [deb] 12:12:42 0,016003 smtp-outbox-folder.vala:139: Starting outbox postman (geary:27822): Gdk-WARNING **: Native Windows wider or taller than 32767 pixels are not supported (geary:27822): Gdk-ERROR **: The program 'geary' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAlloc (insufficient resources for operation)'. (Details: serial 470 error_code 11 request_code 53 (core protocol) minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) Trace/Breakpoint ausgelöst
One thing you might check: * Run dconf Editor and look in org.yorba.geary, specifically window-height and window-width. Are they reasonably sized? If so, then please re-run Geary following these instructions: https://wiki.gnome.org/Apps/Geary/ReportingABug We'll be interested in seeing the stack trace.
That seems to be it. window-height is 65497. After resetting to defaults it works. I have no idea why the value is that high, though..
I'm not sure either, but it sure looks like 16-bit underflow. I'm changing this ticket to reflect the work we need to do, namely (a) ensure sane values are written out to GSettings and (b) since those values are externally modifiable, ensure only sane values are passed to GTK when read in
*** Bug 735899 has been marked as a duplicate of this bug. ***
As of 0.11.x the GSettings type (gint) and defaults seems fine, MainWindow::window_width and ::window_height are also gints, and so are the values they are set from (GdkEventConfigure::x and ::y), so I'm not sure where this might have crept in - maybe an X or GDK issue when creating the event? In any case, I think this can be fixed by checking the values are reasonable against the current Gdk.Screen, if any. Patch to follow.
Created attachment 332943 [details] [review] Ensure reasonable values are written/used for window position GSettings. Patch that uses Gdk.Screen to ensure values are sane. Also centres the window on the screen when mapped and fixes maximised state being lost.
Created attachment 332946 [details] [review] Ensure reasonable values are written/used for window position GSettings Updated patch avoids redundant config writes at startup.
Patch pushed to master as 979f3b9. I'll cherry pick this for geary-0.11 when it's been a bit more widely tested.
This has been pushed to the stable geary-0.11 branch as ac6ceb9. Resolving as fixed.