Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 532140 - dev-qt/qtprintsupport-5.4.0 - any executable using QPrintDialog: segmentation fault in QPrintDialog::qt_metacast(char const*) () from /usr/lib64/libQt5PrintSupport.so.5
Summary: dev-qt/qtprintsupport-5.4.0 - any executable using QPrintDialog: segmentation...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
: 542254 542288 (view as bug list)
Depends on:
Blocks: qt5-porting qt-5.4.2-stable
  Show dependency tree
 
Reported: 2014-12-10 12:45 UTC by Heiko Steindl
Modified: 2015-06-17 16:06 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Steindl 2014-12-10 12:45:15 UTC
When calling exec on QPrintDialog, it crashes.

for example:

QPrintDialog dialog( printer, this ); // Also without printer or parent
dialog.exec(); // Crashes here

I got no useful backtrace just, this:
#0  0x00007ffff5d31916 in ?? () from /lib64/libc.so.6
#1  0x00007ffff7f275f0 in QPrintDialog::qt_metacast(char const*) () from /usr/lib64/libQt5PrintSupport.so.5
#2  0x00007ffff7ab383a in QDialog::setVisible(bool) () from /usr/lib64/libQt5Widgets.so.5
#3  0x00007ffff7ab3021 in QDialog::exec() () from /usr/lib64/libQt5Widgets.so.5

Printing without QPrintDialog (on the default printer) works without any problems.

I compiled Qt from git and it works correctly.

Installed Version: Qt-5.4.0_rc (sets: qt5-essentials, qt5-addons, qt5-tools, also qtprintsupport is installed with cups use flag)
Installed CUPS Version: 2.0.1-r1
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-12-11 09:01:56 UTC
1) Please post your `emerge --info' output in a comment.
2) Please post the exact command chain that leads to the segmentation fault.
Comment 2 Heiko Steindl 2014-12-12 10:14:47 UTC
(In reply to Jeroen Roovers from comment #1)
> 1) Please post your `emerge --info' output in a comment.
> 2) Please post the exact command chain that leads to the segmentation fault.

1)
Portage 2.2.15 (python 2.7.7-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.8.3, glibc-2.20, 3.17.4-gentoo x86_64)
=================================================================
System uname: Linux-3.17.4-gentoo-x86_64-Intel-R-_Core-TM-_i7-4770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    32709512 total,   5071828 free
KiB Swap:   16777212 total,  16154960 free
Timestamp of tree: Fri, 12 Dec 2014 07:30:01 +0000
sh bash 4.2_p53
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.7, 3.2.5-r6, 3.3.5-r1, 3.4.1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.7.4, 4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.17-r1 (virtual/os-headers)
sys-libs/glibc:           2.20
Repositories: gentoo vmware ltsp science qt kde
Installed sets: @kde, @kde-4.14, @qt5-addons, @qt5-essentials, @qt5-tools, @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* dlj-1.1 PUEL AdobeFlash-11 Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -msse3 -msse4.1 -msse4.2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0 /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -msse3 -msse4.1 -msse4.2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/vmware /var/lib/layman/ltsp /var/lib/layman/science /var/lib/layman/qt /var/lib/layman/kde"
USE="7zip X a52 aac aacplus aalib acl acpi aim alsa amd64 ao apache2 apng ass avahi berkdb bluetooth branding bzip2 cairo calendar cdda cddb cdparanoia cdr cleartype cli consolekit corefonts cracklib crypt cscope css ctype cups curl cxx d3d dbus declarative dga djvu dri dts dv dvd dvdr dvdread egl emacs emboss encode enscript evo exif faac fam ffmpeg firefox flac fontconfig fontforge foomaticdb fortran freetds ftp g3dvl gbm gd gdbm geoip gif gimp glamor gpm gps graphviz gtk gtkhtml hal hddtemp htmlhandbook iconv icq icu idn ieee1394 imagemagick imap imlib innodb ipod ipv6 jabber jack java javascript jpeg jpeg2k kde kdepim kipi kpathsea lame latex lcms ldap libcaca libkms libnotify lm_sensors lua lzma lzo mad mhash mime mmap mmx mmxext mng modules mp3 mp4 mpeg mpg mplayer msn multilib mysql mysqli nas ncurses netboot network nfs nls nptl nsplugin ntfs ntfsprogs ofx ogg openal openexr opengl openmp openssh openssl openvg oss pam pango pcre pda pdf pdfimport perl phonon pic plasma plotutils png policykit posix postgres ppds pulseaudio python qt3support qt4 qwt raw rdesktop rdp readline rss rtmp ruby samba scanner schroedinger sdl semantic-desktop session slp smp sna snmp soap sockets speex spell sql sqlite sqlite3 sse sse2 sse3 ssl ssse3 startup-notification subversion svg syslog szip taglib tcpd tetex theora threads tidy tiff truetype type1 udev udisks unicode upower usb uxa vaapi vcd vdpau vim-syntax vnc vorbis vpx wddx widgets wifi win32codecs wmf wxwidgets x264 xa xcb xcomposite xface xine xinerama xinetd xml xmlrpc xpdf-headers xpm xprint xscreensaver xv xvid xvmc yahoo zeroconf zip zlib" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4 php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="geoip"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON


