News:

Latest versions:
Server plugin: 0.5.1
MVP dongle: 0.5.2
Raspberry Pi client: 0.5.2
Windows client: 0.5.2-1

Main Menu

[solved] Dongle 0.3.1 segfaults (caused by teletext)

Started by hondansx, September 08, 2009, 10:33:17

Previous topic - Next topic

hondansx

If I zap to an radio channel and switch up to the next radio channel, vompclient triggers an Segmentation fault.

Work not:
VDR 1.7.9
Dongle 0.3.1
Server 0.3.1

Works:
VDR 1.7.9
Dongle 0.3.0
Server 0.3.0

Walter
GA-EP43 | headless | 1xCineS2 Dual | 1xSkystar 2.6D | VDR 1.7.37 
Frontend: 1xRasperry | 1xION3

hondansx

#1
Quote
Program terminated with signal 11, Segmentation fault.                                                                                                                  
[New process 46]                                                                                                                                                        
#0  0x10065cc4 in TeletextDecoderVBIEBU::getTeletxtView (this=0x0) at teletextdecodervbiebu.h:267
#1  0x100b7c58 in VVideoLiveTV::channelChange (this=0x102db470, changeType=3 '\003', newData=1) at vvideolivetv.cc:872
       newChannel = 0
       vtxt = (class VTeletextView *) 0x102db470
#2  0x100b6244 in VVideoLiveTV::doChanUpDown (this=0x102db470, which=1) at vvideolivetv.cc:477
#3  0x100b5d34 in VVideoLiveTV::handleCommand (this=0x102db470, command=32) at vvideolivetv.cc:317
#4  0x1004b914 in BoxStack::handleCommand (this=0x102d1260, command=32) at boxstack.cc:543
       retVal = 0
       retVal2 = 0
       i = 3
#5  0x10003130 in Command::handleCommand (this=0x102d12d8, button=32) at command.cc:434
#6  0x10002c68 in Command::run (this=0x102d12d8) at command.cc:216
       button = 32 ' '
#7  0x1010211c in main (argc=2, argv=0x7ffffea4) at main.cc:331
       debugEnabled = true
       setServer = 0x0
       c = -1
       sigtest = (sighandler_t) 0
       success = 1
       daemonize = false
       crashed = false
       videoFormat = 1 '\001'


Walter
GA-EP43 | headless | 1xCineS2 Dual | 1xSkystar 2.6D | VDR 1.7.37 
Frontend: 1xRasperry | 1xION3

hondansx

no idea wether this is the right way, but it seem to work?

in teletextdecodervbiebu.h:

from:
VTeletextView* getTeletxtView() {return txtview;};

to:
VTeletextView* getTeletxtView()  {return false;};


Walter
GA-EP43 | headless | 1xCineS2 Dual | 1xSkystar 2.6D | VDR 1.7.37 
Frontend: 1xRasperry | 1xION3

hondansx

#3
next problem. If I change to Radio and press the button for teletext -> next segfault.

Backtrace:


Program terminated with signal 11, Segmentation fault.
[New process 283]
#0  0x10065c98 in TeletextDecoderVBIEBU::registerTeletextView (this=0x0, view=0x102d9d48) at teletextdecodervbiebu.h:265
265 void registerTeletextView(VTeletextView* view) {txtview=view;};


Walter
GA-EP43 | headless | 1xCineS2 Dual | 1xSkystar 2.6D | VDR 1.7.37 
Frontend: 1xRasperry | 1xION3

MartenR

#4
Quote
in teletextdecodervbiebu.h:

from:
VTeletextView* getTeletxtView() {return txtview;};

to:
VTeletextView* getTeletxtView()  {return false;};
No, this not the solution.
The reason for this is that I assumed,  that the player is always a playervideolivetv, but this is not true.

The problem is that I am away for a long time from my vdr and can not participate directly in development.
So it would be nice, if you or someelse can make the following changes, test it and generate a patch:
Add

in doTeletext right at the beginning:

if (streamType !=VDR::VIDEO) return;


in doAudioSelector replace



if (streamType ==VDR::VIDEO) {
int subtitleChannel=((PlayerLiveTV*)player)->getCurrentSubtitleChannel();
    int subtitleType=0x10;
    if (!(static_cast<PlayerLiveTV*>(player))->isSubtitlesOn()) {
        if (((PlayerLiveTV*)player)->getTeletextDecoder()->getTeletxtView() &&
            ((PlayerLiveTV*)player)->getTeletextDecoder()->getTeletxtView()->isInSubtitleMode()
            ) {
               subtitleChannel=((PlayerLiveTV*)player)->getTeletextDecoder()->getPage();
                subtitleType=0x11;
 
        } else {
            subtitleType=0xFF; //turnedOff
            subtitleChannel=0;
        }
    }
 
 }
    // Draw the selector
 644   vas = new VAudioSelector(this, (*chanList)[currentChannelIndex], ((PlayerLive*)player)->getCurrentAudioChannel(),
 645       subtitleType,subtitleChannel,player->getTeletxtSubtitlePages());

 } else {
 subtitleType=0xFF; //turnedOff
            subtitleChannel=0;
               // Draw the selector
 644   vas = new VAudioSelector(this, (*chanList)[currentChannelIndex], ((PlayerLive*)player)->getCurrentAudioChannel(),
 645       subtitleType,subtitleChannel,NULL);

}


