Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]qt 4.8 breaks smplayer running in xfce4 4.10 session
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Thu May 31, 2012 10:08 am    Post subject: [Solved]qt 4.8 breaks smplayer running in xfce4 4.10 session Reply with quote

I upgraded xfce4, qt4, and smplayer all at the same time,
and I ended up with no smplayer. It would show up on the
xfce4 application menu under multimedia, but when I selected
it, nothing happened. I downgraded smplayer from 0.8.0 to
0.7.1, no change. I did not find any discussion threads that
looked like the same problem on the xfce forum.

So I unmerged the recent update to qt-4.8.1 (qt-core, qt-dbus,
qt-script, and qt-gui, most recent stable versions on amd64),
and I re-emerged qt-core-4.7.4-r1 and friends (the versions that
had been replaced by the updates to qt-4.8.x). Then I re-emerged
smplayer-0.8.0 (to link to the older libraries instead of the now
removed newer qt4 libraries).

That worked. I switched back to the X session, started smplayer,
and I am now listening to an online .mp3 stream, which is what
I mostly use it for.

There was some message in the smplayer log about "unable to
parse display resolution" (or "display size" or something along
that line), and setting it to 0, apparently the default, but I had
that message when it would not start *and* when it successfully
started after the qt4 downgrade, so that is not what was keeping
it from running with qt-4.8.x.

(HTH)
_________________
TIA


Last edited by wcg on Sun Jul 15, 2012 9:18 am; edited 1 time in total
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Sat Jun 02, 2012 1:19 pm    Post subject: Reply with quote

From the smplayer maintainer:
Quote:

In Ubuntu 12.04, smplayer works ok with Qt 4.8.1. So I don't think it's a problem of Qt 4.8.


One of those "-r?" patches?

In the qt-core-4.8.1-r3 emerge log, I only see it applying two patches
at the beginning:
Code:

moc-workaround-for-boost-1.48
qt-core-4.8.1-localized-time


qt-dbus-4.8.1 and qt-script-4.8.1 have no "-r?" patches applied.

qt-gui-4.8.1-r1 has two:
Code:

qt-gui-4.7.3-cups
qt-gui-4.8.1-fix-calligra


Exits with a segfault before the window opens. Kernel log reports smplayer
trying to write to a null pointer.

This happens with both smplayer-0.7.1 and smplayer-0.8.0 linked to the
qt-4.8.1* libraries. Both work fine (at least for what I use them for, .mp3
streams, audio cds, and playing YouTube videos that Firefox declines to
play on its own) when linked to the qt-4.7.4* libraries.

kernel 3.1.6
CHOST=x86_64-pc-linux-gnu
CFLAGS=-march=native -O2 -fno-strict-aliasing -pipe -Wall
CXXFLAGS=-march=native -O2 -fno-strict-aliasing -fpermissive -pipe -Wall
gcc-4.5.3
glibc-2.15-r2
_________________
TIA
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 3900
Location: Irgendwo im Nirgendwo

PostPosted: Sat Jun 02, 2012 2:49 pm    Post subject: Reply with quote

We need a backtrace of the smplayer crash:
http://www.gentoo.org/proj/en/qa/backtraces.xml
_________________
"der mac dennoch wesen geil"
Wolfram von Eschenbach, Parzival (Buch 1, Z. 7).
Ein frühes Statement gegen Windows.

My overlay
Back to top
View user's profile Send private message
mir3x
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jun 2012
Posts: 123

PostPosted: Sat Jun 02, 2012 3:27 pm    Post subject: Reply with quote

I couldn't upgrade smplayer by compilation but I noticed that gcc complains about some quazip includes, so I upgraded quazip and now smplayer-0.8 works with qt-4.8.1, so maybe it's only some deps problem also, or try removing config files ( Im using kde ) ?
(*update ) i tested it on xfce and smplayer works there normally
Back to top
View user's profile Send private message
ViruSzZ
n00b
n00b


Joined: 13 Jan 2012
Posts: 6
Location: The Streets

PostPosted: Sat Jun 02, 2012 11:51 pm    Post subject: Reply with quote

It seems I'm affected by this issue. Here is the backtrace http://pastebin.com/Gr5Aup71

