Opened 13 years ago
Closed 12 years ago
#9802 closed Bug Report - Crash (fixed)
Hitting "i" on a recording in PBB causes crash
Reported by: | beirdo | Owned by: | beirdo |
---|---|---|---|
Priority: | minor | Milestone: | 0.25 |
Component: | MythTV - General | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
I accidentally hit the info button (i) on a recording, and the frontend came crashing down with a SIGABRT:
QObject::setParent: Cannot set parent, new parent is in a different thread
Backtrace of the running thread is attached.
Seems there is something running in an unexpected thread, perhaps?
Attachments (1)
Change History (8)
Changed 13 years ago by
Attachment: | backtrace.txt added |
---|
comment:1 Changed 13 years ago by
Owner: | set to paulh |
---|---|
Status: | new → accepted |
comment:2 Changed 13 years ago by
Move the setting of the parent of the cookiejar to the download manager thread.
This fixes a possible abort in some Qt builds/setups with trying to set the parent of the cookiesjar in a thread that didn't create it. Refs #9802.
Branch: master Changeset: e8e17757fd3fc4464aea8fef5c6e06b47742844a
comment:4 Changed 13 years ago by
No, same problem still exists.
The line it doesn't like:
networkManager->setCookieJar(GetMythDownloadManager?()->getCookieJar());
it is still whining with:
QObject::setParent: Cannot set parent, new parent is in a different thread
comment:5 Changed 12 years ago by
Milestone: | unknown → 0.25 |
---|
comment:6 Changed 12 years ago by
Owner: | changed from paulh to beirdo |
---|---|
Status: | accepted → assigned |
comment:7 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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
This is related to the cookieJar changes I've make recently. I don't actually see the problem here with Qt4.7.3 but I don't have abort on Qt warning turned on.