Patch for crash with message "can't create MCOP directory"

Bug #55973 reported by Mark Doliner
30
Affects Status Importance Assigned to Milestone
arts
Unknown
High
arts (Ubuntu)
Medium
Unassigned
Dapper
Medium
Unassigned
Edgy
Medium
Unassigned
mpg321 (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: arts

Hi! I'm a developer of Gaim. Earlier today someone complained that they're getting a crash when Gaim tries to play an audio file using libao, which uses arts. The message "can't create MCOP directory" is printed to the console.

I believe this is a bug in arts. It is documented in Red Hat bug #169631: http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169631 That bug resulted in a patch being applied to Red Hat's arts RPMs. I believe the patch fixes the bug for all Red Hat and Fedora users. I don't know if I'll be able to attach the patch as a file, so I'll paste it below.

Forgive me if this has already been reported or fixed. I saw some similar bugs in launchpad (31699, 33903, 39182, 42169), but they all seem to attribute the problem to something other than arts. And I would have checked if you already have the patch applied, but I've been unable to find where you guys keep your package files.

Red Hat applies this patch to arts 1.5.3. I suspect it is needed for 1.5.0 and higher. I do not know if there is a more recent release of arts, or if the bug is fixed in arts upstream.

--- arts-1.5.0/mcop/mcoputils.cc.orig 2005-12-19 20:19:50.000000000 +0100
+++ arts-1.5.0/mcop/mcoputils.cc 2005-12-19 20:18:18.000000000 +0100
@@ -46,7 +46,13 @@
   result = lstat(tmp_dir, &stat_buf);
   if ((result == -1) && (errno == ENOENT))
   {
- return 1;
+ result = mkdir(tmp_dir, 0700);
+ if (result == -1)
+ {
+ arts_warning("Error: Can not create directory \"%s\".\n", tmp_dir);
+ return 1;
+ }
+ result = stat(tmp_dir, &stat_buf);
   }
   if ((result == -1) || (!S_ISDIR(stat_buf.st_mode)))
   {

Revision history for this message
Mark Doliner (thekingant) wrote :
Revision history for this message
Florian Boucault (fboucault) wrote :

Definitely happening (see KDE and RedHat bugtrackers)

Changed in arts:
status: Unconfirmed → Confirmed
Changed in arts:
status: Unknown → Confirmed
Revision history for this message
Scott Ritchie (scottritchie) wrote :

This patch needs to go in, and it needs to be backported to Dapper and Edgy to resolve several application crashing issues.

It is responsible for Wine crashing when clicking the audio tab, and is responsible for Launchpad bug 42169:
https://launchpad.net/distros/ubuntu/+source/wine/+bug/42169
http://bugs.winehq.org/show_bug.cgi?id=4051

Changed in arts:
status: Unconfirmed → Confirmed
status: Unconfirmed → Confirmed
importance: Undecided → Medium
importance: Undecided → Medium
importance: Undecided → Medium
Revision history for this message
Fabien Lusseau (fabien-beosfrance) wrote :

Please correct this bug, that appear in Gutsy too !

Revision history for this message
Kevin Williams (bthylafh) wrote :

I'm having the same problem in Gutsy, and it affects ogg123 and mpg321 as well.

The message I get:

$ ogg123 <song>
Link points to "/tmp/ksocket-ktw"
can't create mcop directory

Revision history for this message
Fabien Lusseau (fabien-beosfrance) wrote :

Please fix it for Gutsy !!!

Revision history for this message
Tom (1981neo) wrote :

Same here on Gutsy with all available patches applied. It's a very annoying bug that unexperienced people don't get handled! So I'd suggest that we try to fix this as fast as possible (I'm using ogg123)
Greetings Tom

Revision history for this message
Kazik (kkazmierczyk) wrote :

The same bug with d4x

Revision history for this message
Malaise (malaise) wrote :

For the problem with mpg321 <file> failing with
Creating link /home/<user>/.kde/socket-<hostname>.
can't create mcop directory

The solution or workaround is mkdir -p $HOME/.kde/socket-$HOSTNAME.

Revision history for this message
Alex Mauer (hawke) wrote :

Is this a bug in arts or in the packages that use arts? Or in libao?

The applications shouldn't be crashing because they can't play a sound, and the ones that are dedicated to playing sounds, such as ogg123 and mpg321 should use some other method.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package arts - 1.5.9-0ubuntu2

---------------
arts (1.5.9-0ubuntu2) hardy; urgency=low

  * Patch to fix the issue reported in RedHat bugzilla bug #169631 to create
    a temp dir if it doesn't exist. (LP: #55973)

 -- Luke Yelavich <email address hidden> Wed, 12 Mar 2008 21:11:56 +1100

Changed in arts:
status: Confirmed → Fix Released
Revision history for this message
Brandon Koch (bkoch-seanet) wrote :

I am getting this message when I install arts in Ubuntu Gutsy even after doing The solution or workaround is mkdir -p $HOME/.kde/socket-$HOSTNAME.

>:~$ sudo artsd &
[1] 8101
>:~$ Creating link /root/.kde/socket-mtbaker.
  can't create mcop directory
Just would like to let it be known it still occurs

Revision history for this message
Terence Simpson (tsimpson) wrote :

artsd is not supposed to be ran as root, but as your normal user account

Revision history for this message
Hew (hew) wrote :

Ubuntu Edgy Eft is no longer supported, so a SRU will not be issued for this release. Marking Edgy as Won't Fix.

Changed in arts:
status: Confirmed → Won't Fix
Changed in arts:
status: Confirmed → Won't Fix
Changed in arts:
status: Won't Fix → Invalid
Daniel T Chen (crimsun)
Changed in mpg321:
status: New → Invalid
Changed in arts:
status: Invalid → Unknown
Changed in arts:
importance: Unknown → High
Rolf Leggewie (r0lf)
Changed in arts (Ubuntu Dapper):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.