SIGPIPE in Enlightenment/esdlib playing sound on Solaris



This is so funny it hurts - look where this SIGPIPE is coming from, especially 
the comment above the crash point... ;O)  Not funny disrespectful, just funny ha 
ha =O)

Program received signal SIGPIPE, Broken pipe.
0xfee966f8 in _write ()
(gdb) where
#0  0xfee966f8 in _write ()
#1  0xff322cec in esd_sample_cache (esd=8, format=4113, rate=18114, size=4504, 
name=0x51058 "\201รเ\b\001") at esdlib.c:856
#2  0x6fbe0 in SoundPlay (s=0x2328c8) at sound.c:105
#3  0x6fd2c in ApplySclass (sclass=0x17f258) at sound.c:161
#4  0x47468 in HButtonRelease (ev=0xffbedfe8) at events.c:373
#5  0x47044 in HandleEvent (ev=0xffbedfe8) at events.c:212
#6  0x471cc in WaitEvent () at events.c:281
#7  0x5bb6c in main (argc=-4267840, argv=0xffbef134) at main.c:270
(gdb) up
#1  0xff322cec in esd_sample_cache (esd=8, format=4113, rate=18114, size=4504, 
name=0x51058 "\201รเ\b\001") at esdlib.c:856
(gdb) 

  /* this is unavoidable - incase ESD "dissapears" (ie the socket conn dies) */
  /* we need to catch SIGPIPE to avoid the default handler form giving us */
  /* a bad day - ignore the SIGPIPE, then make sure to cathc all errors */
      phandler = signal( SIGPIPE, dummy_signal );    /* for closed esd conns */
      /* send the necessary information */
>>    if ( write( esd, &proto, sizeof(proto) ) != sizeof(proto) ) {
        signal( SIGPIPE, phandler ); 
        return -1;
      }
      
The above is the bt if sound is turned on after E has started.  If sound is on 
in controls.cfg, the we get this:

Program received signal SIGPIPE, Broken pipe.
0xfee966f8 in _write ()
(gdb) where
#0  0xfee966f8 in _write ()
#1  0xff322cec in esd_sample_cache (esd=8, format=4113, rate=11025, size=14564, 
name=0x51058 "\201รเ\b\001") at esdlib.c:856
#2  0x6fbe0 in SoundPlay (s=0x2605e8) at sound.c:105
#3  0x6fd2c in ApplySclass (sclass=0x17f450) at sound.c:161
#4  0x27f20 in SlideEwinTo (ewin=0x251648, fx=1152, fy=-237, tx=301, ty=253, 
speed=6000) at borders.c:151
#5  0x28ce0 in AddToFamily (win=0) at borders.c:529
#6  0x6b200 in MapUnmap (start=4) at setup.c:64
#7  0x5ba10 in main (argc=1, argv=0xffbef134) at main.c:221
(gdb) up
#1  0xff322cec in esd_sample_cache (esd=8, format=4113, rate=11025, size=14564, 
name=0x51058 "\201รเ\b\001") at esdlib.c:856

Different sound file, same exact crash location =OZ

Contrary to what I said last night (just before I went home) it makes no odds 
either way whether esd is started with -tcp or not, and the flag is obviously 
working because /tmp/.esd/socket doesn't exist when it's run with -tcp, and it 
does otherwise (see, I *can* read code ;O).

On the other hand, I don't think it always actually uses the unix socket, does 
it?  Look at this:

int esd_open_sound( const char *host )
{
  int connect_count = 0;
  int socket_out = -1;
  char use_unix = 0;
  
  if (access("/tmp/.esd/socket", R_OK | W_OK) == -1)
    {
      if (errno == EACCES) 
	{
	  /* not allowed access - can't init unix socket comms - esd already */
	  /* there */
          socket_out = esd_connect_tcpip(host);
	}
      else if (errno == ENOENT)
	{
	  use_unix = 1;
	  /* does not exist - try tcp/ip */
	  socket_out = esd_connect_tcpip(host);	  
	}
    }
  else
    use_unix = 1;
    
----  So if the socket doesn't exist - use it?  Am I reading that right?  This 
should only matter if that initial connection attempt fails, but still...

One thing I just tried that made a difference...  If I start esd with -unix, not 
only did I get the /tmp/.esd/socket created.  I also got to hear 2 sounds 
(startup and click) before enlightenment died from SIGPIPE again =OZ  Well, the 
first time, anyway - doesn't appear to be repeatable =OZ

If anyone can pass on hints for this, I'd be very appreciative =O)  I'm going to 
do some source editing now and see if I can improve anything.  *something* is 
causing SIGPIPEs at different times.  The fact I just got Enlightenment to play 
some sounds before it failed makes it look a lot more similar to the problems 
I'm having with Gnome, too =OZ

Ta,

-------My opinion - Not sane, intelligent or necessarily useful-------
o o                                      mailto:Moredhel@earthling.net 
/v\ark R. Bowyer.  http://i.am/Moredhel  mailto:Mark.Bowyer@UK.Sun.COM
`-'  "That weenie's avoiding me!" - Scott McNealy about i.am/BillZebub



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]