GTK+2 applications are crashing when I try to enter text via keyboard into a text area. Pasted text does not produce an error. (as an aside, I've reemerged GTK, Pango, Cairo, libX11. I may just have a stale package, but I don't know where to take it from here. I've also listed this as critical, since it has caused me to lose data (and that's how critical is described), but it probably belongs more toward major or normal severity) Affected applications include GIMP, Pidgin, and mousepad, though I suspect all GTK+2 applications are affected. Here's the backtrace: $ gdb mousepad GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu"... (gdb) break gdk_x_error Function "gdk_x_error" not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (gdk_x_error) pending. (gdb) run --sync Starting program: /usr/bin/mousepad --sync [Thread debugging using libthread_db enabled] [New Thread 0x7f209f941740 (LWP 32485)] [Switching to Thread 0x7f209f941740 (LWP 32485)] Breakpoint 1, gdk_x_error (display=0x628200, error=0x7fff3d7cd5d0) at gdkmain-x11.c:613 613 gdkmain-x11.c: No such file or directory. in gdkmain-x11.c (gdb) bt #0 gdk_x_error (display=0x628200, error=0x7fff3d7cd5d0) at gdkmain-x11.c:613 #1 0x00007f209c5e0c4c in _XError () from /usr/lib/libX11.so.6 #2 0x00007f209c5e7eb1 in process_responses () from /usr/lib/libX11.so.6 #3 0x00007f209c5e8578 in _XReply () from /usr/lib/libX11.so.6 #4 0x00007f209c5dc5a2 in XSync () from /usr/lib/libX11.so.6 #5 0x00007f209c5dc75b in _XSyncFunction () from /usr/lib/libX11.so.6 #6 0x00007f209c5c2cb3 in XFreeCursor () from /usr/lib/libX11.so.6 #7 0x00007f209e5b0b82 in _gdk_cursor_destroy (cursor=0x795fd0) at gdkcursor-x11.c:264 #8 0x00007f209e5d3e9f in gdk_window_x11_set_cursor (window=0x796460, cursor=0x7e67b0) at gdkwindow-x11.c:2898 #9 0x00007f209ec04fb6 in gtk_text_view_key_press_event () from /usr/lib/libgtk-x11-2.0.so.0 #10 0x00007f209eb506d8 in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0 #11 0x00007f209b18405f in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #12 0x00007f209b197356 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #13 0x00007f209b1988e5 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #14 0x00007f209b198f23 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #15 0x00007f209ec52cc6 in gtk_widget_event_internal () from /usr/lib/libgtk-x11-2.0.so.0 #16 0x00007f209ec64f17 in gtk_window_propagate_key_event () ---Type <return> to continue, or q <return> to quit--- from /usr/lib/libgtk-x11-2.0.so.0 #17 0x00007f209ec67edb in gtk_window_key_press_event () from /usr/lib/libgtk-x11-2.0.so.0 #18 0x00007f209eb506d8 in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0 #19 0x00007f209b18410d in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #20 0x00007f209b197356 in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0 #21 0x00007f209b1988e5 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #22 0x00007f209b198f23 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #23 0x00007f209ec52cc6 in gtk_widget_event_internal () from /usr/lib/libgtk-x11-2.0.so.0 #24 0x00007f209eb49475 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0 #25 0x00007f209eb4a49b in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #26 0x00007f209e5bda2c in gdk_event_dispatch (source=<value optimized out>, callback=<value optimized out>, user_data=<value optimized out>) at gdkevents-x11.c:2365 #27 0x00007f209aac5630 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #28 0x00007f209aac8cc8 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0 ---Type <return> to continue, or q <return> to quit--- #29 0x00007f209aac91b5 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #30 0x00007f209eb4a897 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #31 0x0000000000407570 in main () (gdb) continue Continuing. The program 'mousepad' received an X Window System error. This probably reflects a bug in the program. The error was 'BadValue (integer parameter out of range for operation)'. (Details: serial 960 error_code 2 request_code 94 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.) Program exited with code 01. (gdb) Reproducible: Always Steps to Reproduce: 1. Open GTK+2 app 2. type from the keyboard 3. Watch it fail Actual Results: crash Expected Results: type text x11-libs/gtk+-2.16.5 app-editors/mousepad-0.2.16 $ emerge --info Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 x86_64) ================================================================= System uname: Linux-2.6.30-gentoo-r4-x86_64-AMD_Athlon-tm-_64_Processor_3000+-with-gentoo-1.12.11.1 Timestamp of tree: Thu, 20 Aug 2009 10:00:01 +0000 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7-r1, 2.1.8-r1 dev-lang/python: 2.5.4-r3, 2.6.2-r1 dev-python/pycrypto: 2.0.1-r8 dev-util/cmake: 2.6.4 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -mtune=k8 -mmmx -msse3 -m3dnow -mfpmath=sse" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -pipe -mtune=k8 -mmmx -msse3 -m3dnow -mfpmath=sse" DISTDIR="/usr/portage/distfiles" FEATURES="ccache collision-protect confcache distcc distlocks fixpackages gegl metadata-transfer nostrip parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LDFLAGS="-Wl,-O1" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnownext X Xaw3d a52 aac aalib accessibility acl acpi aim alsa amd64 apm arts asf audiofile avi bash-completion bcmath berkdb bidi blas bonobo bzip2 cairo calendar caps cdparanoia cdr clamav cli cracklib crypt ctype cups curl curlwrappers dbus devil dga dio directfb doc dri dts dv dvb dvd dvdr dvdread emacs emacs-w3 emboss encode esd examples exif expat fastcgi fbcon ffmpeg fftw firefox flac flash foomaticdb fortran freetype ftp gcj gd gdbm gegl geoip ggi gif ginac glut gmp gnutls gphoto2 gpm gps graphviz gstreamer gtk gtk2 gtkhtml guile hal hardened hardenedphp howl icc iconv icq ieee1394 imagemagick imlib ipv6 isdnlog jabber jack jadetex java javascript jbig jikes jpeg jpeg2k junit kerberos krb4 lapack lash lcms leim lesstif libcaca libgda libwww live lm_sensors lua m17n-lib mad maildir mailwrapper matroska mbox mcal memlimit mhash mikmod milter mime ming mjpeg mmap mmx mmxext mng motif mp3 mpeg mpi msn mudflap mule multilib nas ncurses neXt netcdf networking nls nptl nptlonly nsplugin odbc offensive ogg oggvorbis openal opengl openmp osc oscar oss pam pcre pda pdf perl php plotutils png portaudio posix ppds pppd python qt3 quicktime readline recode reflection ruby samba sasl scanner sdl session shorten skey slang slp sndfile snmp soap sockets socks5 source sox speex spell spl sse sse2 ssl startup-notification svg symlink sysfs sysvipc szip tcl tcltk tcpd tetex theora threads tidy tiff tk truetype unicode usb v4l vcd verbose videos voodoo3 vorbis wmf wxwindows x264 xanim xine xinerama xinetd xml xmlrpc xmms xorg xosd xpm xprint xsl xv xvid yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" SANE_BACKENDS="gt68xx" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Also of note, the backspace key seems to work fine, thankfully allowing me to copy and paste and save.
Please rebuild at least glib and gtk+ with CFLAGS="-O2 -march=k8", we'll see from there if it's a gtk+ bug or gcc breaking something with some of your other optimization flags.
hum, just saw you are using the nvidia binary driver, I strongly suggest trying another version of this driver as it is known to break X, gtk+ and other X related programs/libraries in funny weird ways.
(In reply to comment #3) > hum, just saw you are using the nvidia binary driver, I strongly suggest trying > another version of this driver as it is known to break X, gtk+ and other X > related programs/libraries in funny weird ways. I've upgraded to x11-drivers/nvidia-drivers-185.18.29 , and re-emerged x11-libs/gtk+-2.16.5 and dev-libs/glib-2.20.4 with the CFLAGS you asked. No good. (I also realized that I was running x11-base/xorg-server-1.6.3 but x11-base/xorg-x11-7.3 so I upgraded to 7.4 with some other minor package upgrades)
could you try with nv or vesa driver ?
(In reply to comment #5) > could you try with nv or vesa driver ? Sorry for the delay. Tried with both. No success.
More information: openoffice-3.1.1 is not building. Make dies with the following undefined symbol: gdk_keymap_get_caps_lock_state This is prototyped in 2.16.6 (which I just upgraded to) gdk/gdkalias.h (where it is an alias of IA__gdk_keymap_get_caps_lock_state). The ebuild for gtk+-2.16.6 lacks this file.
(In reply to comment #7) I should point out that I'm not sure if this is an unrelated bug.
# nm -D /usr/lib/libgdk-x11-2.0.so.0.1600.6 |grep gdk_keymap_get_caps_lock_state 0004af32 T gdk_keymap_get_caps_lock_state should give you a similar result
(In reply to comment #9) > # nm -D /usr/lib/libgdk-x11-2.0.so.0.1600.6 |grep > gdk_keymap_get_caps_lock_state > 0004af32 T gdk_keymap_get_caps_lock_state > > should give you a similar result Result: 0000000000056cd0 T gdk_keymap_get_caps_lock_state That's weird. That means it has the symbol, but the build says it can't find it.
(In reply to comment #10) > That's weird. That means it has the symbol, but the build says it can't find > it. I have no comments on that, as there's no relevant build log to look at here :)
(In reply to comment #11) > (In reply to comment #10) > > That's weird. That means it has the symbol, but the build says it can't find > > it. > > I have no comments on that, as there's no relevant build log to look at here :) Fair enough. http://www.lij.li/build.log http://www.lij.li/environment
(In reply to comment #12) > Fair enough. > > http://www.lij.li/build.log > http://www.lij.li/environment > it would be more appreciated to attach these files to this bug.
(In reply to comment #13) > it would be more appreciated to attach these files to this bug. The build.log is too large to attach (2.3MB). But I suppose you are right, I could have gzipped the file and attached it that way.
Created attachment 204862 [details] openoffice build log
Created attachment 204863 [details] environment
maybe openoffice doesn't link to gtk+ correctly, I suggest filling a separate bug report for that.
After a hunch and some digging, I think I have the culprit, most likely for both problems. On a couple of occasions, when ebuilds were not in Portage, I manually installed packages from source. I thought I deleted all of the files when the ebuilds for the versions I wanted came out, but apparently I was wrong, and Portage doesn't check for library conflicts with files installed independently of Portage. I'm not sure exactly how to remove everything, but here's the general form I used to find any libraries that were orphaned: echo \#\!/bin/sh > /tmp/equerycheck find `echo $PATH |sed -e 's/:/ /g;'` -true -printf "equery -N belongs -e %p\n" >> /tmp/equerycheck find `cat /etc/ld.so.conf |sed -e 's/\n/ /g;'` -true -printf "equery -N belongs -e %p\n" >> /tmp/equerycheck sh /tmp/equerycheck > /tmp/equeryoutput awk 'p~/^\[.*\]$/&&/^\[.*\]$/{print "failed on "p}{p=$0}END{if(p~/^\[.*\]$/)print "failed on "p}' /tmp/equeryoutput (I actually further refined the file to include only .so files to cut down on the time to run, but even then it took several days to run) Thanks go to waldner_ on #awk for the awk script.
use something like qfile -o /usr/lib (and other paths for libraries and binaries), it is much faster than equery. It doesn't really handle symlinks though. Closing invalid since you installed stuff without portage support and that's something we just can't deal with nor provide support for. Thanks for reporting.