Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ezStream Segmentation Fault ...

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients
View previous topic :: View next topic  
Author Message
MaxEL
Guest





PostPosted: Thu Sep 15, 2005 10:52 am    Post subject: ezStream Segmentation Fault ... Reply with quote

I had a problem with ezStream on some mp3's when i used playlist (m3u).
My system is powered by Fedora Core 3 (Kernel 2.6.11.7). The ezStream were stops with Segmentation Fault error. If i used the same "bad" mp3 file directly (without playlist).

I didn't wrote on C about 7 years, but i have wrote a little patch. May be it could useful for someone:
Code:

--- ezstream.c.orig     2005-01-05 02:49:25.000000000 +0200
+++ ezstream.c.patched  2005-09-15 13:21:47.000000000 +0300
@@ -403,8 +403,10 @@
        char    streamFileName[8096] = "";
        char    lastStreamFileName[8096] = "";
        int             loop = 1;
-    int     ret = 1;
-
+
+       char  * streamFileNameB;
+       streamFileNameB = (char*) malloc (8096);
+
        filep = fopen(fileName, "r");
        if (filep == 0) {
                printf("Cannot open %s\n", fileName);
@@ -419,8 +421,9 @@
                                memset(lastStreamFileName, '\000', sizeof(lastStreamFileName));
                                strcpy(lastStreamFileName, streamFileName);
                                /* Skip entries that begin with a # */
+                                memcpy(streamFileNameB, streamFileName, sizeof(streamFileName));
                                if (strncmp(streamFileName, "#", 1)) {
-                                       streamFile(shout, streamFileName);
+                                       streamFile(shout, streamFileNameB);
                                }
                        }
                        if (rereadPlaylist) {
@@ -458,6 +461,7 @@
                }
                rewind(filep);
        }
+        free(streamFileNameB);
        return(1);
}
Back to top
Guest






PostPosted: Mon Nov 21, 2005 5:19 pm    Post subject: Reply with quote

Hi! What version is this? And how am I supposed to use your patch? I am having the same problem - when I use playlist sometimes ezstream crashes with "Segmentation Fault". I am not sure even if it is ezstream fault ot something else (lame maybe??)

Sould you send me this patched file for test please?
Back to top
Guest






PostPosted: Mon Nov 21, 2005 5:34 pm    Post subject: Reply with quote

sorry send me your answer to gogo(at)bas-bg(dot)com

Thanks a lot in advance!!
Back to top
Koko
Guest





PostPosted: Tue Dec 06, 2005 2:03 pm    Post subject: Reply with quote

I have the same problem, and this patch didnt help. Sad

ezstream quits with segmentation fault at random points. sometimes its in 3 minutes, sometimes its after an hour.

anyone has any ideas?
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Dec 06, 2005 2:17 pm    Post subject: Reply with quote

for segv cases, the best thing to do initially is to build ezstream with debugging eg make debug The usual cause is down to an mp3 processing with a bad file but other elements could be an issue either like libshout. If you have an easily repeatable case then by all means let us know.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Koko
Guest





PostPosted: Tue Dec 06, 2005 2:50 pm    Post subject: Reply with quote

ok, we did a rebuild with the debug option. the ezstream executable is a few kbytes smaller now, is that ok? i started the streaming, i will let you know what happens. (btw im only repeating 2 mp3s in a playlist, converting them to vorbis on the fly. we already upgraded/rebuilt all the libs)
Back to top
Koko
Guest





PostPosted: Tue Dec 06, 2005 4:37 pm    Post subject: Reply with quote

----------------------------
Streaming /data/radio/6.mp3
Opening file (/data/radio/6.mp3)
Songinfo is (Norman Feller - Horizontal Departureq)
Going to execute (madplay -v -o raw:- "/data/radio/6.mp3" | oggenc -Q -r -q 2 --resample=44100 -t "Norman Feller - Horizontal Departureq" -c STREAMER=ezstream -)
MPEG Audio Decoder 0.14.2 (beta) - Copyright (C) 2000-2001 Robert Leslie
Title: Horizontal Departure
Artist: Norman Feller
Genre: Ambient
Segmentation faultI, 192 kbps, 44100 Hz, stereo, no CRC
koko@eserv:~/bin$
----------------------------
same error, after like 1 hour, continiously repeating the same 2 mp3s for 6-7 times.
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Dec 06, 2005 6:34 pm    Post subject: Reply with quote

email the stack trace
gdb ezstream corefile
bt

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Tue Feb 14, 2006 2:15 pm    Post subject: Reply with quote

Has anyone solved this problem? I am also having it.
Back to top
Anonymous
Guest





PostPosted: Tue Feb 14, 2006 2:17 pm    Post subject: Reply with quote

Disregard last .. sorry, posted to the wrong thread..
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients All times are GMT
Page 1 of 1

 
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


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber