Bug 49365 - Libreoffice fails to start on second screen with gtk vcl plugin
Summary: Libreoffice fails to start on second screen with gtk vcl plugin
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected)
3.5.2 release
Hardware: Other Linux (All)
: medium normal
Assignee: David Tardon
Whiteboard: target:3.6.0
Keywords: regression
Depends on:
Reported: 2012-05-02 01:23 UTC by Björn Michaelsen
Modified: 2012-05-02 06:29 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Björn Michaelsen 2012-05-02 01:23:11 UTC
I have dual X screen configuration on Ubuntu 12.04 with NVidia 6600 nvidia-current-updates 295.40-0ubuntu1 and XFCE+Metacity. With libreoffice-gtk installed libreoffice fails to start on second X screen :0.1. On first X screen :0.0 it loads successfully. On Ubuntu 11.10 it also worked well on both screens.

This is the error produced:

#$ libreoffice

(soffice:5545): Gdk-CRITICAL **: IA__gdk_screen_get_monitor_geometry: assertion `monitor_num < screen_x11->n_monitors' failed

(soffice:5545): Gdk-CRITICAL **: IA__gdk_screen_get_monitor_geometry: assertion `monitor_num < screen_x11->n_monitors' failed
WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-XTNyXK/pkcs11: Нет такого файла или каталога
The program 'soffice' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 1595 error_code 8 request_code 62 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 --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libreoffice-gtk 1:3.5.2-2ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic-pae 3.2.14
Uname: Linux 3.2.0-24-generic-pae i686
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu7
Architecture: i386
Date: Sat Apr 28 08:49:11 2012
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
 PATH=(custom, user)
SourcePackage: libreoffice
UpgradeStatus: Upgraded to precise on 2012-04-27 (0 days ago)
Comment 1 Michael Meeks 2012-05-02 03:57:11 UTC
three backtraces with debugging symbols from 'g_logv' and (with
export SAL_SYNCHRONIZE=1 # ) gdk_x_error much appreciated.

Thanks :-)
Comment 2 Caolán McNamara 2012-05-02 04:27:20 UTC
I wonder if dtardon's fix of http://cgit.freedesktop.org/libreoffice/core/commit/?id=9d5da4e1d12c224286f871b28b7df31215f67d31 is relevant if someone is able to reproduce this.
Comment 3 David Tardon 2012-05-02 05:31:58 UTC
Not directly. What I think happens there is: Starting at first (and only) monitor of the second screen means that the internal monitor number will be 1. But the first screen also has one monitor, so the condition

if (nIdx > gdk_screen_get_n_monitors (pScreen))

evaluates to

if (1 > 1)

, therefore the index won't be changed.
Comment 4 David Tardon 2012-05-02 05:35:47 UTC
The earlier commit mentioned by Caolan is actually necessary part of the fix, because otherwise we would get NULL GdkScreen.
Comment 5 Not Assigned 2012-05-02 05:37:26 UTC
David Tardon committed a patch related to this issue.
It has been pushed to "master":


fdo#49365 correctly map monitor index back to screen
Comment 6 Michael Meeks 2012-05-02 06:25:30 UTC
Gosh; I wonder how many more embarrassing bugs I created with this nightmarish mapping :-) Thanks guys !

reviewed & cherry-picked both commits to -3-5.