Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 59746 - Kaffeine 0.5_rc2 won't start with xorg-x11: problem with XInitThreads
Summary: Kaffeine 0.5_rc2 won't start with xorg-x11: problem with XInitThreads
Status: RESOLVED DUPLICATE of bug 64929
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-07 21:00 UTC by Patrick Dawson (RETIRED)
Modified: 2005-07-17 13:06 UTC (History)
2 users (show)

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


Attachments
This patch comments out the line with XInitThreads(); which makes the app skip the thread initialization. (kaffeine-0.51_rc1-xinitthreads-main_cpp.diff,381 bytes, patch)
2004-10-05 10:29 UTC, Nick Demchenko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Dawson (RETIRED) gentoo-dev 2004-08-07 21:00:07 UTC
About 80% of the time, when I try to start Kaffeine, it just freezes, not displaying a GUI or anything. A little poking around showed that it's stuck in the KUniqueApplication constructor. A backtrace revealed that it's waiting for a mutex lock.
The source of this problem is explained in kaffeine/main.cpp: the XInitThreads() function call. Commenting this out allows Kaffeine to start, but then it always crashes on exit. The comments suggest that this is a bug in X:
"XInitThreads() should always be the first call in multithreaded X programs -
but because of a bug in older xfree versions that can freeze at startup -
for this versions we call XInitThreads() in videowindow.cpp.
This should finaly fix the crash on closing with xfree 4.4."

So what's the solution here? I'm not sure. It seems XFree 4.4 has a bug fix that xorg-x11-6.7.0-r2 does not.

Reproducible: Sometimes
Steps to Reproduce:
1. Start up xorg-x11
2. Try to run kaffeine
3. It usually won't run






(gdb) bt
#0  0xffffe410 in ?? ()
#1  0xbfffdb88 in ?? ()
#2  0x00000002 in ?? ()
#3  0x00000000 in ?? ()
#4  0x43ded90e in __lll_mutex_lock_wait () from /lib/libpthread.so.0
#5  0x43deab49 in _L_mutex_lock_24 () from /lib/libpthread.so.0
#6  0x4349fe70 in _dl_runtime_resolve () from /lib/ld-linux.so.2
#7  0x43dd1084 in __JCR_LIST__ () from /usr/X11R6/lib/libX11.so.6
#8  0x080d9f38 in ?? ()
#9  0xbfffde20 in ?? ()
#10 0xbfffdeb8 in ?? ()
#11 0x43d5e6d3 in _XLockDisplay () from /usr/X11R6/lib/libX11.so.6
#12 0x080da5a0 in ?? ()
#13 0x43fec538 in __JCR_LIST__ () from /usr/X11R6/lib/libXi.so.6
#14 0x081c73c8 in ?? ()
#15 0x43fe9556 in XListInputDevices () from /usr/X11R6/lib/libXi.so.6
Comment 1 Patrick Dawson (RETIRED) gentoo-dev 2004-08-07 21:17:34 UTC
I should note that downgrading to 0.4.2 produces the same result as commenting out XInitThreads: Kaffeine starts, but crashes when you close it.
Comment 2 Patrick Dawson (RETIRED) gentoo-dev 2004-08-19 14:52:11 UTC
Same problem exists in xorg-x11-6.7.99.2.
Comment 3 Nicolas Laplante 2004-09-09 18:54:52 UTC
And same too in xorg-x11-6.7.99.904
Comment 4 Patrick Dawson (RETIRED) gentoo-dev 2004-09-10 12:00:21 UTC
And 6.8.0. I suspect it is a bug in Kaffeine, but again, I just don't know enough to fix it.
Comment 5 Carsten Lohrke (RETIRED) gentoo-dev 2004-09-10 12:28:52 UTC
fyi: kaffeine runs fine here with xorg-x11-6.7.0-r1
Comment 6 Gregorio Guidi (RETIRED) gentoo-dev 2004-09-11 14:09:36 UTC
Now that the bug is quite understood, I think the only thing to do is
sending a mail to the author and see what he decides...
Comment 7 Patrick Dawson (RETIRED) gentoo-dev 2004-10-03 14:30:47 UTC
This appears to be fixed in 0.5_rc1.
Comment 8 Nick Demchenko 2004-10-05 10:29:29 UTC
Created attachment 41156 [details, diff]
This patch comments out the line with XInitThreads(); which makes the app skip the thread initialization.

I've got this issue still occuring. Very odd, because Kaffeine does start but
only occasionaly.

Well anyway, according to the author, XInitThreads(); on line 68 of
./kaffeine/main.cpp has to be commented out or removed, basically.

Well, I tried it out and it has worked. And here's a little patch.
Comment 9 Patrick Dawson (RETIRED) gentoo-dev 2004-11-09 06:35:12 UTC
Yeah, this problem still exists in 0.5_rc*. If it's in the final release too, I'll see about adding a patch.
Comment 10 Donnie Berkholz (RETIRED) gentoo-dev 2004-11-09 08:20:19 UTC
This sounds related to bug #64929 and maybe should have a fix on the X side, not the kaffeine side.
Comment 11 Patrick Dawson (RETIRED) gentoo-dev 2004-11-09 11:27:19 UTC
Yes it does. Looks like I'll just close this again after the next X.org release.
Comment 12 Donnie Berkholz (RETIRED) gentoo-dev 2004-11-23 18:12:11 UTC
Please reopen if 6.8.0-r2/-r4 doesn't fix it. Note, this is _not_ fixed in -r3.

*** This bug has been marked as a duplicate of 64929 ***