[mythtv-commits] Ticket #9802: Hitting "i" on a recording in PBB causes crash

MythTV noreply at mythtv.org
Tue Mar 13 06:30:35 UTC 2012


#9802: Hitting "i" on a recording in PBB causes crash
--------------------------------+-----------------------------
 Reporter:  beirdo              |          Owner:  beirdo
     Type:  Bug Report - Crash  |         Status:  closed
 Priority:  minor               |      Milestone:  0.25
Component:  MythTV - General    |        Version:  Master Head
 Severity:  medium              |     Resolution:  fixed
 Keywords:                      |  Ticket locked:  0
--------------------------------+-----------------------------
Changes (by Github):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 Make mythuiwebbrowser and mythdownloadmanager share cookies

 Fixes #9802

 Seems that Qt went out of their way to make QNetworkCookieJars difficult
 to
 work with.  They are not threadsafe (as you can not move them from a
 QObject
 owner in one thread to a QObject owner in another, even if shared).  They
 also
 disabled copying them.  Argh.

 So...  Since I already had subclassed it to MythCookieJar anyways, I added
 the
 copy functionality within the subclass.  Unfortunately to use this, you
 need
 to use some unsavory static_casts on the pointers to force it to allow you
 to effectively copy from the master class to the subclass... and back...
 Yuk!

 So, to share the cookie jar as best we can, when a mythuiwebbrowser starts
 up,
 it takes a copy of the cookie jar that the mythdownloadmanager is holding.
 When the mythuiwebbrowser is torn down, it copies the cookie jar back into
 the mythdownloadmanager, which then will copy from that temporary jar into
 its
 actual cookie jar at a convenient time in its processing.

 The cookie jar in the mythdownloadmanager is protected by a mutex so that
 there
 should be no clobbering at the same time.  However, since the MDM could
 have
 updated the jar while the browser was running, there is some possibility
 that
 any cookies the MDM accumulated during that time will be lost on refresh
 from
 the browser.
  Branch:    master
  Changeset: 1399a9c1368b489c9e874004030a463ff66d6bd3

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/9802#comment:7>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list