2)
I just start an application, which uses QPrintDialog.
Then when calling the exec(), the application crash.

When I comment out QPrintDialog and just print (on the default printer), it works (so there should not be a Problem with CUPS or missing qtprintsupport).

When I compile Qt-5.4.0 from git, the application works without crashing(it displays the list of installed printers and allows to configure the printer, before pressing print.)


I also uninstalled the qt5 sets and reinstalled cups and the qt5 sets today, but the problem still exist.
Comment 3 Michael Palimaka (kensington) gentoo-dev 2014-12-12 13:53:56 UTC
(In reply to Heiko Steindl from comment #2)
> When I compile Qt-5.4.0 from git, the application works without crashing(it
> displays the list of installed printers and allows to configure the printer,
> before pressing print.)

Perhaps 5.4.0 final (which is in the overlay) works then.
Comment 4 Heiko Steindl 2014-12-12 14:02:12 UTC
I'm sorry but, the same problem occurs with the final 5.4.0 version. (I uninstalled all three qt sets and emerged today the final version from the qt overlay)
Comment 5 Davide Pesavento gentoo-dev 2014-12-12 15:53:34 UTC
show us your `emerge -pv qtgui:5 qtwidgets:5` please.
Comment 6 Heiko Steindl 2014-12-12 16:04:58 UTC
no problem, here it is:
[ebuild   R   ~] dev-qt/qtgui-5.4.0:5::qt  USE="accessibility egl evdev gif harfbuzz jpeg opengl png udev xcb -debug -eglfs -gles2 -ibus -kms {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtwidgets-5.4.0:5::qt  USE="opengl png xcb -debug -gles2 {-test}" 0 KiB
Comment 7 Franz Trischberger 2014-12-13 19:25:49 UTC
Similar issue here. Ran into this issue with qpdfview.

#0  0x0000000300080000 in ?? ()
#1  0x00007ffff6a78249 in QMetaObject::cast(QObject const*) const () from /usr/lib64/libQt5Core.so.5
#2  0x00007ffff7577b7c in QFileDialog const* qobject_cast<QFileDialog const*>(QObject const*) ()
   from /usr/lib64/libQt5Widgets.so.5
#3  0x00007ffff7574816 in themeDialogType(QDialog const*) () from /usr/lib64/libQt5Widgets.so.5
#4  0x00007ffff75748f3 in QDialogPrivate::platformHelper() const () from /usr/lib64/libQt5Widgets.so.5
#5  0x00007ffff7574aa4 in QDialogPrivate::setNativeDialogVisible(bool) () from /usr/lib64/libQt5Widgets.so.5
#6  0x00007ffff7575bc7 in QDialog::setVisible(bool) () from /usr/lib64/libQt5Widgets.so.5
#7  0x00007ffff7f93b33 in QPrintDialog::setVisible(bool) () from /usr/lib64/libQt5PrintSupport.so.5
#8  0x00007ffff737a2d5 in QWidget::show() () from /usr/lib64/libQt5Widgets.so.5
#9  0x00007ffff75752dd in QDialog::exec() () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007ffff7f93b4e in QPrintDialog::exec() () from /usr/lib64/libQt5PrintSupport.so.5
#11 0x000000000046afec in qpdfview::MainWindow::on_print_triggered (this=0x733e80) at sources/mainwindow.cpp:997
#12 0x000000000049317a in qpdfview::MainWindow::qt_static_metacall (_o=0x7ffff5dbf698 <main_arena+88>, _c=4124833432, 
    _id=1, _a=0x7fffffffc270) at moc/moc_mainwindow.cpp:617
#13 0x00007ffff6a9ff31 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#14 0x00007ffff73229d2 in QAction::triggered(bool) () from /usr/lib64/libQt5Widgets.so.5
#15 0x00007ffff7321e9c in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQt5Widgets.so.5
#16 0x00007ffff74e3a66 in QMenuPrivate::activateCausedStack(QList<QPointer<QWidget> > const&, QAction*, QAction::ActionEvent, bool) () from /usr/lib64/libQt5Widgets.so.5
#17 0x00007ffff74e3e63 in QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) ()
   from /usr/lib64/libQt5Widgets.so.5
