Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 429628 - >=app-office/lyx-2.0.3 - lyx crashes with "Exception: std::bad_alloc"
Summary: >=app-office/lyx-2.0.3 - lyx crashes with "Exception: std::bad_alloc"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-03 11:16 UTC by nihil39
Modified: 2012-11-20 13:47 UTC (History)
4 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 nihil39 2012-08-03 11:16:35 UTC
Hi,
I've recently installed gentoo on a 4-year-old Dell laptop (core 2 duo T7300, 2 GB RAM, Geforce 8400 GS). 

This is the output of emerge --info containing my global C an d CXX flags

Portage 2.1.10.65 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r3, 3.3.8-gentoo x86_64) 
================================================================= 
System uname: Linux-3.3.8-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7300_@_2.00GHz-with-gentoo-2.1 
Timestamp of tree: Thu, 02 Aug 2012 12:45:01 +0000 
app-shells/bash:          4.2_p20 
dev-lang/python:          2.7.3-r2, 3.2.3 
dev-util/cmake:           2.8.7-r5 
dev-util/pkgconfig:       0.26 
sys-apps/baselayout:      2.1-r1 
sys-apps/openrc:          0.9.8.4 
sys-apps/sandbox:         2.5 
sys-devel/autoconf:       2.13, 2.68 
sys-devel/automake:       1.11.1 
sys-devel/binutils:       2.21.1-r1 
sys-devel/gcc:            4.5.3-r2 
sys-devel/gcc-config:     1.6 
sys-devel/libtool:        2.4-r1 
sys-devel/make:           3.82-r1 
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers) 
sys-libs/glibc:           2.14.1-r3 
Repositories: gentoo 
ACCEPT_KEYWORDS="amd64" 
ACCEPT_LICENSE="* -@EULA @EULA" 
CBUILD="x86_64-pc-linux-gnu" 
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=core2 -fpredictive-commoning -fgcse-after-reload -mfpmath=sse" 
CHOST="x86_64-pc-linux-gnu" 
CONFIG_PROTECT="/etc" 
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /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="-O2 -pipe -fomit-frame-pointer -march=core2 -fpredictive-commoning -fgcse-after-reload -mfpmath=sse" 
DISTDIR="/usr/portage/distfiles" 
FCFLAGS="-O2 -pipe" 
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" 
FFLAGS="-O2 -pipe" 
GENTOO_MIRRORS="http://gentoo.inode.at/ http://mirror.switch.ch/ftp/mirror/gentoo/" 
LDFLAGS="-Wl,-O1 -Wl,--as-needed" 
LINGUAS="en it" 
MAKEOPTS="-j3" 
PKGDIR="/usr/portage/packages" 
PORTAGE_CONFIGROOT="/" 
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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="" 
SYNC="rsync://rsync.se.gentoo.org/gentoo-portage" 
USE="X a52 aac acl acpi alsa amd64 avahi bash-completion berkdb branding bzip2 cairo cdda cddb cdr cli composite consolekit cracklib crypt cscope cups cxx dbus dhcpcd djvu dri dts dvd dvdr dvi emboss encode exif fam fastscroll ffmpeg firefox flac fortran g3dvl gdbm gif glibc-omitfp gpm gtk gtk3 hddtemp iconv icu id3tag ipv6 jpeg lame latex lcms libnotify lm_sensors mad matroska mmx mng modules mp3 mp4 mpeg multilib musepack ncurses networkmanager nls nptl ntfsprogs nvidia offensive ogg opengl openmp pam pango pcre pdf png policykit ppds pppd pulseaudio python3 qt3support rar readline savedconfig sdl session spell sse sse2 sse3 ssl ssse3 startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower usb vdpau vorbis wxwidgets x264 xcb xcomposite xetex xml xv xvid 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 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" 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 ubx" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en it" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" 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" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON 

I recompiled lyx the following more conservative CFLAGS and CXXFLAGS but the problem is not solved


* app-office/lyx-2.0.4
   Install date: Fri Aug  3 12:48:01 2012
   USE="cups nls xetex svg -debug -+latex -luatex -monolithic-build -html -rtf -dot -docbook -dia -subversion -rcs -gnumeric -+hunspell -aspell -enchant"
   CFLAGS="-O1 -pipe"

The same problem appears with version 2.0.3. 

The strange thing is that I've compiled lyx 2.0.4 on another machine (core i3-2310M, 4GB RAM) with the same CXXFLAGS posted in my emerge --info and it works fine

Thanks in advance.
Comment 1 nihil39 2012-08-03 11:19:35 UTC
I forgot to say that lyx crashes as soon as I launch it, it loads the UI and it displys the message 

LyX has caught an exception, it will now attempt to save all unsaved documents and exit.