recompiled qt-core and qt-gui nostripped as suggested on the IRC.

let me know if I need to provide some more details .

Thanks

EDIT: Oh, I'm using xfce if that matters.

EDIT 2: here are some more details:

smplayer segfault when initially launched as normal user.

Code:
Segmentation fault
Jun  3 01:26:52 hackler kernel: smplayer[31808]: segfault at 0 ip           (null) sp 00007fff8d500298 error 14 in smplayer[400000+26e000]


when executed as root it is working just fine.
_________________
Their momma made `em, their momma gave `em and now she can't even save `em
https://d.stavrovski.net
Back to top
View user's profile Send private message
mir3x
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jun 2012
Posts: 123

PostPosted: Sun Jun 03, 2012 12:34 am    Post subject: Reply with quote

Try moving config files to another dir as normal user ( I have them in /home/$user/.config/smplayer ) and test or change qt style to another ( launch qtconfig ) ? Other qt apps work ?
Back to top
View user's profile Send private message
ViruSzZ
n00b
n00b


Joined: 13 Jan 2012
Posts: 6
Location: The Streets

PostPosted: Sun Jun 03, 2012 8:37 am    Post subject: Reply with quote

mir3x wrote:
Try moving config files to another dir as normal user ( I have them in /home/$user/.config/smplayer ) and test or change qt style to another ( launch qtconfig ) ? Other qt apps work ?


I've tried (re)moving the configuration with no effect, still segfaults smplayer when launched. Tried to change the qt style and that doesn't work as well. Other qt applications work just fine. It is just smplayer.

Someone on IRC asked me to provide a backtrace with qt-gui and qt-core compiled unstripped so that may lead to some further clues but, I do not quite understand the backtrace and do not know how to proceed with debugging this further.

Also am really confused as to why it runs as root but is not running as normal user. I'll try creating new user now and will see if it will segfault there too.

EDIT: Just tried creating a new user, added to 'video' group, logout and login again and smplayer still segfault there as well.
_________________
Their momma made `em, their momma gave `em and now she can't even save `em
https://d.stavrovski.net
Back to top
View user's profile Send private message
franzf
Advocate
Advocate


Joined: 29 Mar 2005
Posts: 3900
Location: Irgendwo im Nirgendwo

PostPosted: Sun Jun 03, 2012 8:50 am    Post subject: Reply with quote

The default behaviour is to split debugging information and not strip. strip will remove all debugging information, split will split it out and save it under /usr/lib/debug. gdb then can load the information to generate more verbose backtraces.
But I posted a link, where it is recommended to add -ggdb to your CFLAGS and CXXFLAGS. To get even better backtraces, you can add -g3 to both CFLAGS and CXXFLAGS.
So could you extend your CFLAGS and CXXFLAGS at least with "-ggdb", better with "-ggdb -g3" and recompile qt-core, qt-gui, smplayer, libICE and libSM and again generate a backtrace and post it. Thx :)

And keep splitting debug information. So your applications will be run as if you never built in debugging information (no worse performance), and you will get verbose backtraces if you need them. I have built everything just with -ggdb, as it is enough for most cases, and if I really need it, I rebuild with -g3.
_________________
"der mac dennoch wesen geil"
Wolfram von Eschenbach, Parzival (Buch 1, Z. 7).
Ein frühes Statement gegen Windows.

My overlay
Back to top
View user's profile Send private message
ViruSzZ
n00b
n00b


Joined: 13 Jan 2012
Posts: 6
Location: The Streets

PostPosted: Sun Jun 03, 2012 8:54 am    Post subject: Reply with quote

Ohhh, that's some nice tip. Thank you. I'm going to recompile with those flags now and will post the backtrace again once the compiling is completed.

Thank you.
_________________
Their momma made `em, their momma gave `em and now she can't even save `em
https://d.stavrovski.net
Back to top
View user's profile Send private message
ViruSzZ
n00b
n00b


Joined: 13 Jan 2012
Posts: 6
Location: The Streets

PostPosted: Sun Jun 03, 2012 9:26 am    Post subject: Reply with quote

Recompilation of 'emerge -av qt-core qt-gui smplayer libICE libSM' just finished and before taking the backtrace I tried to launch smplayer with my user and it works now. It is not segfaulting.

