add debugging to catch AC kill hang

This commit is contained in:
Stephen Birarda 2015-05-08 14:32:16 -07:00
parent 99a9f2df90
commit 0a295bada1
5 changed files with 7 additions and 3 deletions

View file

@ -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);

View file

@ -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(); }

View file

@ -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();

View file

@ -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() { };

View file

@ -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);