From 9338c217cd5e6dd1f53ff8c70138718a0144fecd Mon Sep 17 00:00:00 2001 From: David Rowe Date: Sat, 9 Jun 2018 16:58:49 +1200 Subject: [PATCH 1/4] Fix memory leak when reloading scripts --- libraries/script-engine/src/ScriptEngines.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/script-engine/src/ScriptEngines.cpp b/libraries/script-engine/src/ScriptEngines.cpp index ad6e1debe9..39df9406bc 100644 --- a/libraries/script-engine/src/ScriptEngines.cpp +++ b/libraries/script-engine/src/ScriptEngines.cpp @@ -191,6 +191,7 @@ void ScriptEngines::shutdownScripting() { // Gracefully stop the engine's scripting thread scriptEngine->stop(); + removeScriptEngine(scriptEngine); // We need to wait for the engine to be done running before we proceed, because we don't // want any of the scripts final "scriptEnding()" or pending "update()" methods from accessing @@ -394,6 +395,7 @@ void ScriptEngines::stopAllScripts(bool restart) { // stop all scripts qCDebug(scriptengine) << "stopping script..." << it.key(); scriptEngine->stop(); + removeScriptEngine(scriptEngine); } // wait for engines to stop (ie: providing time for .scriptEnding cleanup handlers to run) before // triggering reload of any Client scripts / Entity scripts @@ -438,6 +440,7 @@ bool ScriptEngines::stopScript(const QString& rawScriptURL, bool restart) { }); } scriptEngine->stop(); + removeScriptEngine(scriptEngine); stoppedScript = true; qCDebug(scriptengine) << "stopping script..." << scriptURL; } From 0e1e44a3f51e7e4fc137062113b9ce3e5d1c5021 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 19 Jun 2018 20:44:53 +1200 Subject: [PATCH 2/4] Zero avatar velocity if protocol version mismatch so that overlays show --- interface/src/Application.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index b12aa8bac4..0bba2f24de 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2289,6 +2289,7 @@ void Application::domainConnectionRefused(const QString& reasonMessage, int reas QString message = "Unable to connect to the location you are visiting.\n"; message += reasonMessage; OffscreenUi::asyncWarning("", message); + getMyAvatar()->setWorldVelocity(glm::vec3(0.0f)); break; } default: From 328a485ad100843c85457a0886d56b91d97a7b68 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Mon, 25 Jun 2018 10:38:53 -0700 Subject: [PATCH 3/4] Prevent ray-picks against ModelEntity bounding boxes when loading has not yet completed. --- .../entities-renderer/src/RenderableModelEntityItem.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index a7126b847e..d8ac3dc63e 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -279,18 +279,16 @@ EntityItemProperties RenderableModelEntityItem::getProperties(EntityPropertyFlag } bool RenderableModelEntityItem::supportsDetailedRayIntersection() const { - return isModelLoaded(); + return true; } bool RenderableModelEntityItem::findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction, OctreeElementPointer& element, float& distance, BoxFace& face, glm::vec3& surfaceNormal, QVariantMap& extraInfo, bool precisionPicking) const { auto model = getModel(); - if (!model) { - return true; + if (!model || !isModelLoaded()) { + return false; } - // qCDebug(entitiesrenderer) << "RenderableModelEntityItem::findDetailedRayIntersection() precisionPicking:" - // << precisionPicking; return model->findRayIntersectionAgainstSubMeshes(origin, direction, distance, face, surfaceNormal, extraInfo, precisionPicking, false); From a906fbaf5634e16f307f2ab97587f09a11738a57 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 26 Jun 2018 10:20:22 -0700 Subject: [PATCH 4/4] fix login links --- .../qml/LoginDialog/LinkAccountBody.qml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 4708bfdebe..6cbd1c4837 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -126,10 +126,12 @@ Item { activeFocusOnPress: true ShortcutText { + z: 10 anchors { - verticalCenter: usernameField.textFieldLabel.verticalCenter - left: usernameField.textFieldLabel.right - leftMargin: 10 + left: usernameField.left + top: usernameField.top + leftMargin: usernameField.textFieldLabel.contentWidth + 10 + topMargin: -19 } text: "Forgot Username?" @@ -154,10 +156,12 @@ Item { activeFocusOnPress: true ShortcutText { + z: 10 anchors { - verticalCenter: passwordField.textFieldLabel.verticalCenter - left: passwordField.textFieldLabel.right - leftMargin: 10 + left: passwordField.left + top: passwordField.top + leftMargin: passwordField.textFieldLabel.contentWidth + 10 + topMargin: -19 } text: "Forgot Password?" @@ -168,6 +172,7 @@ Item { onLinkActivated: loginDialog.openUrl(link) } + onFocusChanged: { root.text = ""; root.isPassword = true;