[mythtv-commits] Ticket #6595: Slave backend not reconnecting on socket loss, QTimer/threads related
MythTV
mythtv at cvs.mythtv.org
Tue Jun 2 06:15:48 UTC 2009
#6595: Slave backend not reconnecting on socket loss, QTimer/threads related
----------------------------------------+-----------------------------------
Reporter: Jeff Lu <jll544 at yahoo.com> | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: head
Severity: medium | Mlocked: 0
----------------------------------------+-----------------------------------
Running trunk r20649, Qt4.4.3:
When my slave backend loses its connection to the master backend, the
slave console shows "QObject::startTimer: timers cannot be started from
another thread" and the slave never tries to reconnect.
The relevant threads appear to be MainServer and MythSocketThread. When
the socket closes, MythSocketThread calls a member function in MainServer
that tries to start the masterServerReconnect Qtimer.
But apparently Qt enforces the Qtimer/thread relationship differently on
win32 vs. linux (both Qt4.4.3). On linux, the existing code works - timer
is started and the slave reconnects. On win32, the error prints, and the
timer does not start.
The attached patch corrects this issue on win32 by emitting a signal
instead of starting the timer. I've seen other cases of similar
Qtimer/thread errors on win32, so I'd be interested in knowing if there
are other/better ways to fix this.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/6595>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list