#18 0x00007ffff74e8350 in QMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQt5Widgets.so.5
#19 0x00007ffff737cb7a in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#20 0x00007ffff74e8b5f in QMenu::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#21 0x00007ffff73322b2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#22 0x00007ffff733006e in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#23 0x00007ffff6a706d5 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#24 0x00007ffff7334ff1 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) ()
   from /usr/lib64/libQt5Widgets.so.5
#25 0x00007ffff732e8c3 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/libQt5Widgets.so.5
#26 0x00007ffff73a2b77 in QWidgetWindow::handleMouseEvent(QMouseEvent*) () from /usr/lib64/libQt5Widgets.so.5
#27 0x00007ffff73a214b in QWidgetWindow::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#28 0x00007ffff73322b2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#29 0x00007ffff732f81d in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#30 0x00007ffff6a706d5 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#31 0x00007ffff6d9f2fe in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib64/libQt5Gui.so.5
#32 0x00007ffff6da09d5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib64/libQt5Gui.so.5
#33 0x00007ffff6d874a8 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/libQt5Gui.so.5
#34 0x00007fffef5b3698 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) ()
   from /usr/lib64/qt5/plugins/platforms/libqxcb.so
#35 0x00007ffff417f984 in g_main_dispatch (context=0x7fffe8001e00)
    at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3064
#36 g_main_context_dispatch (context=context@entry=0x7fffe8001e00)
    at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3663
#37 0x00007ffff417fbc8 in g_main_context_iterate (context=context@entry=0x7fffe8001e00, block=block@entry=1, 
    dispatch=dispatch@entry=1, self=<optimized out>)
    at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3734
#38 0x00007ffff417fc6c in g_main_context_iteration (context=0x7fffe8001e00, may_block=1)
    at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3795
#39 0x00007ffff6ac79bc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/libQt5Core.so.5
#40 0x00007fffef5b38aa in QPAEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib64/qt5/plugins/platforms/libqxcb.so
#41 0x00007ffff6a6e63b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#42 0x00007ffff6a75ca6 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#43 0x00007ffff732f05b in QApplication::exec() () from /usr/lib64/libQt5Widgets.so.5
#44 0x0000000000424fc7 in main (argc=1, argv=<optimized out>) at sources/main.cpp:494

--------

