From patchwork Sat Jul 28 13:20:13 2007 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 12494 Received: from raven.cadsoft.de ([217.7.101.211]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1IEmDP-0006yc-Fk for vdr@linuxtv.org; Sat, 28 Jul 2007 15:20:15 +0200 Received: from [192.168.100.10] (hawk.cadsoft.de [192.168.100.10]) by raven.cadsoft.de (8.13.3/8.13.3) with ESMTP id l6SDKEw9029732 for ; Sat, 28 Jul 2007 15:20:14 +0200 Message-ID: <46AB428D.2080004@cadsoft.de> Date: Sat, 28 Jul 2007 15:20:13 +0200 From: Klaus Schmidinger Organization: CadSoft Computer GmbH User-Agent: Thunderbird 1.5.0.12 (X11/20060911) MIME-Version: 1.0 To: vdr@linuxtv.org References: <20070723162023.04195105@cp771133> <20070724130906.0c1e4129@highlander.home.lan> In-Reply-To: <20070724130906.0c1e4129@highlander.home.lan> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (raven.cadsoft.de [192.168.1.1]); Sat, 28 Jul 2007 15:20:14 +0200 (CEST) Subject: Re: [vdr] vdr-1.5.6 crashing (workaround) X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jul 2007 13:20:15 -0000 Status: O X-Status: X-Keywords: X-UID: 13600 On 07/24/07 13:09, Malte Schröder wrote: > On Mon, 23 Jul 2007 16:20:23 +0200 > Malte Schröder wrote: > >> Hello, >> when I switch for example to sunshine live 1.5.6 crashes. Plugins loaded >> are remote, skinenigmang and epgsearch. > > This prevents vdr from crashing. But I don't understand how channel > can be a null-pointer in that code-path. It is only set at the start of > the method and then checked if it is a null-pointer. Okay, it is > being re-set a few lines before, but that is in the true part of the > condition. > > --- vdr-1.5.6/eit.c 2007-07-21 16:58:04.000000000 +0200 > +++ vdr-1.5.6.prod/eit.c 2007-07-24 12:06:46.000000000 +0200 > @@ -209,7 +209,7 @@ > LinkChannels->Add(new cLinkChannel(link)); > } > } > - else > + else if(channel) > channel->SetPortalName(linkName); > } > } > @@ -256,7 +256,7 @@ > > if (!HasExternalData) > pEvent->FixEpgBugs(); > - if (LinkChannels) > + if (LinkChannels && channel) > channel->SetLinkChannels(LinkChannels); > Modified = true; > } I believe the actual problem was introduced by myself. I wanted to simplify the original patch to have only a single call to Channels.NewChannel(), and in doing so wrote channel = ... instead of transponder = ... Please try the attached patch. Klaus --- eit.c 2007/07/21 14:58:04 1.124 +++ eit.c 2007/07/28 13:16:43 @@ -199,7 +199,7 @@ else if (Setup.UpdateChannels >= 4) { cChannel *transponder = channel; if (channel->Tid() != ld->getTransportStreamId()) - channel = Channels.GetByTransponderID(linkID); + transponder = Channels.GetByTransponderID(linkID); link = Channels.NewChannel(transponder, linkName, "", "", ld->getOriginalNetworkId(), ld->getTransportStreamId(), ld->getServiceId()); //XXX patFilter->Trigger(); }