Exception: std::bad_alloc
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-03 11:23:42 UTC
Please capture and post the entire output of the `lyx' command when run from a terminal.
Comment 3 nihil39 2012-08-03 11:26:39 UTC
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
Error returned from iconv
EILSEQ An invalid multibyte sequence has been encountered in the input.
When converting from UCS-4LE to UTF-8.
Input: 0xd0 0x61 0xe1 0xd1

lyx: SIGSEGV signal caught!
Sorry, you have found a bug in LyX, hope you have not lost any data.
Please read the bug-reporting instructions in 'Help->Introduction' and send us a bug report, if necessary. Thanks!
Bye.
Error: LyX crashed!
----------------------------------------
SIGSEGV signal caught!
Sorry, you have found a bug in LyX, hope you have not lost any data.
Please read the bug-reporting instructions in 'Help->Introduction' and send us a bug report, if necessary. Thanks!
Bye.

Now it seems it has changed error message.
Comment 4 nihil39 2012-08-03 11:29:15 UTC
At a second attempt it gives me back the first error message.

I hope it's not a problem related to this pc's ram...

GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
GuiToolbar.cpp(362): Session settings could not be found!. Defaults are used instead
Error: Software exception Detected
----------------------------------------
LyX has caught an exception, it will now attempt to save all unsaved documents and exit.

Exception: std::bad_alloc
Comment 5 nihil39 2012-08-03 12:17:28 UTC
I launched lyx several times and still keeps saying the bad_alloc message, the one for which I filed this bug. I don't know why it gave me that SIGSEV error once, I don't think it's related with this bug.
Comment 6 nihil39 2012-08-04 00:57:25 UTC
I found that running LyX as root works. All the exceptions and errors I talked about in the previous posts are related to running it as normal user. The rest of the system works and programs work like a charm running them as a normal user. I think this still qualifies as a bug, am I right?
Comment 7 pavel sanda 2012-08-12 19:48:04 UTC
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg92464.html

can you try remerge qt and lyx afterwards?
Comment 8 nihil39 2012-08-13 07:30:16 UTC
Do you mean I have to re-emerge qt-core and qt-gui, log in and then log out from X server and than re-emerge lyx in that order? 

Should I also compile lyx without the xetex and or luatex flag? It seems that the author of that post has done so.
Comment 9 pavel sanda 2012-08-13 07:33:49 UTC
(In reply to comment #8)
> Do you mean I have to re-emerge qt-core and qt-gui, log in and then log out
> from X server and than re-emerge lyx in that order? 

Yes. Try to remember exact steps so we have receipt in case it works.

> Should I also compile lyx without the xetex and or luatex flag? It seems
> that the author of that post has done so.

I don't believe this matters.
Comment 10 nihil39 2012-08-13 07:37:39 UTC
Ok, I'll do this in ten days, I'm just leaving for a short vacation now. Thanks for the great support, I'll post here the results as soon as I know them.
Comment 11 nihil39 2012-08-20 16:42:43 UTC
Ok, issue solved. I:

1. remerged qt-core and qt-gui (emerge -1v qt-core qt-gui)

x11-libs/qt-core-4.8.2 was built with the following:
USE="exceptions glib iconv icu (multilib) qt3support ssl (-aqua) (-c++0x) -debug -optimized-qmake -pch (-qpa)"

x11-libs/qt-gui-4.8.2 was built with the following:
USE="accessibility cups dbus exceptions gif glib mng (multilib) qt3support tiff xv (-aqua) (-c++0x) -debug -egl -gtkstyle -nas -nis -pch (-qpa) -trace -xinerama"


2. Logged out and logged back in from the Xfce4 session

3. remerged lyx (emerge -1v lyx)

app-office/lyx-2.0.4 was built with the following:
USE="X cups hunspell latex (multilib) nls svg xetex -aspell -debug -dia -docbook -dot -enchant -gnumeric -html -luatex -monolithic-build -rcs -rtf -subversion" LINGUAS="en it -ar -ca -cs -da -de -el -es -eu -fi -fr -gl -he -hu -ia -id -ja -nb -nn -pl -pt -ro -ru -sk -sr -sv -tr -uk -zh_CN -zh_TW"

Now it works (apparently) for a normal user as well, not only as root. 
Thanks!
Comment 12 pavel sanda 2012-08-21 11:52:34 UTC
i think it should be closed.
Comment 13 Naohiro Aota gentoo-dev 2012-10-09 23:39:35 UTC
@aballier anything to do left here? if not please close this.
Comment 14 Alexis Ballier gentoo-dev 2012-11-20 13:47:08 UTC
(In reply to comment #12)
> i think it should be closed.

closing