NetBSD Problem Report #18964

Received: (qmail 15242 invoked by uid 605); 7 Nov 2002 19:37:31 -0000
Message-Id: <20021107193729.6F5E811124@narn.netbsd.org>
Date: Thu,  7 Nov 2002 11:37:29 -0800 (PST)
From: cliff@snipe444.org
Sender: gnats-bugs-owner@netbsd.org
Reply-To: cliff@snipe444.org
To: gnats-bugs@gnats.netbsd.org
Subject: SDL audio hangs parent thread when using esd
X-Send-Pr-Version: www-1.0

>Number:         18964
>Category:       pkg
>Synopsis:       SDL audio hangs parent thread when using esd
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 07 19:38:01 +0000 2002
>Closed-Date:    Wed Jan 22 11:00:05 +0000 2020
>Last-Modified:  Wed Jan 22 11:00:05 +0000 2020
>Originator:     Cliff Wright
>Release:        1.5.2
>Organization:
>Environment:
>Description:
When playing falcons-eye with esd audio enabled and linux_midi_player
option set for timidity in esd mode, the graphics hang. This is caused by a missing include of pthread.h in the SDL esd audio, allowing a threaded write to be used. Since this was added by NetBSD patches for the other audio modes, I thought it should be added
for esd as well. This makes the audio work for me, and with a patch I submitted to falcons-eye, I am able to play both background, and sound effects at the same time (and even desktop audio).
>How-To-Repeat:
As described above
>Fix:
Add following patch similar to 
pkgsrc/devel/SDL/patches/patch-al on file in directory
pkgsrc/devel/SDL/work/SDL-1.2.3/src/audio/esd

--- SDL_esdaudio.c.distrib      Thu Apr 26 09:50:17 2001
+++ SDL_esdaudio.c      Thu Nov  7 02:46:26 2002
@@ -35,6 +35,7 @@
 #include <errno.h>
 #include <signal.h>
 #include <unistd.h>
+#include <pthread.h>

 #include <esd.h>
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->jmmv 
Responsible-Changed-By: jmmv 
Responsible-Changed-When: Sat Jul 26 15:13:52 UTC 2003 
Responsible-Changed-Why:  
I'll handle this one. 
Responsible-Changed-From-To: jmmv->pkg-manager 
Responsible-Changed-By: jmmv 
Responsible-Changed-When: Tue Jan 20 08:33:26 UTC 2004 
Responsible-Changed-Why:  
I tried the attached fix and did not solve the problem.  Furthermore, I can't 
play with esound because it freezes my machine... 
State-Changed-From-To: open->feedback
State-Changed-By: joerg@netbsd.org
State-Changed-When: Sun, 24 Sep 2006 18:29:39 +0000
State-Changed-Why:
SDL was updated a number of time since the PR was submitted.
Is this issue still present?