[ebuild   R   #] dev-qt/qtgui-5.4.0:5  USE="accessibility egl eglfs evdev gif jpeg opengl png udev xcb -debug -gles2 -harfbuzz -ibus -kms {-test}" 0 KiB
[ebuild   R   #] dev-qt/qtwidgets-5.4.0:5  USE="opengl png xcb -debug -gles2 {-test}" 0 KiB
[ebuild   R   #] dev-qt/qtprintsupport-5.4.0:5  USE="cups -debug {-test}" 0 KiB

--------

Portage 2.2.15 (python 3.4.1-final-0, default/linux/amd64/13.0/desktop, gcc-4.8.3, glibc-2.20, 3.17.6-gentoo x86_64)
=================================================================
System uname: Linux-3.17.6-gentoo-x86_64-Intel-R-_Core-TM-_i3-2350M_CPU_@_2.30GHz-with-gentoo-2.2
KiB Mem:     3890312 total,   1893620 free
KiB Swap:    5242876 total,   5242548 free
Timestamp of tree: Sat, 13 Dec 2014 16:00:01 +0000
sh dash 0.5.7.4
ld GNU ld (Gentoo 2.24 p1.4) 2.24
distcc 3.1 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          4.3_p30-r1
dev-java/java-config:     2.2.0
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.7, 3.3.5-r1, 3.4.1
dev-util/cmake:           3.0.2
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.6
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.6-r1, 1.12.6, 1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3::dlang
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.17-r1 (virtual/os-headers)
sys-libs/glibc:           2.20
Repositories: gentoo aidecoe dlang enlightenment ff2000 kde local mv qt science sera
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7-avx -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=corei7-avx -O2 -pipe -ggdb"
DISTDIR="/var/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/repositories/gentoo"
PORTDIR_OVERLAY="/var/repositories/aidecoe /var/repositories/dlang /var/repositories/enlightenment /var/repositories/ff2000 /var/repositories/kde /var/repositories/local /var/repositories/mv /var/repositories/qt /var/repositories/science /var/repositories/sera"
USE="X a52 aac acl acpi alsa amd64 apm berkdb branding bzip2 cairo cdda cdr cli cracklib crypt cups cxx dbus directfb dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm iconv infinality introspection ipv6 jpeg jpeg2k kipi lcdfilter lcms mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp openrc pam pango pcre pdf png ppds qt3support qt4 readline sdl session spell sse sse2 sse3 sse4 sse4_1 ssl ssse3 svg tcpd theora threads tiff truetype udev udisks unicode usb vaapi vorbis vpx x264 xcb xcomposite xml xscreensaver xv xvid zlib zsh-completion" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="krita sheets stage words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de de_DE" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3 python3_4" RUBY_TARGETS="ruby19 ruby20" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.3 3.4"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC
Comment 8 Franz Trischberger 2014-12-13 19:27:21 UTC
And here <CTRL+P> in qupzilla, which crashes in QPrintPreviewDialog:

#0  0x00007ffff7f687e0 in typeinfo name for QPrintPreviewDialog () from /usr/lib64/libQt5PrintSupport.so.5
#1  0x00007ffff7378bae in QDialog::setVisible(bool) () from /usr/lib64/libQt5Widgets.so.5
#2  0x00007ffff7f6180d in QPrintPreviewDialog::setVisible(bool) () from /usr/lib64/libQt5PrintSupport.so.5
#3  0x00007ffff717d2d5 in QWidget::show() () from /usr/lib64/libQt5Widgets.so.5
#4  0x00007ffff73781e7 in QDialog::open() () from /usr/lib64/libQt5Widgets.so.5
#5  0x00007ffff7899fd8 in BrowserWindow::printPage (this=0x1942d90, frame=frame@entry=0x0) at app/browserwindow.cpp:1210
#6  0x00007ffff7a83bf7 in BrowserWindow::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ../../build/moc_browserwindow.cpp:248
#7  0x00007ffff4aff5bc in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const () from /usr/lib64/libQt5Core.so.5
#8  0x00007ffff4b03ea0 in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) () from /usr/lib64/libQt5Core.so.5
#9  0x00007ffff78b13d7 in invokeMethod (val9=..., val8=..., val7=..., val6=..., val5=..., val4=..., val3=..., val2=..., val1=..., val0=..., member=<optimized out>, obj=<optimized out>)
    at /usr/include/qt5/QtCore/qobjectdefs.h:407
#10 MainMenu::callSlot (this=<optimized out>, slot=<optimized out>) at app/mainmenu.cpp:697
#11 0x00007ffff4b24f31 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#12 0x00007ffff71259d2 in QAction::triggered(bool) () from /usr/lib64/libQt5Widgets.so.5
#13 0x00007ffff7124e9c in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQt5Widgets.so.5
#14 0x00007ffff7124c4e in QAction::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#15 0x00007ffff71352b2 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#16 0x00007ffff713281d in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#17 0x00007ffff4af56d5 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#18 0x00007ffff326c5a1 in QShortcutMap::dispatchEvent(QKeyEvent*) () from /usr/lib64/libQt5Gui.so.5
#19 0x00007ffff326c6bc in QShortcutMap::tryShortcutEvent(QObject*, QKeyEvent*) () from /usr/lib64/libQt5Gui.so.5
#20 0x00007ffff713273b in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#21 0x00007ffff4af56d5 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#22 0x00007ffff324063b in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/lib64/libQt5Gui.so.5
#23 0x00007ffff32449b5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib64/libQt5Gui.so.5
#24 0x00007ffff322b4a8 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Gui.so.5
#25 0x00007fffeb38f698 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/qt5/plugins/platforms/libqxcb.so
#26 0x00007fffef655984 in g_main_dispatch (context=0x7fffe4001e00) at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3064
#27 g_main_context_dispatch (context=context@entry=0x7fffe4001e00) at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3663
#28 0x00007fffef655bc8 in g_main_context_iterate (context=context@entry=0x7fffe4001e00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3734
#29 0x00007fffef655c6c in g_main_context_iteration (context=0x7fffe4001e00, may_block=1) at /var/tmp/portage/dev-libs/glib-2.40.2/work/glib-2.40.2/glib/gmain.c:3795
#30 0x00007ffff4b4c9bc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#31 0x00007fffeb38f8aa in QPAEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt5/plugins/platforms/libqxcb.so
#32 0x00007ffff4af363b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#33 0x00007ffff4afaca6 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#34 0x00007ffff713205b in QApplication::exec() () from /usr/lib64/libQt5Widgets.so.5
#35 0x00000000004029a4 in main (argc=1, argv=<optimized out>) at main.cpp:189
Comment 9 Franz Trischberger 2015-01-01 13:02:57 UTC
Did some testing:
* Qt binary distribution downloaded from qt-project.org works. As in my previous issue with non-working mouse (bug #518330)
* qtbase compiled myself also works.
* The crash is in
__strcmp_ssse3 () at ../sysdeps/x86_64/multiarch/../strcmp.S:209
(glibc-2.20-r1)

So this seems to be an issue with how Gentoo Qt-ebuilds configure the build.
I realized that somehow CFLAGS/CXXFLAGS don't get set properly, the march get's stripped (only "-pipe -O2" appear in the compile args, -march=corei7-avx is stripped away). So I exported C[XX]FLAGS in the terminal and rebuilt qtcore qtgui qtwidgets qtprintsupport. With no success.
I played with several configure options directly in qt5-build.eclass - no success.
Comment 10 Franz Trischberger 2015-01-01 13:30:32 UTC
(In reply to Franz Fellner from comment #9)
> I realized that somehow CFLAGS/CXXFLAGS don't get set properly, the march
> get's stripped (only "-pipe -O2" appear in the compile args,
> -march=corei7-avx is stripped away).

ARGH! This one was a left-over from my attempts to fix #518330: set C[XX]FLAGS to "" via package.env. Removed them, rebuilt qtcore qtgui qtwidgets qtprintsupport with "-march=corei7avx -pipe -O2 -ggdb" - no success.
Now I get 
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff7a9aaba in QDialog::setVisible (this=0x7fffffffdc70, visible=<optimized out>) at dialogs/qdialog.cpp:713
which is funny, because everything should be compiled with -ggdb.
Comment 11 Franz Trischberger 2015-01-02 14:18:52 UTC
Somehow clang produces way better builds with -ggdb:
#0  __strcmp_ssse3 () at ../sysdeps/x86_64/multiarch/../strcmp.S:209
#1  0x00007ffff7fcd3f0 in QPrintDialog::qt_metacast (this=0x637830, _clname=0x67 <error: Cannot access memory at address 0x67>) at .moc/moc_qprintdialog.cpp:127
#2  0x00007ffff7a9776a in QDialog::setVisible (this=0x7fffffffdcd8, visible=<optimized out>) at dialogs/qdialog.cpp:713
#3  0x00007ffff7a96f12 in QDialog::exec (this=0x7fffffffdcd8) at dialogs/qdialog.cpp:533
#4  0x0000000000400ad9 in main ()

1) _clname has a weird address... qt_metacast etc. only pass string literals (which AFAIK usualy are stored in the const section of RAM) but I don't know if 0x67 really can be valid (runtime says NO)...

2) The address of the Dialog changes. QDialog.this==0x7fffffffdcd8, QPrintDialog.this==0x637830 (though it is the same instance)
THAT looks completely wrong. I would like to debug that, but gcc and clang force inlining of methods. And there really seems to be quite some inline function calls involved.
AFAICS the only user of qt_metacast is QObject::inherits() (at least in the path from QDialog::setVisible upwards). But - where?!?

I ran diff on both (local vs. portage) Makefiles for qtprintsupport. Obvious difference are in the order of specified include_directories. Don't know if that can break things (order of #include's in sourcefiles definitvely CAN break things).
Comment 12 Franz Trischberger 2015-01-02 15:04:28 UTC
Now simply edited qt5-build.eclass, removed EVERYTHING between "-shared" and "$myconf", rebuilt qtwidgets and qtprintsupport - and the crash is gone.

I now spent more than one day, mostly with waiting for the build to finish. I don't have the time to test all the flags. If you think you know which options break the build just tell me and I will rebuild and report back.

Here are my USE-Flags of relevant packages:
[ebuild   R   #] dev-qt/qtcore-5.4.0:5  USE="icu -debug -systemd {-test}" 0 KiB
[ebuild   R   #] dev-qt/qtgui-5.4.0:5  USE="accessibility egl eglfs evdev gif jpeg opengl png udev xcb -debug -gles2 -harfbuzz -ibus -kms {-test}" 0 KiB
[ebuild   R   #] dev-qt/qtwidgets-5.4.0:5  USE="opengl png xcb -debug -gles2 {-test}" 0 KiB
[ebuild   R   #] dev-qt/qtprintsupport-5.4.0:5  USE="cups -debug {-test}" 0 KiB
Comment 13 Franz Trischberger 2015-01-03 08:14:01 UTC
Dived into the sources (which is what I should have done in the first place).
QWidget enables virtual functions based on the definition of QT_NO_OPENGL. that changes vtable and ABI. QPrintDialog uses a different layout for its (indirect) base QWidget that the QWidget class compiled with qtwidgets. This is nothing one should do...

So the solution is to sync USE-Flags the same way it is already done for qtgui/qtwidgets.
Comment 14 Davide Pesavento gentoo-dev 2015-01-09 23:06:23 UTC
Ah thanks a lot. I had already tried grepping for _OPENGL, as that's usually one of my primary suspects, but somehow I missed the occurrence in qwidget_p.h.

The problematic class is QWidgetPrivate, not QWidget, therefore this affects only the consumers of the private ABI. However it's still a very serious issue, given how widespread the widgets module is. I'm thinking about removing the opengl USE flag from qt{gui,widgets} altogether, and just keeping the choice between OpenGL and GLES.

What do others think?
Comment 15 Franz Trischberger 2015-01-14 12:17:35 UTC
Sry, yes, it's QWidgetPrivate.
Enabling OpenGL by default looks like a good solution. But I don't know if it can fix such issues in the future. There only needs to be one new flag added (I can imagine for Wayland), which adds virtual functions conditionally in QWidgetPrivate, and have again the same dilemma.

The most secure solution IMHO would be to ship ebuilds for the qtmodules as they are distributed upstream (qtbase instead of qtcore/qtgui/...). That way we can be sure that the whole module is configured in a consistent way.

I think my last issue with Qt 5.3.2 (bug #518330) also was caused by a mismatch of configure flags, probably X/xcb/... related.
Comment 16 Michael Palimaka (kensington) gentoo-dev 2015-01-31 14:24:19 UTC
The only downside to making opengl mandatory is it could upset some people on eg. headless systems.
Comment 17 Ben de Groot (RETIRED) gentoo-dev 2015-02-01 10:38:27 UTC
+  01 Feb 2015; Ben de Groot <yngwin@gentoo.org> qtprintsupport-5.4.0.ebuild:
+  Workaround for bug #532140: force rebuild when opengl useflag is toggled in
+  qtgui and qtwidgets.
Comment 18 Franz Trischberger 2015-02-01 12:41:45 UTC
(In reply to Ben de Groot from comment #17)
> +  01 Feb 2015; Ben de Groot <yngwin@gentoo.org> qtprintsupport-5.4.0.ebuild:
> +  Workaround for bug #532140: force rebuild when opengl useflag is toggled
> in
> +  qtgui and qtwidgets.

That only fixes issues with qtprintsupport. But there are other modules that  have private classes which inherit QWidgetPrivate. A quick grep through the official binary installation reveals QtScriptTools and QtQuickWidgets. Not even talking about third-party-applications that make use of private headers.
Comment 19 octoploid 2015-02-01 16:50:06 UTC
This breaks my setup:

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] sys-devel/patch-2.7.4 [2.7.3] USE="-static {-test} -xattr" 698 KiB
[ebuild   R    ] dev-qt/qtgui-5.4.0:5  USE="accessibility gif harfbuzz jpeg png udev xcb -debug -egl -eglfs -evdev -gles2 -ibus -kms -opengl* {-test}" 0 KiB
[ebuild   R    ] dev-qt/qtwidgets-5.4.0:5  USE="png xcb -debug -gles2 -opengl* {-test}" 0 KiB
[ebuild  NS    ] dev-libs/grantlee-5.0.0:5 [0.4.0:0] USE="-debug -doc {-test}" 1,140 KiB

Total: 4 packages (1 upgrade, 1 in new slot, 2 reinstalls), Size of downloads: 1,837 KiB

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

dev-qt/qtgui:5

  (dev-qt/qtgui-5.4.0:5/5::gentoo, installed) pulled in by
    ~dev-qt/qtgui-5.4.0[debug=,gles2=,opengl] required by (dev-qt/qtopengl-5.4.0:5/5::gentoo, installed)
                                      ^^^^^^                                                                                                
    ~dev-qt/qtgui-5.4.0[debug=,gles2=,opengl=,png=,xcb?] required by (dev-qt/qtwidgets-5.4.0:5/5::gentoo, installed)
                                      ^^^^^^^                                                                                                           

  (dev-qt/qtgui-5.4.0:5/5::gentoo, ebuild scheduled for merge) pulled in by
    ~dev-qt/qtgui-5.4.0[debug=,gles2=,opengl=,png=,xcb?] required by (dev-qt/qtwidgets-5.4.0:5/5::gentoo, ebuild scheduled for merge)
                                      ^^^^^^^                                                                                                                            
    ~dev-qt/qtgui-5.4.0[debug=,opengl=] required by (dev-qt/qtprintsupport-5.4.0:5/5::gentoo, installed)
                               ^^^^^^^                                                                                                      

dev-qt/qtwidgets:5

  (dev-qt/qtwidgets-5.4.0:5/5::gentoo, installed) pulled in by
    ~dev-qt/qtwidgets-5.4.0[debug=,gles2=,opengl] required by (dev-qt/qtopengl-5.4.0:5/5::gentoo, installed)
                                          ^^^^^^                                                                                                

  (dev-qt/qtwidgets-5.4.0:5/5::gentoo, ebuild scheduled for merge) pulled in by
    ~dev-qt/qtwidgets-5.4.0[debug=,opengl=] required by (dev-qt/qtprintsupport-5.4.0:5/5::gentoo, installed)
                                   ^^^^^^^                                                                                                      


It might be possible to solve these slot collisions
by applying all of the following changes:
   - dev-qt/qtwebkit-5.4.0 (Change USE: +debug)
   - dev-qt/designer-5.4.0 (Change USE: +debug)
   - dev-qt/qthelp-5.4.0 (Change USE: +debug)
   - dev-qt/qtgui-5.4.0 (Change USE: +gles2 +debug +opengl)
   - dev-qt/qtopengl-5.4.0 (Change USE: +gles2 +debug)
   - dev-qt/qtwidgets-5.4.0 (Change USE: +gles2 +debug)
   - dev-qt/qtprintsupport-5.4.0 (Change USE: +debug)
   - dev-qt/qtsvg-5.4.0 (Change USE: +debug)
   - dev-qt/qtx11extras-5.4.0 (Change USE: +debug)
   - dev-qt/qtwidgets-5.4.0 (Change USE: +gles2 +debug +opengl)


The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by dev-qt/qtprintsupport-5.4.0
# required by dev-python/PyQt5-5.4[printsupport]
# required by @selected
# required by @world (argument)
>=dev-qt/qtgui-5.4.0 -opengl
# required by dev-qt/qtprintsupport-5.4.0
# required by dev-python/PyQt5-5.4[printsupport]
# required by @selected
# required by @world (argument)
>=dev-qt/qtwidgets-5.4.0 -opengl

WARNING: Requested packages will not be merged because they are listed in
package.provided:

  x11-wm/wmii pulled in by 'selected'
  sys-devel/binutils pulled in by 'selected', 'system'
  x11-apps/mesa-progs pulled in by 'selected'
  sys-kernel/linux-headers pulled in by 'selected'
  x11-libs/gtk+:2 pulled in by 'selected'
  mail-client/mutt pulled in by 'selected'
  gnome-base/gconf:2 pulled in by 'selected'
  x11-libs/gtk+ pulled in by 'selected'
  >=sys-apps/baselayout-2 pulled in by 'system'
  x11-base/xorg-server pulled in by 'selected'
  sys-devel/gcc pulled in by 'selected', 'system'
  sys-fs/eudev pulled in by 'selected'
  sys-apps/openrc pulled in by 'selected', 'system'
  app-misc/mc pulled in by 'selected'
  x11-libs/libdrm pulled in by 'selected'
  sys-libs/glibc pulled in by 'selected'
  net-irc/weechat pulled in by 'selected'

This problem can be solved in one of the following ways:

  A) Use emaint to clean offending packages from world (if not installed).
  B) Uninstall offending packages (cleans them from world).
  C) Remove offending entries from package.provided.

The best course of action depends on the reason that an offending
package.provided entry exists.


!!! All ebuilds that could satisfy "~dev-qt/qtgui-5.4.0[debug=,gles2=,opengl=,png=,xcb?]" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-qt/qtgui-5.4.0::gentoo (masked by: )

(dependency required by "dev-qt/qtwidgets-5.4.0" [ebuild])
(dependency required by "dev-qt/qtx11extras-5.4.0" [installed])
(dependency required by "media-video/simplescreenrecorder-0.3.3-r1::anders-larsson[qt5]" [installed])
(dependency required by "@selected" [set])
(dependency required by "@world" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
Comment 20 Michael Palimaka (kensington) gentoo-dev 2015-02-01 16:54:02 UTC
qtprintsupport needs to be built with the same opengl setting as qtgui and qtwidgets. I've synced the IUSE default to make this a bit smoother.
Comment 21 Michael Palimaka (kensington) gentoo-dev 2015-02-01 17:05:44 UTC
Also, you may need to rebuild qtprintsupport to update the dep in vdb.
Comment 22 octoploid 2015-02-01 17:49:23 UTC
(In reply to Michael Palimaka (kensington) from comment #21)
> Also, you may need to rebuild qtprintsupport to update the dep in vdb.

Thanks, rebuilding did the trick.
Comment 23 Davide Pesavento gentoo-dev 2015-02-01 18:51:22 UTC
(In reply to Michael Palimaka (kensington) from comment #16)
> The only downside to making opengl mandatory is it could upset some people
> on eg. headless systems.

Those people (I'm actually one of them) shouldn't need qtgui on their systems in the first place...

(In reply to Franz Fellner from comment #18)
> (In reply to Ben de Groot from comment #17)
> > +  01 Feb 2015; Ben de Groot <yngwin@gentoo.org> qtprintsupport-5.4.0.ebuild:
> > +  Workaround for bug #532140: force rebuild when opengl useflag is toggled
> > in
> > +  qtgui and qtwidgets.
> 
> That only fixes issues with qtprintsupport. But there are other modules that
> have private classes which inherit QWidgetPrivate. A quick grep through the
> official binary installation reveals QtScriptTools and QtQuickWidgets. Not
> even talking about third-party-applications that make use of private headers.

Indeed. This is a time bomb, better disarm it asap.
Comment 24 Malte E. 2015-02-02 08:46:13 UTC
it didn't fix the issue for me. I just rebuilt qtprintsupport, then rebuilt qtgui and qtwidgets and then qtprintsupport again and my qt5 apps still segfault when I try to print. I synched portage today.
Comment 25 Davide Pesavento gentoo-dev 2015-02-02 13:38:29 UTC
With any application? If you can try with qpdfview or qupzilla, please verify that gdb backtraces are similar to the ones in comments #7/#8
Comment 26 Malte E. 2015-02-03 11:55:49 UTC
Any Qt5 application that I've tried so far (Okular, Gwenview, Otter). I have qpdfview for qt4 installed for that matter. The backtrace contains a line like this:
#7  0x00007fc32cae0640 in QPrintDialog::qt_metacast (this=0x2813f60, _clname=0x67 <error: Cannot access memory at address 0x67>) at .moc/moc_qprintdialog.cpp:127
I hope it helps. Not all the debuggins symbols are installed and actually don't have much time right now that I can invest in this.
Comment 27 Xavier Miller (RETIRED) gentoo-dev 2015-02-06 13:23:49 UTC
Same problem with qpdfview with QT5. (5.4.0)
Comment 28 Michael Palimaka (kensington) gentoo-dev 2015-03-05 17:03:51 UTC
*** Bug 542254 has been marked as a duplicate of this bug. ***
Comment 29 Ben Kohler gentoo-dev 2015-03-05 17:19:32 UTC
*** Bug 542288 has been marked as a duplicate of this bug. ***
Comment 30 Michael Palimaka (kensington) gentoo-dev 2015-03-14 16:49:57 UTC
(In reply to Davide Pesavento from comment #14)
> Ah thanks a lot. I had already tried grepping for _OPENGL, as that's usually
> one of my primary suspects, but somehow I missed the occurrence in
> qwidget_p.h.
> 
> The problematic class is QWidgetPrivate, not QWidget, therefore this affects
> only the consumers of the private ABI. However it's still a very serious
> issue, given how widespread the widgets module is. I'm thinking about
> removing the opengl USE flag from qt{gui,widgets} altogether, and just
> keeping the choice between OpenGL and GLES.
> 
> What do others think?

I'll try to push this to the overlay for review since nobody complained.
Comment 31 jospezial 2015-04-08 11:55:21 UTC
I have that crash too. tested with okular and konsole.
Any news since the last weeks?

This bug is really annoying because I have to use Adobe reader for printing pdf or have to use my ubuntu system.

Would it help me if I disable opengl (and egl?) flag on all qt packages?

I hope there is a solution soon.

Good Luck!
Comment 32 jospezial 2015-04-30 20:14:14 UTC
After reinstall all my packages from qt and kde overlay now I can see the printdialog without a crash.
Comment 33 Davide Pesavento gentoo-dev 2015-06-10 18:10:32 UTC
https://gitweb.gentoo.org/proj/qt.git/commit/?id=5d02af58a0482e6967f56e78b6ec4e9d5eff00f7

Will enter the tree with 5.4.2

@kensington, can you help fixing the kde reverse deps please? a quick grep shows these packages are affected:

kde-frameworks/plasma-5.10.0
kde-plasma/kwin-5.3.1
kde-plasma/kinfocenter-5.3.1
Comment 34 Michael Palimaka (kensington) gentoo-dev 2015-06-12 16:19:34 UTC
(In reply to Davide Pesavento from comment #33)
> https://gitweb.gentoo.org/proj/qt.git/commit/
> ?id=5d02af58a0482e6967f56e78b6ec4e9d5eff00f7
> 
> Will enter the tree with 5.4.2
> 
> @kensington, can you help fixing the kde reverse deps please? a quick grep
> shows these packages are affected:
> 
> kde-frameworks/plasma-5.10.0
> kde-plasma/kwin-5.3.1
> kde-plasma/kinfocenter-5.3.1

Done by johu in bug #551772.
Comment 35 Davide Pesavento gentoo-dev 2015-06-17 16:06:19 UTC
(In reply to Davide Pesavento from comment #33)
> https://gitweb.gentoo.org/proj/qt.git/commit/
> ?id=5d02af58a0482e6967f56e78b6ec4e9d5eff00f7
> 
> Will enter the tree with 5.4.2

In tree now.