[mythtv] Re: Backend segfault backtrace, ??ERY_RECORDER

Stefan Frank sfr+lists at 6913304088794.gnuu.de
Sat Jul 19 00:24:39 EDT 2003


Hi MegaDeTH!

On Thu, 17 Jul 2003, MegaDeTH wrote:

> Stefan, were you able to narrow down the problem?
> 
> I have not yet added any extra debugging commands to the program, I was 
> thinking that ignoring invalid commands would be a simpler fix?    I'm 
> no programmer, not sure if this is even the real problem.
> 
> If you dont mind, if you could share the extra debugging lines you've 
> added, i will add to mine to see if we can narrow down the problem.
> 
 
Hi, 

sorry for not responding earlier, been travelling most of the week.
Attached is a patch to mythbackend which adds some debugging messages.
I didn't catch a segfault caused by an unknown command with this set of
debugging messages yet.

Bye, Stefan

-- 
Machine-Independent, adj.:
	Does not run on any existing machine.
-------------- next part --------------
--- mythtv/programs/mythbackend/mainserver.cpp	2003-07-09 11:25:32.000000000 +0200
+++ mythtv-de/programs/mythbackend/mainserver.cpp	2003-07-13 22:01:09.000000000 +0200
@@ -34,12 +34,17 @@
    
     void setup(QStringList list, QStringList tok, PlaybackSock *pb)
     {
+	cerr << "1st in prt->setup '" << list[0] << "'" << tok[0] << "'" << endl; //DEBUG
         listline = list;
         tokens = tok;
         pbs = pb;
         dostuff = true;
+	cerr << "before waitcond '" << listline[0] << "'" << tok[0] << "'" << tokens[0] << "'" << endl; //DEBUG
         waitCond.wakeOne();
-    }
+	cerr << "last in prt->setup '" << listline[0] << "'" << tok[0] << "'" << tokens[0] << "'" << endl; //DEBUG
+	if (listline[0] == "QUERY_RECORDER 1")
+	    cerr << "lin prt_setup'" << listline[1] << "'" << endl; //DEBUG
+  }
 
     void killit(void)
     {
@@ -58,7 +63,10 @@
 
             if (dostuff)
             {
-                parent->ProcessRequest(listline, tokens, pbs);
+		cerr << "before PRT: '" << listline[0] << "'" << tokens[0] << "'" << tokens[0] << "'" << endl; //DEBUG
+		if (listline[0] == "QUERY_RECORDER 1")
+		    cerr << "before PRT: '" << listline[1] << "'" << endl; //DEBUG
+         parent->ProcessRequest(listline, tokens, pbs);
                 dostuff = false;
                 parent->MarkUnused(this);
             }
@@ -142,6 +150,7 @@
     {
         QStringList listline;
         ReadStringList(socket, listline);
+	cerr << "after RSL '" << listline[0] << "'" << endl; //DEBUG
         QString line = listline[0];
 
         line = line.simplifyWhiteSpace();
@@ -163,7 +172,8 @@
         }
 
         PlaybackSock *pbs = getPlaybackBySock(socket);
-        if (pbs)
+        
+	if (pbs)
         {
             ProcessRequestThread *prt = NULL;
             while (!prt)
@@ -184,6 +194,10 @@
                 }
             }
 
+	    cerr << "before prt->setup '" << listline[0] << "'" << endl; //DEBUG
+	    // 12.07  23:15 message still ok, here
+	    if (listline[0] == "QUERY_RECORDER 1")
+		cerr << "bf prt_setup'" << listline[1] << "'" << endl; //DEBUG
             prt->setup(listline, tokens, pbs);
         }
         else
@@ -196,6 +210,9 @@
                                 PlaybackSock *pbs)
 {
     QString command = tokens[0];
+    cerr << "1st in PR'" << listline[0] << "'" << endl; //DEBUG
+    if (listline.size() > 1)
+	cerr << "1st in PR'" << listline[1] << "'" << endl; //DEBUG
 
     if (command == "QUERY_RECORDINGS")
     {


More information about the mythtv-dev mailing list