[mythtv] [Pseudo-PATCH] SBE crash when MBE restarted

Shane Shrybman shrybman at aei.ca
Sat Dec 25 21:19:06 UTC 2004


Hi,

This is almost definitely not the correct fix for this. However, I hope
it does illustrate the problem.

This bug causes the SBE to crash when the MBE is restarted. This patch
allows my SBE to survive. What is the correct way to fix this?

(BTW: Just curious, is there a name for this general type of problem? )

--- mythtv-dec24-cvs/programs/mythbackend/mainserver.cpp	2004-12-08 04:03:51.000000000 -0500
+++ mythtv-dec24.2/programs/mythbackend/mainserver.cpp	2004-12-25 01:51:55.000000000 -0500
@@ -480,7 +480,14 @@
             sentSet.append(pbs);
 
             RefSocket *sock = pbs->getSocket();
-            sock->UpRef();
+	    if (sock)
+                sock->UpRef();
+	    else
+	    {
+	        cout << "Lost Socket!" << endl;
+                iter = playbackList.begin();
+		continue;
+	    }
 
             if (sendGlobal)
             {


2004-12-25 15:54:20.242 Connecting to master server: XXX:6543
2004-12-25 15:54:20.259 Could not connect to master server.
2004-12-25 15:54:21.275 Connecting to master server: XXX:6543
2004-12-25 15:54:21.296 Could not connect to master server.
2004-12-25 15:54:22.314 Connecting to master server: XXX:6543
2004-12-25 15:54:22.330 Connected successfully
2004-12-25 15:54:41.261 Changing from WatchingLiveTV to None
Lost Socket!
2004-12-25 15:55:24.776 MainServer::HandleAnnounce Playback
2004-12-25 15:55:24.788 adding: mars as a client (events: 0)
2004-12-25 15:55:24.820 MainServer::HandleAnnounce Playback
2004-12-25 15:55:26.113 adding: mars as a client (events: 0)
2004-12-25 15:55:26.723 adding: mars as a remote ringbuffer
2004-12-25 15:55:27.326 Changing from None to WatchingLiveTV
2004-12-25 15:55:28.551 Using profile 'Live TV' to record


Regards,

Shane



More information about the mythtv-dev mailing list