So I guess that was the issue and needs those packages recompiled.

Thanks. It is solved at my place.
_________________
Their momma made `em, their momma gave `em and now she can't even save `em
https://d.stavrovski.net
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Sun Jun 03, 2012 6:00 pm    Post subject: Reply with quote

Interesting. The Gentoo backtrace page that the URL for was posted
above says YMMV on -g3:
Quote:

There is actually another flag (-g3), but its use is not recommended. It seems to break binary interfaces and might lead to extra crashes. For instance, glibc breaks when built with that flag. If you want to provide as much information as possible, you should use the -ggdb flag.


It really is a pretty good document on getting backtraces with gdb.

Note for anyone else interested in debugging this, launching smplayer
from a terminal window (in X, like xterm, xfce's Terminal Emulator, etc)
works. smplayer loads and works fine that way, so you can have gdb
start it from the same terminal window if you want to get backtraces
with gdb.

So re-emerging other dependencies than the qt libraries fixed it with
qt-4.8.1?
_________________
TIA
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Mon Jun 04, 2012 4:43 am    Post subject: Reply with quote

Well. I tried that, re-emerging libSM and libICE after emerging
the qt-4.8.1 libraries, then re-emerging smplayer, it still
segfaulted. I guess we will need the actual backtrace
to track down the problem.
_________________
TIA
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Wed Jun 06, 2012 2:45 pm    Post subject: Reply with quote

So, a couple of things: I doubt that the upgrade to xfce-4.10 is related.
That has its own minor issues, but internal qt problems are not among
them.

From an strace, it accesses /etc/passwd right before the crash,
probably looking for the home directory of the current uid or
euid. That could be anything, looking for a config file, a logfile,
an icon, a fifo, something that a subdirectory of /home/$USER/ is
one standard option for the location of.

It crashes in sm_performSaveYourself(), but the data used by
that function is somewhere upstream in the backtrace, in
internal qt functions related to event notification (or maybe
way before that; those functions could simply be using
some object that is setup incorrectly early on in the program's
execution). The qt libs are complex, and there are numerous
gotchas.

But all indications (where it works elsewhere and what all else
works with the current code) are that one of our qt-4.8.1
patches has its own bug, even if we do not know which one yet.

Note that this crash happens with smplayer started with no
arguments.
_________________
TIA
Back to top
View user's profile Send private message
yngwin
Developer
Developer


Joined: 19 Dec 2002
Posts: 4394
Location: Suzhou, China

PostPosted: Thu Jun 07, 2012 8:49 am    Post subject: Reply with quote

Did you recompile qt-core after upgrading dev-libs/icu?

I recommend you file a bug at bugs.gentoo.org with as much relevant information as you can.

You could also try with Qt 4.8.2
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Fri Jun 08, 2012 11:10 pm    Post subject: Reply with quote

So I did that, emerged qt-4.8.2 from testing, relinked smplayer to it,
and the results were interesting. It still segfaulted at startup. (I did
not backtrace it to see if it segfaulted in the same function, but it
seems likely).

So apparently the Gentoo patches in the -r? versions of the qt-4.8.1
libraries are not responsible for the smplayer crash, since qt-4.8.2 has
no patches applied during the emerge (unless the changes from those
patches have been incorporated into the qt libraries upstream between
qt-4.8.1 and qt-4.8.2).

("Huh.")

I have not re-emerged quazip, because even though it is a dependency
of the qt libraries, I cannot see how it relates. I have the latest stable
version installed, if I re-emerge it I will end up with the same quazip
that I have now (plus splitdebug information).

(qt does some fairly wierd things. In the beginning of the build, it tests
for various cpu features, like sse, mmx, etc. The tests for sse3, ssse3,
sse4.1, sse4.2, and avx all pass on an AMD Athlon X2, which has none
of those in its instruction set. I do not think that is related to the smplayer
problem, and it must have runtime tests that override those build time
configuration flags, but it looks very odd in a build log.)
_________________
TIA
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Tue Jun 12, 2012 7:03 am    Post subject: Reply with quote

Still think I should bugzilla this?

I upgraded to qt-*-4.8.2, smplayer (-0.8.0, -0.7.1) still has the same bug
in the same function/method/callback.

smplayer-0.8.0 with qt-*-4.8.2 backtrace:
http://pastebin.ca/2160390

emerge --info:
http://pastebin.ca/2160396

Other platforms: no sound chips on other platforms,
so no way to test.
_________________
TIA
Back to top
View user's profile Send private message
mir3x
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jun 2012
Posts: 123

PostPosted: Tue Jun 12, 2012 7:47 am    Post subject: Reply with quote

wcg, can you check if you haven't downgraded glib lately ? ( eg by running qlop -lu | grep glib )
( I'm asking cause my autocomplete dissapeared somehow in kdevelop, then I noticed that glib was downgraded in that time, rebuilding it to masked version again solved issue )
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Tue Jun 12, 2012 6:33 pm    Post subject: Reply with quote

"emerge --info glib" says "dev-libs/glib-2.30.3", stable on amd64.
I have not had any of the glib-2.32.* versions installed. (I like to
stay with stable for most things, unless the stable version does not
actually work on my system. I usually run testing versions of
glibc, build tools like flex and bison that have good test suites,
and a few other odds and ends.)

I will keep the testing versions of glib in mind to try, though.

It's not a showstopper, because smplayer still works fine for
me with qt-{core,dbus,script,gui}-4.7.4[-r?], and that is the
only application that I have installed that uses the qt libraries.

Fixing it would reduce the "emerge -DuNp world" noise from
new qt "stable" versions, though.
_________________
TIA
Back to top
View user's profile Send private message
handsoul
n00b
n00b


Joined: 20 Mar 2012
Posts: 10
Location: Xi'an

PostPosted: Wed Jun 13, 2012 8:32 am    Post subject: Reply with quote

I'v got a similar problem.smplayer on my 64-bit gentoo box. Smplayer gave a segmentation fault message ,but mplayer could work fine. Then I launched smplayer in gdb,and bt command showed some library files belonging to qt-core . I tried to execute revdep-rebuild but unfortunately nothing changed. Then I simply emerged qt-core & smplayer again and it worked fine again.Hope that helps. ( Is ' just emerge it again' a way so solve all problems like this.. :? )
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Fri Jun 15, 2012 6:02 am    Post subject: Reply with quote

Quote:
Is ' just emerge it again' a way so solve all problems like this.


It sounds kind of Windows-like (where the results of an install may be
indeterminate for some reason, depending on what else is installed,
what is happening at the same tiime, etc). On linux, one sees that with
linker commands sometimes, where the linker needs to link library a,
then library b, then library c, then library a *again* before it will link
an executable correctly. It would be fairly strange to have that kind
of sequence required with emerges, but I guess it is not beyond
the realm of possibility.
_________________
TIA
Back to top
View user's profile Send private message
mir3x
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jun 2012
Posts: 123

PostPosted: Sun Jul 08, 2012 1:47 am    Post subject: Reply with quote

I've run in the same problem after upgrading to 4.8.2
I've installed only those packets:

Sun Jul 8 01:28:56 2012 >>> x11-libs/qt-core-4.8.2
Sun Jul 8 01:31:38 2012 >>> x11-libs/qt-script-4.8.2
Sun Jul 8 01:32:45 2012 >>> x11-libs/qt-dbus-4.8.2
Sun Jul 8 01:35:53 2012 >>> x11-libs/qt-sql-4.8.2
Sun Jul 8 01:39:48 2012 <<< media-video/mplayer-1.0_rc4_p20110322-r1
Sun Jul 8 01:39:50 2012 >>> media-video/mplayer-1.0_rc4_p20110322-r1
Sun Jul 8 01:58:48 2012 >>> x11-libs/qt-gui-4.8.2
Sun Jul 8 02:03:58 2012 >>> x11-libs/qt-qt3support-4.8.2
Sun Jul 8 02:06:02 2012 <<< media-video/smplayer-0.8.0
Sun Jul 8 02:06:04 2012 >>> media-video/smplayer-0.8.0

then smplayer crashed
then reemerging libSM libICE qtcore and smplayer fixed crash
my uses flags
libSM -> ipv6 uuid -doc -static-libs
libICE -> ipv6 -doc -static-libs
qtcore -> exceptions glib iconv optimized-qmake qt3support ssl -aqua -c++0x -debug -icu -pch -qpa
qt-script -> exceptions iconv -aqua -c++0x -debug -jit -pch -qpa
qt-dbus -> exceptions -aqua -c++0x -debug -pch -qpa
qt-sql -> exceptions mysql qt3support sqlite -aqua -c++0x -debug -firebird -freetds -oci8 -odbc -pch -postgres -qpa

maybe those use flags will help to check which one make trouble? ( or lack one, I see that wcg doesnt have +exception in make.conf, maybe there is issue ? )
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Sun Jul 08, 2012 8:10 am    Post subject: Reply with quote

Quote:
maybe those use flags will help to check which one make trouble?
( or lack one, I see that wcg doesnt have +exception in make.conf, maybe
there is issue ? )


Worth a try. It may take me a few days to work through those options.
Thanks for the tip.
_________________
TIA
Back to top
View user's profile Send private message
yngwin
Developer
Developer


Joined: 19 Dec 2002
Posts: 4394
Location: Suzhou, China

PostPosted: Sun Jul 08, 2012 2:16 pm    Post subject: Reply with quote

As I said before, if you want support from our developers, you should really file a bug.
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Tue Jul 10, 2012 1:31 pm    Post subject: Reply with quote

As far as reporting it on bugzilla, I use smplayer almost exclusively
for audio, playing .mp3 streams and audio cds. I find its software
equalizer useful. Playing an occasional YouTube video that Firefox
balks at is a bonus, but the audio support in smplayer is more
useful to me.

But I dislike having to load these massive qt C++ libraries to do it. It
seems absurd. (It reminds me of keeping 100gb of some Windows
version on disk for a firmware flash floppy, because the software to
perform the firmware upgrades requires Windows.) I prefer my
software more streamlined.

So I am conflicted about it. Letting the developers know about it
is the right thing to do, but I only use it all because so far it has
been less crash-prone than other software to do the same job
on a Gentoo system with audio hardware. I would drop it in a heartbeat
if something less resource-intensive worked as well and forget I even
knew qt existed. (Debugging uses of qt seems like volunteering
to help debug Windows, ie not a reasonable use of my time.)

But thanks for the help anyway.
_________________
TIA
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Sun Jul 15, 2012 9:17 am    Post subject: Reply with quote

Quote:

then reemerging libSM libICE qtcore and smplayer fixed crash
my uses flags
libSM -> ipv6 uuid -doc -static-libs
libICE -> ipv6 -doc -static-libs
qtcore -> exceptions glib iconv optimized-qmake qt3support ssl -aqua -c++0x -debug -icu -pch -qpa
qt-script -> exceptions iconv -aqua -c++0x -debug -jit -pch -qpa
qt-dbus -> exceptions -aqua -c++0x -debug -pch -qpa
qt-sql -> exceptions mysql qt3support sqlite -aqua -c++0x -debug -firebird -freetds -oci8 -odbc -pch -postgres -qpa


After a few iterations, that worked. USE=exceptions alone did not do it,
USE=optimized-qmake did not do it. What finally made the difference
was re-emerging libSM and libICE with USE=ipv6. I have no idea why
that works (I am not using IPv6), but after that change and re-emerging
qt-core-4.8.2 and smplayer-0.8.0, smplayer no longer segfaults.

I did need to re-emerge quazip, too, after updating to qt-4.8.2, according
to "emerge -Dp quazip", but that did not prevent smplayer from segfaulting
at startup.

(Not using qt3support for anything and qt-sql is not installed, so those did
not matter.)

Thanks.:-)

edit:
Actually it was libICE alone that made the difference. The libSM-1.2.1 build
log shows that it is still compiling with "--disable-ipv6" in the configure options,
even with "x11-libs/libSM ipv6" in /etc/portage/package.use/x11-libs.
The libICE-1.0.8 emerge log, however, has "--enable-ipv6" in the configure
options with that USE flag. After re-emerging libICE, qt-core-4.8.2, and
smplayer-0.8.0, smplayer no longer segfaults when it starts up.
_________________
TIA
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum