From patchwork Tue Nov 1 18:29:28 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joachim Wilke X-Patchwork-Id: 12076 Received: from nproxy.gmail.com ([64.233.182.198]) by www.linuxtv.org with esmtp (Exim 4.50) id 1EX0uY-0004SH-0D for vdr@linuxtv.org; Tue, 01 Nov 2005 19:31:06 +0100 Received: by nproxy.gmail.com with SMTP id x29so380806nfb for ; Tue, 01 Nov 2005 10:29:29 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=TDRGGubcGDvgspibmjJvDU1/MDOW4tzMwN5vWubDeiDLZr+E8xtPab/jmS8xchGAtBuiVAdoq3BWTwYE7W881EFqv5cu7LOEtyFagnp6wHAw7MKCqMshd1IWYUNyZTyPBVzP9zBRMHRBVSz6DHr2NM7G2bvM0CGUkqKQ5Kkj3Bo= Received: by 10.49.1.16 with SMTP id d16mr200324nfi; Tue, 01 Nov 2005 10:29:28 -0800 (PST) Received: by 10.48.30.14 with HTTP; Tue, 1 Nov 2005 10:29:28 -0800 (PST) Message-ID: <2a954dbc0511011029y7b5f7c08m@mail.gmail.com> Date: Tue, 1 Nov 2005 19:29:28 +0100 From: Joachim Wilke To: Klaus Schmidinger's VDR MIME-Version: 1.0 Content-Disposition: inline Subject: [vdr] vdr 1.3.35 crashing when leaving a recording at the end X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 18:31:06 -0000 Status: O X-Status: X-Keywords: X-UID: 5771 Hi everyone, i have experienced some strange behaviour of my plain vanilla vdr. When vdr reaches the end of a replay it segfaults. Core file analysis showed the following backtrace: #0 cUnbufferedFile::Seek(long, int) (this=0x0, Offset=0, Whence=0) at tools.c:884 #1 0x080dab2c in cFileName::SetOffset(int, int) (this=0xb56a1540, Number=3, Offset=0) at recording.c:1345 #2 0x080dac5d in cFileName::NextFile() (this=0x0) at recording.c:1358 #3 0x0809d8e1 in cDvbPlayer::NextFile(unsigned char, int) (this=0xb56a1540, FileNumber=64 '@', FileOffset=0) at dvbplayer.c:306 #4 0x0809db67 in cDvbPlayer::Action() (this=0x3) at thread.h:94 #5 0x080fce56 in cThread::StartThread(cThread*) (Thread=0x3) at thread.c:234 #6 0xb7fbab63 in start_thread () from /lib/tls/libpthread.so.0 It seems that vdr tries to access a reference to an cUbufferedFile object in cFileName::SetOffset which is a null pointer. The following quick and dirty hack solved the crash, but as I don't know this code deep enough it may have other side effects. } Regards, Joachim. --- recording.c.sav Mon Oct 31 13:27:58 2005 +++ recording.c Tue Nov 1 19:20:27 2005 @@ -1342,7 +1342,7 @@ cUnbufferedFile *cFileName::SetOffset(in // found a non existing file suffix } if (Open() >= 0) { - if (!record && Offset >= 0 && file->Seek(Offset, SEEK_SET) != Offset) { + if (!record && Offset >= 0 && file && file->Seek(Offset, SEEK_SET) != Offset) { LOG_ERROR_STR(fileName); return NULL;