vdr-1.3.39 & crash bug in schedule

Message ID 43D4865B.8020400@cadsoft.de
State New
Headers

Commit Message

Klaus Schmidinger Jan. 23, 2006, 7:31 a.m. UTC
  Klaus Schmidinger wrote:
> Rolf Ahrenberg wrote:
> 
>> On Sat, 21 Jan 2006, Klaus Schmidinger wrote:
>>
>>> Since cEvent::FixEpgBugs() is called for all events that are
>>> broadcast, it now makes sure every event actually has a non-NULL
>>> title. The only loophole left is SVDRP's PUTE command, but the
>>
>>
>>
>> I'm not using any external EPG data and as I said in my earlier mail, 
>> the modification of FixEpgBugs() isn't enough and VDR 1.3.40 is 
>> crashing like before.
>>
>> Fortunately my patch mentioned in the first message of this thread 
>> works quite nicely also with VDR 1.3.40, so finnish users can also 
>> enjoy the EPG search feature.
> 
> 
> I'm afraid I don't see why it would still crash.
> You patched those places in menu.c where an event tile was
> dereferenced. Now the code
> 
>  if (!title) {
>      // we don't want any "(null)" titles
>      title = strcpyrealloc(title, tr("No title"));
>      EpgBugFixStat(12, ChannelID());
>      }
> 
> in cEvent::FixEpgBugs() makes sure that every event has a
> non-NULL title. So where exactly does it crash?

I think I know now why it still crashed on you: it's probably
because of old entries in your epg.data file.

The attached patch should fix this - and also makes sure
that any events added via PUTE have a title.

Klaus
  

Comments

Rolf Ahrenberg Jan. 23, 2006, 11:14 a.m. UTC | #1
On Mon, 23 Jan 2006, Klaus Schmidinger wrote:

> I think I know now why it still crashed on you: it's probably
> because of old entries in your epg.data file.
>
> The attached patch should fix this - and also makes sure
> that any events added via PUTE have a title.

Thanks. That did the trick. I reverted my patch, applied yours, and 
deleted epg.data. No more crashing.

BR,
--
rofa
  
Darren Salt Jan. 24, 2006, 4:44 p.m. UTC | #2
I demand that Klaus Schmidinger may or may not have written...

[snip]
> --- epg.c       2006/01/20 14:09:48     1.51
> +++ epg.c       2006/01/23 07:29:53
> @@ -312,8 +312,10 @@
>                                   Event->SetVersion(Version);
>                                   Event->SetStartTime(StartTime);
>                                   Event->SetDuration(Duration);
> -                                if (newEvent)
> +                                if (newEvent) {
> +                                   Event->SetTitle(tr("No title"));
[snip]

That patch has suffered from whitespace mangling: every line which begins
with a space has had one extra space inserted.

Thunderbird is known to mangle inline patches... :-|
  

Patch

--- epg.c       2006/01/20 14:09:48     1.51
+++ epg.c       2006/01/23 07:29:53
@@ -312,8 +312,10 @@ 
                                  Event->SetVersion(Version);
                                  Event->SetStartTime(StartTime);
                                  Event->SetDuration(Duration);
-                                if (newEvent)
+                                if (newEvent) {
+                                   Event->SetTitle(tr("No title"));
                                     Schedule->AddEvent(newEvent);
+                                   }
                                  }
                               }
                            }