[mythtv-commits] Ticket #10629: mythwelcome not painting, mythshutdown hang
MythTV
noreply at mythtv.org
Fri Apr 20 09:13:42 UTC 2012
#10629: mythwelcome not painting, mythshutdown hang
-------------------------------------------------+-------------------------
Reporter: Malcolm Parsons <malcolm.parsons@…> | Owner:
Type: Bug Report - General | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version:
Severity: medium | 0.25-fixes
Keywords: mythwelcome, hang | Resolution:
| Ticket locked: 0
-------------------------------------------------+-------------------------
Comment (by Malcolm Parsons <malcolm.parsons@…>):
{{{
==13947== Conflicting load by thread 2 at 0x04bb7644 size 4
==13947== at 0x4A5565A: MythDB::getMythDB() (mythdb.cpp:27)
==13947== by 0x4A556F3: GetMythDB() (mythdb.cpp:48)
==13947== by 0x4B1C1B3: DBLoggerThread::run() (logging.cpp:550)
==13947== by 0x4A2BC91: MThreadInternal::run() (mthread.cpp:78)
==13947== by 0x6CC0D30: start_thread (pthread_create.c:304)
==13947== by 0x53D246D: clone (clone.S:130)
}}}
http://qt-project.org/forums/%20/viewthread/3784#23286
Patch:
{{{
diff --git a/mythtv/libs/libmythbase/mythdb.cpp
b/mythtv/libs/libmythbase/mythdb.cpp
index ea30783..2e62d96 100644
--- a/mythtv/libs/libmythbase/mythdb.cpp
+++ b/mythtv/libs/libmythbase/mythdb.cpp
@@ -8,6 +8,7 @@ using namespace std;
#include <QFile>
#include <QHash>
#include <QDir>
+#include <QAtomicPointer>
#include "mythdb.h"
#include "mythdbcon.h"
@@ -16,7 +17,7 @@ using namespace std;
#include "mythdirs.h"
#include "mythcorecontext.h"
-static MythDB *mythdb = NULL;
+static QAtomicPointer<MythDB> mythdb;
static QMutex dbLock;
// For thread safety reasons this is not a QString
}}}
--
Ticket URL: <http://code.mythtv.org/trac/ticket/10629#comment:2>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list