From: Cliff Wright <cliff@snipe444.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/18964 (SDL audio hangs parent thread when using esd)
Date: Sun, 24 Sep 2006 19:56:58 -0700

 On Sun, 24 Sep 2006 18:29:40 +0000 (UTC)
 joerg@NetBSD.org wrote:

 > Synopsis: SDL audio hangs parent thread when using esd
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: joerg@netbsd.org
 > State-Changed-When: Sun, 24 Sep 2006 18:29:39 +0000
 > State-Changed-Why:
 > SDL was updated a number of time since the PR was submitted.
 > Is this issue still present?
 > 
 > 
 I don't have this at the moment, so will have to check.
 However this also required a change to falcons-eye that I only submitted
 to falcons-eye, not pkgsrc. I found this old patch which had few comments.
 I include this below.

 Return-Path: noreply@sourceforge.net
 Received: from localhost (localhost [::1])
 	by vixen.snipe444.org (8.11.3nb1/8.11.3) with ESMTP id gA7K4ET08592
 	for <cliff@localhost>; Thu, 7 Nov 2002 12:04:14 -0800 (PST)
 Received: from mail.snipe444.org [209.166.87.123]
 	by localhost with POP3 (fetchmail-5.8.1)
 	for cliff@localhost (single-drop); Thu, 07 Nov 2002 12:04:14 -0800 (PST)
 Received: from usw-sf-netmisc.sourceforge.net (usw-sf-sshgate.sourceforge.net [216.136.171.253])
 	by cncware.cncware.com (8.11.6/8.11.6) with ESMTP id gA7J8bG02977
 	for <cliff@snipe444.org>; Thu, 7 Nov 2002 11:08:38 -0800
 Received: from usw-sf-web2-b.sourceforge.net ([10.3.1.22] helo=usw-sf-web2.sourceforge.net)
 	by usw-sf-netmisc.sourceforge.net with esmtp (Exim 3.22 #1 (Debian))
 	id 189s18-0001MB-00; Thu, 07 Nov 2002 11:08:38 -0800
 Received: from nobody by usw-sf-web2.sourceforge.net with local (Exim 3.33 #1 (Debian))
 	id 189s18-0005l3-00; Thu, 07 Nov 2002 11:08:38 -0800
 To: noreply@sourceforge.net
 From: noreply@sourceforge.net
 Subject: [ falconseye-Bugs-635116 ] esd based player fix
 Message-Id: <E189s18-0005l3-00@usw-sf-web2.sourceforge.net>
 Date: Thu, 07 Nov 2002 11:08:38 -0800

 Bugs item #635116, was opened at 2002-11-07 11:06
 You can respond by visiting: 
 https://sourceforge.net/tracker/?func=detail&atid=396496&aid=635116&group_id=29569

 Category: None
 Group: None
 Status: Open
 Resolution: None
 Priority: 5
 Submitted By: Nobody/Anonymous (nobody)
 Assigned to: Nobody/Anonymous (nobody)
 Summary: esd based player fix

 Initial Comment:
 When playing background music using an esd(esound)
 based player
 (timidity in esd mode in my case) The graphics thread
 hangs.

 The following patch fixed this. Also a patch for SDL on
 NetBSD for esd fixed a problem of sound effects hanging
 the graphics. Now I have both background, and sound
 effects playing at the same time on NetBSD!

 --- jtp_sdl.c.orig      Mon Jul  2 07:05:50 2001
 +++ jtp_sdl.c   Thu Nov  7 10:53:52 2002
 @@ -713,6 +713,8 @@
    }
    else if (jtp_sdl_music_player_pid == 0) /* Child
 thread */
    {
 +    int i;
 +
      /* Process the player options */
      sprintf(tempbuffer, playerstring, musicfilename);
      /* Get the path to the binary */
 @@ -759,6 +761,7 @@
        */

        /* Execute the player command */
 +      for(i = 0; i < 20; i++) close(i);
        if (execv(player_name, player_args) == -1)
        {
          /* Log the error */

 ----------------------------------------------------------------------

 Comment By: Nobody/Anonymous (nobody)
 Date: 2002-11-07 11:08

 Message:
 Logged In: NO 

 e-mail of submitter is cliff@snipe444.org

 ----------------------------------------------------------------------

 You can respond by visiting: 
 https://sourceforge.net/tracker/?func=detail&atid=396496&aid=635116&group_id=29569

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/18964 (SDL audio hangs parent thread when using esd)
Date: Mon, 25 Sep 2006 15:03:17 +0200

 On Mon, Sep 25, 2006 at 03:00:04AM +0000, Cliff Wright wrote:
 >  @@ -759,6 +761,7 @@
 >         */
 >  
 >         /* Execute the player command */
 >  +      for(i = 0; i < 20; i++) close(i);
 >         if (execv(player_name, player_args) == -1)
 >         {
 >           /* Log the error */

 I guess one of the open descriptors it set back from non-blocking.
 The above is certainly not correct code (a program can somewhat expect
 0-2 to be valid decsriptors, but it hints to the real problem).

 Joerg

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 10 Apr 2008 04:26:58 +0000
State-Changed-Why:
feedback received, in 2006.


State-Changed-From-To: open->closed
State-Changed-By: nia@NetBSD.org
State-Changed-When: Wed, 22 Jan 2020 11:00:05 +0000
State-Changed-Why:
esd is no more




>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.