mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-27 14:45:32 +02:00
add debugging to catch AC kill hang
This commit is contained in:
parent
99a9f2df90
commit
0a295bada1
5 changed files with 7 additions and 3 deletions
|
@ -224,7 +224,7 @@ void Agent::run() {
|
|||
|
||||
void Agent::aboutToFinish() {
|
||||
_scriptEngine.stop();
|
||||
|
||||
|
||||
// our entity tree is going to go away so tell that to the EntityScriptingInterface
|
||||
DependencyManager::get<EntityScriptingInterface>()->setEntityTree(NULL);
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ class Agent : public ThreadedAssignment {
|
|||
Q_PROPERTY(float lastReceivedAudioLoudness READ getLastReceivedAudioLoudness)
|
||||
public:
|
||||
Agent(const QByteArray& packet);
|
||||
~Agent() { qDebug() << "Agent is dead"; }
|
||||
|
||||
void setIsAvatar(bool isAvatar) { QMetaObject::invokeMethod(&_scriptEngine, "setIsAvatar", Q_ARG(bool, isAvatar)); }
|
||||
bool isAvatar() const { return _scriptEngine.isAvatar(); }
|
||||
|
|
|
@ -136,6 +136,9 @@ void AssignmentClient::stopAssignmentClient() {
|
|||
// ask the current assignment to delete itself on its thread
|
||||
_currentAssignment->deleteLater();
|
||||
|
||||
// when this thread is destroyed we don't need to run our assignment complete method
|
||||
disconnect(currentAssignmentThread, &QThread::destroyed, this, &AssignmentClient::assignmentCompleted);
|
||||
|
||||
// wait on the thread from that assignment - it will be gone once the current assignment deletes
|
||||
currentAssignmentThread->quit();
|
||||
currentAssignmentThread->wait();
|
||||
|
|
|
@ -20,7 +20,7 @@ class ThreadedAssignment : public Assignment {
|
|||
Q_OBJECT
|
||||
public:
|
||||
ThreadedAssignment(const QByteArray& packet);
|
||||
~ThreadedAssignment() { stop(); }
|
||||
~ThreadedAssignment() { stop(); qDebug() << "ThreadedAssignment dtor called"; }
|
||||
|
||||
void setFinished(bool isFinished);
|
||||
virtual void aboutToFinish() { };
|
||||
|
|
|
@ -24,7 +24,7 @@ LogHandler& LogHandler::getInstance() {
|
|||
}
|
||||
|
||||
LogHandler::LogHandler() :
|
||||
_shouldOutputPID(false)
|
||||
_shouldOutputPID(true)
|
||||
{
|
||||
// setup our timer to flush the verbose logs every 5 seconds
|
||||
QTimer* logFlushTimer = new QTimer(this);
|
||||
|
|
Loading…
Reference in a new issue