In channelchange

if (streamType ==VDR::VIDEO) {
865   VTeletextView *vtxt=((PlayerLiveTV*)player)->getTeletextDecoder()->getTeletxtView();
 866   if (vtxt ) {
 867        BoxStack::getInstance()->remove(vtxt);
 868
 869   }
 }
 
 
 
 in process message
 
 
 else if (m->message == Message::SUBTITLE_CHANGE_CHANNEL)
 989   {
 if (streamType !=VDR::VIDEO) return;

in handle commad change:

 case Remote::YELLOW:
 399     {
 400        if (streamType ==VDR::VIDEO) doTeletext(); //TODO: Add a selector for subtitles or teletext
 401       return 2;
 402     }

since I can not access my vomp development stuff nor any runniung vdr.


Marten

hondansx

@ Marten,

QuoteThe problem is that I am away for a long time from my vdr and can not participate directly in development.
So it would be nice, if you or someelse can make the following changes, test it and generate a patch:

Without vdr, is this possible?  ;)


--- vvideolivetv.cc.orig        2009-02-07 22:11:09.000000000 +0100                                                                                                     
+++ vvideolivetv.cc     2009-09-20 16:39:36.000000000 +0200                                                                                                             
@@ -397,7 +397,7 @@ int VVideoLiveTV::handleCommand(int comm                                                                                                           
     }                                                                                                                                                                 
     case Remote::YELLOW:                                                                                                                                               
     {                                                                                                                                                                 
-      doTeletext(); //TODO: Add a selector for subtitles or teletext                                                                                                   
+      if (streamType ==VDR::VIDEO) doTeletext(); //TODO: Add a selector for subtitles or teletext                                                                     
       return 2;                                                                                                                                                       
     }                                                                                                                                                                 
     case Remote::GUIDE:                                                                                                                                               
@@ -577,6 +577,7 @@ void VVideoLiveTV::doKey(int command)                                                                                                               
                                                                                                                                                                       
void VVideoLiveTV::doTeletext(bool subtitlemode)                                                                                                                       
{                                                                                                                                                                     
+  if (streamType !=VDR::VIDEO) return;                                                                                                                                 
   bool exists=true;                                                                                                                                                   
                                                                                                                                                                       
   // Cancel keying                                                                                                                                                     
@@ -642,7 +643,7 @@ void VVideoLiveTV::doAudioSelector()                                                                                                               

   // Draw the selector
   vas = new VAudioSelector(this, (*chanList)[currentChannelIndex], ((PlayerLiveTV*)player)->getCurrentAudioChannel(),
-  subtitleType,subtitleChannel,player->getTeletxtSubtitlePages());
+  subtitleType,subtitleChannel,NULL);
   Colour osdBack = Colour(0, 0, 0, 128);
   vas->setBackgroundColour(osdBack);
   vas->setPosition(0, osd.getScreenY() - vas->getHeight());
@@ -862,12 +863,13 @@ void VVideoLiveTV::timercall(int ref)
bool VVideoLiveTV::channelChange(UCHAR changeType, UINT newData)
{
   UINT newChannel = 0;
+  if (streamType ==VDR::VIDEO) {
   VTeletextView *vtxt=((PlayerLiveTV*)player)->getTeletextDecoder()->getTeletxtView();
-  if (vtxt ) {
-       BoxStack::getInstance()->remove(vtxt);
-
+    if (vtxt ) {
+         BoxStack::getInstance()->remove(vtxt);
+
+    }
   }
-
   if (changeType == INDEX)
   {
     newChannel = newData;
@@ -987,6 +989,7 @@ void VVideoLiveTV::processMessage(Messag
   }
   else if (m->message == Message::SUBTITLE_CHANGE_CHANNEL)
   {
+    if (streamType !=VDR::VIDEO) return;
       Log::getInstance()->log("VVideoLiveTV", Log::DEBUG, "Received change subtitle channel to %i", m->parameter);
       int type=((m->parameter & 0xFF0000)>>16);
       switch (type) {



The problems are gone!

Thanks for it,
Walter
GA-EP43 | headless | 1xCineS2 Dual | 1xSkystar 2.6D | VDR 1.7.37 
Frontend: 1xRasperry | 1xION3

riban

Thanks for the patch.

I had trouble with formatting when I copied the contents of the code block. I attach the patch as a file to ease other's attempts at applying this fix.

Chris: Will you apply the patch to cvs? This is a bit of a killer bug in that it crashes the box if changing channels in radio.

Chris