From 05becb870f8ddca21546795666397f7c7478130b Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Tue, 6 Nov 2018 13:47:07 -0800 Subject: [PATCH 01/13] remove urls from logs in Interface --- interface/src/Application.cpp | 13 +++++-------- interface/src/AvatarBookmarks.cpp | 2 +- interface/src/ModelPackager.cpp | 12 ++++++------ interface/src/assets/ATPAssetMigrator.cpp | 10 +++++----- interface/src/commerce/Ledger.cpp | 2 +- interface/src/commerce/QmlCommerce.cpp | 3 +-- interface/src/raypick/CollisionPick.cpp | 2 +- .../src/scripting/GooglePolyScriptingInterface.cpp | 4 ++-- .../src/ui/overlays/ContextOverlayInterface.cpp | 2 +- 9 files changed, 23 insertions(+), 27 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c2faf8494a..9bb1ce3c17 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -6971,7 +6971,7 @@ bool Application::askToSetAvatarUrl(const QString& url) { getMyAvatar()->useFullAvatarURL(url, modelName); emit fullAvatarURLChanged(url, modelName); } else { - qCDebug(interfaceapp) << "Declined to use the avatar: " << url; + qCDebug(interfaceapp) << "Declined to use the avatar"; } }); }; @@ -6999,7 +6999,7 @@ bool Application::askToSetAvatarUrl(const QString& url) { break; } } else { - qCDebug(interfaceapp) << "Declined to agree to avatar license: " << url; + qCDebug(interfaceapp) << "Declined to agree to avatar license"; } //auto offscreenUi = DependencyManager::get(); @@ -7036,7 +7036,7 @@ bool Application::askToLoadScript(const QString& scriptFilenameOrURL) { qCDebug(interfaceapp) << "Chose to run the script: " << fileName; DependencyManager::get()->loadScript(fileName); } else { - qCDebug(interfaceapp) << "Declined to run the script: " << scriptFilenameOrURL; + qCDebug(interfaceapp) << "Declined to run the script"; } QObject::disconnect(dlg, &ModalDialogListener::response, this, nullptr); }); @@ -7094,7 +7094,7 @@ bool Application::askToWearAvatarAttachmentUrl(const QString& url) { attachmentDataVec.push_back(attachmentData); myAvatar->setAttachmentData(attachmentDataVec); } else { - qCDebug(interfaceapp) << "User declined to wear the avatar attachment: " << url; + qCDebug(interfaceapp) << "User declined to wear the avatar attachment"; } }); } else { @@ -7113,7 +7113,7 @@ bool Application::askToWearAvatarAttachmentUrl(const QString& url) { } void Application::replaceDomainContent(const QString& url) { - qCDebug(interfaceapp) << "Attempting to replace domain content: " << url; + qCDebug(interfaceapp) << "Attempting to replace domain content"; QByteArray urlData(url.toUtf8()); auto limitedNodeList = DependencyManager::get(); const auto& domainHandler = limitedNodeList->getDomainHandler(); @@ -7241,7 +7241,6 @@ void Application::showAssetServerWidget(QString filePath) { } void Application::addAssetToWorldFromURL(QString url) { - qInfo(interfaceapp) << "Download model and add to world from" << url; QString filename; if (url.contains("filename")) { @@ -7294,13 +7293,11 @@ void Application::addAssetToWorldFromURLRequestFinished() { } if (result == ResourceRequest::Success) { - qInfo(interfaceapp) << "Downloaded model from" << url; QTemporaryDir temporaryDir; temporaryDir.setAutoRemove(false); if (temporaryDir.isValid()) { QString temporaryDirPath = temporaryDir.path(); QString downloadPath = temporaryDirPath + "/" + filename; - qInfo(interfaceapp) << "Download path:" << downloadPath; QFile tempFile(downloadPath); if (tempFile.open(QIODevice::WriteOnly)) { diff --git a/interface/src/AvatarBookmarks.cpp b/interface/src/AvatarBookmarks.cpp index ce21c68c3d..534fb15d93 100644 --- a/interface/src/AvatarBookmarks.cpp +++ b/interface/src/AvatarBookmarks.cpp @@ -180,7 +180,7 @@ void AvatarBookmarks::loadBookmark(const QString& bookmarkName) { myAvatar->removeWearableAvatarEntities(); const QString& avatarUrl = bookmark.value(ENTRY_AVATAR_URL, "").toString(); myAvatar->useFullAvatarURL(avatarUrl); - qCDebug(interfaceapp) << "Avatar On " << avatarUrl; + qCDebug(interfaceapp) << "Avatar On"; const QList& attachments = bookmark.value(ENTRY_AVATAR_ATTACHMENTS, QList()).toList(); qCDebug(interfaceapp) << "Attach " << attachments; diff --git a/interface/src/ModelPackager.cpp b/interface/src/ModelPackager.cpp index 21d3477d7e..25cde7df94 100644 --- a/interface/src/ModelPackager.cpp +++ b/interface/src/ModelPackager.cpp @@ -83,10 +83,10 @@ bool ModelPackager::loadModel() { QString("ModelPackager::loadModel()"), QString("Could not open FST file %1").arg(_modelFile.filePath()), QMessageBox::Ok); - qWarning() << QString("ModelPackager::loadModel(): Could not open FST file %1").arg(_modelFile.filePath()); + qWarning() << "ModelPackager::loadModel(): Could not open FST file"; return false; } - qCDebug(interfaceapp) << "Reading FST file : " << _modelFile.filePath(); + qCDebug(interfaceapp) << "Reading FST file"; _mapping = FSTReader::readMapping(fst.readAll()); fst.close(); @@ -102,11 +102,11 @@ bool ModelPackager::loadModel() { QString("ModelPackager::loadModel()"), QString("Could not open FBX file %1").arg(_fbxInfo.filePath()), QMessageBox::Ok); - qWarning() << QString("ModelPackager::loadModel(): Could not open FBX file %1").arg(_fbxInfo.filePath()); + qWarning() << "ModelPackager::loadModel(): Could not open FBX file"; return false; } try { - qCDebug(interfaceapp) << "Reading FBX file : " << _fbxInfo.filePath(); + qCDebug(interfaceapp) << "Reading FBX file"; QByteArray fbxContents = fbx.readAll(); _hfmModel.reset(readFBX(fbxContents, QVariantHash(), _fbxInfo.filePath())); @@ -114,7 +114,7 @@ bool ModelPackager::loadModel() { // make sure we have some basic mappings populateBasicMapping(_mapping, _fbxInfo.filePath(), *_hfmModel); } catch (const QString& error) { - qCDebug(interfaceapp) << "Error reading " << _fbxInfo.filePath() << ": " << error; + qCDebug(interfaceapp) << "Error reading: " << error; return false; } return true; @@ -132,7 +132,7 @@ bool ModelPackager::editProperties() { // Make sure that a mapping for the root joint has been specified QVariantHash joints = _mapping.value(JOINT_FIELD).toHash(); if (!joints.contains("jointRoot")) { - qWarning() << QString("%1 root joint not configured for skeleton.").arg(_modelFile.fileName()); + qWarning() << "root joint not configured for skeleton."; QString message = "Your did not configure a root joint for your skeleton model.\n\nPackaging will be canceled."; QMessageBox msgBox; diff --git a/interface/src/assets/ATPAssetMigrator.cpp b/interface/src/assets/ATPAssetMigrator.cpp index be7f2014cc..2e520bfe5f 100644 --- a/interface/src/assets/ATPAssetMigrator.cpp +++ b/interface/src/assets/ATPAssetMigrator.cpp @@ -69,7 +69,7 @@ void ATPAssetMigrator::loadEntityServerFile() { } else { ++_errorCount; _pendingReplacements.remove(migrationURL); - qWarning() << "Could not retrieve asset at" << migrationURL.toString(); + qWarning() << "Could not retrieve asset"; checkIfFinished(); } @@ -79,7 +79,7 @@ void ATPAssetMigrator::loadEntityServerFile() { request->send(); } else { ++_errorCount; - qWarning() << "Could not create request for asset at" << migrationURL.toString(); + qWarning() << "Could not create request for asset"; } }; @@ -209,7 +209,7 @@ void ATPAssetMigrator::migrateResource(ResourceRequest* request) { // add this URL to our hash of AssetUpload to original URL _originalURLs.insert(upload, request->getUrl()); - qCDebug(asset_migrator) << "Starting upload of asset from" << request->getUrl(); + qCDebug(asset_migrator) << "Starting upload of asset"; // connect to the finished signal so we know when the AssetUpload is done QObject::connect(upload, &AssetUpload::finished, this, &ATPAssetMigrator::assetUploadFinished); @@ -239,7 +239,7 @@ void ATPAssetMigrator::assetUploadFinished(AssetUpload *upload, const QString& h _pendingReplacements.remove(migrationURL); ++_errorCount; - qWarning() << "Failed to upload" << migrationURL << "- error was" << upload->getErrorString(); + qWarning() << "Failed to upload" << "- error was" << upload->getErrorString(); } checkIfFinished(); @@ -281,7 +281,7 @@ void ATPAssetMigrator::setMappingFinished(SetMappingRequest* request) { _pendingReplacements.remove(migrationURL); ++_errorCount; - qWarning() << "Error setting mapping for" << migrationURL << "- error was " << request->getErrorString(); + qWarning() << "Error setting mapping for" << "- error was " << request->getErrorString(); } checkIfFinished(); diff --git a/interface/src/commerce/Ledger.cpp b/interface/src/commerce/Ledger.cpp index 0c59fbc6d0..4235f2351a 100644 --- a/interface/src/commerce/Ledger.cpp +++ b/interface/src/commerce/Ledger.cpp @@ -72,7 +72,7 @@ void Ledger::send(const QString& endpoint, const QString& success, const QString const QString URL = "/api/v1/commerce/"; JSONCallbackParameters callbackParams(this, success, fail); #if defined(DEV_BUILD) // Don't expose user's personal data in the wild. But during development this can be handy. - qCInfo(commerce) << "Sending" << endpoint << QJsonDocument(request).toJson(QJsonDocument::Compact); + qCInfo(commerce) << "Sending" << QJsonDocument(request).toJson(QJsonDocument::Compact); #endif accountManager->sendRequest(URL + endpoint, authType, diff --git a/interface/src/commerce/QmlCommerce.cpp b/interface/src/commerce/QmlCommerce.cpp index ffe89ffc5b..07a5ad4093 100644 --- a/interface/src/commerce/QmlCommerce.cpp +++ b/interface/src/commerce/QmlCommerce.cpp @@ -396,8 +396,7 @@ bool QmlCommerce::uninstallApp(const QString& itemHref) { QString scriptUrl = appFileJsonObject["scriptURL"].toString(); if (!DependencyManager::get()->stopScript(scriptUrl.trimmed(), false)) { - qCWarning(commerce) << "Couldn't stop script during app uninstall. Continuing anyway. ScriptURL is:" - << scriptUrl.trimmed(); + qCWarning(commerce) << "Couldn't stop script during app uninstall. Continuing anyway."; } // Delete the .app.json from the filesystem diff --git a/interface/src/raypick/CollisionPick.cpp b/interface/src/raypick/CollisionPick.cpp index 2b75946e28..dfb0db1da1 100644 --- a/interface/src/raypick/CollisionPick.cpp +++ b/interface/src/raypick/CollisionPick.cpp @@ -225,7 +225,7 @@ void CollisionPick::computeShapeInfo(const CollisionRegion& pick, ShapeInfo& sha } const int32_t MAX_VERTICES_PER_STATIC_MESH = 1e6; if (totalNumVertices > MAX_VERTICES_PER_STATIC_MESH) { - qWarning() << "model" << resource->getURL() << "has too many vertices" << totalNumVertices << "and will collide as a box."; + qWarning() << "model" << "has too many vertices" << totalNumVertices << "and will collide as a box."; shapeInfo.setParams(SHAPE_TYPE_BOX, 0.5f * dimensions); return; } diff --git a/interface/src/scripting/GooglePolyScriptingInterface.cpp b/interface/src/scripting/GooglePolyScriptingInterface.cpp index fde2676986..e1b51d402a 100644 --- a/interface/src/scripting/GooglePolyScriptingInterface.cpp +++ b/interface/src/scripting/GooglePolyScriptingInterface.cpp @@ -95,7 +95,7 @@ QString GooglePolyScriptingInterface::getModelInfo(const QString& input) { } QString urlString(GET_POLY_URL); urlString = urlString.replace("model", name) + "key=" + _authCode; - qCDebug(scriptengine) << "Google URL request: " << urlString; + qCDebug(scriptengine) << "Google URL request"; QUrl url(urlString); QString json = parseJSON(url, 2).toString(); return json; @@ -129,7 +129,7 @@ QUrl GooglePolyScriptingInterface::formatURLQuery(const QString& keyword, const } QString GooglePolyScriptingInterface::getModelURL(const QUrl& url) { - qCDebug(scriptengine) << "Google URL request: " << url; + qCDebug(scriptengine) << "Google URL request"; if (!url.isEmpty()) { return parseJSON(url, 1).toString(); } else { diff --git a/interface/src/ui/overlays/ContextOverlayInterface.cpp b/interface/src/ui/overlays/ContextOverlayInterface.cpp index 11c268dd48..e8dc022fd9 100644 --- a/interface/src/ui/overlays/ContextOverlayInterface.cpp +++ b/interface/src/ui/overlays/ContextOverlayInterface.cpp @@ -355,7 +355,7 @@ void ContextOverlayInterface::requestOwnershipVerification(const QUuid& entityID } } } else { - qCDebug(entities) << "Call to" << networkReply->url() << "failed with error" << networkReply->error() << + qCDebug(entities) << "Call failed with error" << networkReply->error() << "More info:" << networkReply->readAll(); } From e80468e4235367c8beb9c76d6e1685099195c9c9 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 6 Nov 2018 15:09:24 -0800 Subject: [PATCH 02/13] Remove URL logging from JS and QML --- interface/resources/qml/Browser.qml | 5 ----- .../resources/qml/dialogs/FileDialog.qml | 3 --- .../qml/dialogs/TabletFileDialog.qml | 3 +-- .../dialogs/preferences/AvatarPreference.qml | 2 -- .../preferences/BrowsablePreference.qml | 1 - interface/resources/qml/hifi/AssetServer.qml | 20 +++++++++---------- interface/resources/qml/hifi/AvatarApp.qml | 2 +- interface/resources/qml/hifi/Card.qml | 2 +- interface/resources/qml/hifi/Desktop.qml | 5 ----- interface/resources/qml/hifi/Pal.qml | 2 +- .../resources/qml/hifi/RootHttpRequest.qml | 4 ++-- .../resources/qml/hifi/SpectatorCamera.qml | 2 +- .../qml/hifi/avatarapp/AdjustWearables.qml | 1 - .../qml/hifi/avatarapp/AvatarThumbnail.qml | 3 --- .../hifi/avatarapp/CreateFavoriteDialog.qml | 3 --- .../qml/hifi/avatarapp/MessageBox.qml | 3 --- .../qml/hifi/commerce/checkout/Checkout.qml | 2 +- .../commerce/common/sendAsset/SendAsset.qml | 2 +- .../InspectionCertificate.qml | 2 +- .../qml/hifi/commerce/purchases/Purchases.qml | 4 ++-- .../qml/hifi/commerce/wallet/Help.qml | 2 +- .../qml/hifi/commerce/wallet/NeedsLogIn.qml | 2 +- .../qml/hifi/commerce/wallet/Wallet.qml | 2 +- .../qml/hifi/dialogs/RunningScripts.qml | 3 --- .../qml/hifi/dialogs/TabletAssetServer.qml | 20 +++++++------------ .../qml/hifi/dialogs/TabletRunningScripts.qml | 4 ---- .../qml/hifi/models/PSFListModel.qml | 4 ++-- .../resources/qml/hifi/tablet/EditTabView.qml | 2 +- .../qml/hifi/tablet/EditToolsTabView.qml | 2 +- .../tablet/tabletWindows/TabletFileDialog.qml | 3 --- .../preferences/TabletBrowsablePreference.qml | 1 - scripts/developer/libraries/utils.js | 1 - .../developer/tests/dynamics/dynamicsTests.js | 1 - scripts/developer/tests/entitySpawnTool.js | 1 - scripts/developer/tests/loadedMachine.js | 2 +- .../tests/performance/crowd-agent.js | 2 +- .../tests/performance/domain-check.js | 4 ++-- scripts/developer/tests/performance/summon.js | 4 ++-- .../tests/unit_tests/assetUnitTests.js | 6 +++--- .../entity/entityConstructorAPIException.js | 4 ++-- .../entityConstructorRequireException.js | 2 +- .../entity/entityPreloadAPIError.js | 4 ++-- .../tests/unit_tests/moduleUnitTests.js | 5 ++--- .../tests/unit_tests/scriptUnitTests.js | 4 ++-- .../utilities/render/debugHighlight.js | 2 +- .../utilities/render/debugTransition.js | 1 - .../render/photobooth/photoboothApp.js | 2 +- .../utilities/tests/editEntityStressTest.js | 1 - .../developer/utilities/workload/workload.js | 1 - scripts/modules/appUi.js | 6 ++---- scripts/modules/request.js | 6 ------ scripts/system/avatarapp.js | 2 +- scripts/system/commerce/wallet.js | 2 +- scripts/system/edit.js | 8 ++------ scripts/system/html/js/entityProperties.js | 9 --------- scripts/system/html/js/marketplacesInject.js | 16 --------------- scripts/system/libraries/connectionUtils.js | 2 +- scripts/system/libraries/entityList.js | 2 +- .../system/libraries/entitySelectionTool.js | 2 +- scripts/system/libraries/utils.js | 1 - scripts/system/marketplaces/marketplaces.js | 2 +- scripts/system/pal.js | 4 ++-- scripts/system/snapshot.js | 1 - .../tutorials/entity_scripts/ambientSound.js | 12 +++++------ 64 files changed, 73 insertions(+), 165 deletions(-) diff --git a/interface/resources/qml/Browser.qml b/interface/resources/qml/Browser.qml index 4474cfb2cd..fd07995579 100644 --- a/interface/resources/qml/Browser.qml +++ b/interface/resources/qml/Browser.qml @@ -114,7 +114,6 @@ ScrollingWindow { sourceSize: Qt.size(width, height); verticalAlignment: Image.AlignVCenter; horizontalAlignment: Image.AlignHCenter - onSourceChanged: console.log("Icon url: " + source) } } @@ -249,10 +248,6 @@ ScrollingWindow { root.loadingChanged(loadRequest.status); } - onIconChanged: { - console.log("New icon: " + icon) - } - onWindowCloseRequested: { root.destroy(); } diff --git a/interface/resources/qml/dialogs/FileDialog.qml b/interface/resources/qml/dialogs/FileDialog.qml index 6651af0db3..0e2075d9bc 100644 --- a/interface/resources/qml/dialogs/FileDialog.qml +++ b/interface/resources/qml/dialogs/FileDialog.qml @@ -80,8 +80,6 @@ ModalWindow { property int clickedButton: OriginalDialogs.StandardButton.NoButton; Component.onCompleted: { - console.log("Helper " + helper + " drives " + drives); - fileDialogItem.keyboardEnabled = HMD.active; // HACK: The following lines force the model to initialize properly such that the go-up button @@ -809,7 +807,6 @@ ModalWindow { } } - console.log("Selecting " + selection) selectedFile(selection); root.destroy(); } diff --git a/interface/resources/qml/dialogs/TabletFileDialog.qml b/interface/resources/qml/dialogs/TabletFileDialog.qml index 6848c230e3..5a4e913e7c 100644 --- a/interface/resources/qml/dialogs/TabletFileDialog.qml +++ b/interface/resources/qml/dialogs/TabletFileDialog.qml @@ -765,8 +765,7 @@ TabletModalWindow { return; } } - - console.log("Selecting " + selection) + selectedFile(selection); root.destroy(); } diff --git a/interface/resources/qml/dialogs/preferences/AvatarPreference.qml b/interface/resources/qml/dialogs/preferences/AvatarPreference.qml index 0efc3776b3..45ff18ba90 100644 --- a/interface/resources/qml/dialogs/preferences/AvatarPreference.qml +++ b/interface/resources/qml/dialogs/preferences/AvatarPreference.qml @@ -22,8 +22,6 @@ Preference { Component.onCompleted: { dataTextField.text = preference.value; - console.log("MyAvatar modelName " + MyAvatar.getFullAvatarModelName()) - console.log("Application : " + ApplicationInterface) ApplicationInterface.fullAvatarURLChanged.connect(processNewAvatar); } diff --git a/interface/resources/qml/dialogs/preferences/BrowsablePreference.qml b/interface/resources/qml/dialogs/preferences/BrowsablePreference.qml index 2cf50891c9..6008e9ea3f 100644 --- a/interface/resources/qml/dialogs/preferences/BrowsablePreference.qml +++ b/interface/resources/qml/dialogs/preferences/BrowsablePreference.qml @@ -70,7 +70,6 @@ Preference { dir: fileDialogHelper.pathToUrl(preference.value) }); browser.selectedFile.connect(function(fileUrl){ - console.log(fileUrl); dataTextField.text = fileDialogHelper.urlToPath(fileUrl); }); } diff --git a/interface/resources/qml/hifi/AssetServer.qml b/interface/resources/qml/hifi/AssetServer.qml index 1a7f5bac40..ea4dbe3233 100644 --- a/interface/resources/qml/hifi/AssetServer.qml +++ b/interface/resources/qml/hifi/AssetServer.qml @@ -81,16 +81,14 @@ Windows.ScrollingWindow { } function doDeleteFile(paths) { - console.log("Deleting " + paths); - Assets.deleteMappings(paths, function(err) { if (err) { - console.log("Asset browser - error deleting paths: ", paths, err); + console.log("Asset browser - error deleting paths: ", err); - box = errorMessageBox("There was an error deleting:\n" + paths + "\n" + err); + box = errorMessageBox("There was an error deleting:\n" + err); box.selected.connect(reload); } else { - console.log("Asset browser - finished deleting paths: ", paths); + console.log("Asset browser - finished deleting paths"); reload(); } }); @@ -117,11 +115,11 @@ Windows.ScrollingWindow { Assets.renameMapping(oldPath, newPath, function(err) { if (err) { - console.log("Asset browser - error renaming: ", oldPath, "=>", newPath, " - error ", err); + console.log("Asset browser - error renaming:", err); box = errorMessageBox("There was an error renaming:\n" + oldPath + " to " + newPath + "\n" + err); box.selected.connect(reload); } else { - console.log("Asset browser - finished rename: ", oldPath, "=>", newPath); + console.log("Asset browser - finished rename"); } reload(); @@ -280,7 +278,7 @@ Windows.ScrollingWindow { gravity = Vec3.multiply(Vec3.fromPolar(Math.PI / 2, 0), 0); } - print("Asset browser - adding asset " + url + " (" + name + ") to world."); + print("Asset browser - adding asset " + name + " to world."); // Entities.addEntity doesn't work from QML, so we use this. Entities.addModelEntity(name, url, "", shapeType, dynamic, collisionless, grabbable, addPosition, gravity); @@ -426,7 +424,7 @@ Windows.ScrollingWindow { uploadProgressLabel.text = "In progress..."; }, function(err, path) { - print(err, path); + print(err); if (err === "") { uploadProgressLabel.text = "Upload Complete"; timer.interval = 1000; @@ -437,7 +435,7 @@ Windows.ScrollingWindow { uploadOpen = false; }); timer.start(); - console.log("Asset Browser - finished uploading: ", fileUrl); + console.log("Asset Browser - finished uploading"); reload(); } else { uploadSpinner.visible = false; @@ -445,7 +443,7 @@ Windows.ScrollingWindow { uploadOpen = false; if (err !== -1) { - console.log("Asset Browser - error uploading: ", fileUrl, " - error ", err); + console.log("Asset Browser - error uploading:", err); var box = errorMessageBox("There was an error uploading:\n" + fileUrl + "\n" + err); box.selected.connect(reload); } diff --git a/interface/resources/qml/hifi/AvatarApp.qml b/interface/resources/qml/hifi/AvatarApp.qml index aea5931627..62d073a96c 100644 --- a/interface/resources/qml/hifi/AvatarApp.qml +++ b/interface/resources/qml/hifi/AvatarApp.qml @@ -62,7 +62,7 @@ Rectangle { } } catch(err) { - console.error(err); + //console.error(err); } } } diff --git a/interface/resources/qml/hifi/Card.qml b/interface/resources/qml/hifi/Card.qml index 83bf1e2c54..3ca4f23b55 100644 --- a/interface/resources/qml/hifi/Card.qml +++ b/interface/resources/qml/hifi/Card.qml @@ -133,7 +133,7 @@ Item { } onStatusChanged: { if (status == Image.Error) { - console.log("source: " + source + ": failed to load " + hifiUrl); + console.log("source: " + source + ": failed to load"); source = defaultThumbnail; } } diff --git a/interface/resources/qml/hifi/Desktop.qml b/interface/resources/qml/hifi/Desktop.qml index 4d342fe775..29f83bd8fc 100644 --- a/interface/resources/qml/hifi/Desktop.qml +++ b/interface/resources/qml/hifi/Desktop.qml @@ -103,19 +103,14 @@ OriginalDesktop.Desktop { property bool autoAdd: false function initWebviewProfileHandlers(profile) { - console.log("The webview url in desktop is: " + currentUrl); downloadUrl = currentUrl; if (webViewProfileSetup) return; webViewProfileSetup = true; profile.downloadRequested.connect(function(download){ - console.log("Download start: " + download.state); adaptedPath = File.convertUrlToPath(downloadUrl); tempDir = File.getTempDir(); - console.log("Temp dir created: " + tempDir); download.path = tempDir + "/" + adaptedPath; - console.log("Path where object should download: " + download.path); - console.log("Auto add: " + autoAdd); download.accept(); if (download.state === WebEngineDownloadItem.DownloadInterrupted) { console.log("download failed to complete"); diff --git a/interface/resources/qml/hifi/Pal.qml b/interface/resources/qml/hifi/Pal.qml index 1384cb8711..447751feda 100644 --- a/interface/resources/qml/hifi/Pal.qml +++ b/interface/resources/qml/hifi/Pal.qml @@ -1287,7 +1287,7 @@ Rectangle { connectionsOnlineDot.visible = message.shouldShowDot; break; default: - console.log('Unrecognized message:', JSON.stringify(message)); + console.log('Pal.qml: Unrecognized message'); } } function sortModel() { diff --git a/interface/resources/qml/hifi/RootHttpRequest.qml b/interface/resources/qml/hifi/RootHttpRequest.qml index 0355626996..b1397dfcbf 100644 --- a/interface/resources/qml/hifi/RootHttpRequest.qml +++ b/interface/resources/qml/hifi/RootHttpRequest.qml @@ -20,7 +20,7 @@ Item { // Public function for initiating an http request. // REQUIRES parent to be root to have sendToScript! function request(options, callback) { - console.debug('HttpRequest', JSON.stringify(options)); + console.debug('HttpRequest'); httpCalls[httpCounter] = callback; var message = {method: 'http.request', params: options, id: httpCounter++, jsonrpc: "2.0"}; parent.sendToScript(message); @@ -33,7 +33,7 @@ Item { return; } delete httpCalls[message.id]; - console.debug('HttpRequest response', JSON.stringify(message)); + console.debug('HttpRequest response'); callback(message.error, message.response); } } diff --git a/interface/resources/qml/hifi/SpectatorCamera.qml b/interface/resources/qml/hifi/SpectatorCamera.qml index 4bf80e410b..b716995730 100644 --- a/interface/resources/qml/hifi/SpectatorCamera.qml +++ b/interface/resources/qml/hifi/SpectatorCamera.qml @@ -362,7 +362,7 @@ Rectangle { spectatorCameraPreview.visible = message.setting; break; default: - console.log('Unrecognized message from spectatorCamera.js:', JSON.stringify(message)); + console.log('Unrecognized message from spectatorCamera.js'); } } signal sendToScript(var message); diff --git a/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml b/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml index 5fff14e4a1..7850a400b3 100644 --- a/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml +++ b/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml @@ -246,7 +246,6 @@ Rectangle { anchors.right: parent.right onLinkActivated: { popup.showSpecifyWearableUrl(function(url) { - console.debug('popup.showSpecifyWearableUrl: ', url); addWearable(root.avatarName, url); modified = true; }); diff --git a/interface/resources/qml/hifi/avatarapp/AvatarThumbnail.qml b/interface/resources/qml/hifi/avatarapp/AvatarThumbnail.qml index 970d132ba6..8582b9249b 100644 --- a/interface/resources/qml/hifi/avatarapp/AvatarThumbnail.qml +++ b/interface/resources/qml/hifi/avatarapp/AvatarThumbnail.qml @@ -29,9 +29,6 @@ Item { when: avatarUrl !== '' value: avatarUrl } - onSourceChanged: { - console.debug('avatarImage: source = ', source); - } visible: avatarImage.status !== Image.Loading && avatarImage.status !== Image.Error } diff --git a/interface/resources/qml/hifi/avatarapp/CreateFavoriteDialog.qml b/interface/resources/qml/hifi/avatarapp/CreateFavoriteDialog.qml index 1387c0791a..14c9fb8837 100644 --- a/interface/resources/qml/hifi/avatarapp/CreateFavoriteDialog.qml +++ b/interface/resources/qml/hifi/avatarapp/CreateFavoriteDialog.qml @@ -96,9 +96,6 @@ Rectangle { AvatarThumbnail { id: avatarThumbnail avatarUrl: avatarImageUrl - onAvatarUrlChanged: { - console.debug('CreateFavoritesDialog: onAvatarUrlChanged: ', avatarUrl); - } wearablesCount: avatarWearablesCount } diff --git a/interface/resources/qml/hifi/avatarapp/MessageBox.qml b/interface/resources/qml/hifi/avatarapp/MessageBox.qml index f111303214..fb6bc765f5 100644 --- a/interface/resources/qml/hifi/avatarapp/MessageBox.qml +++ b/interface/resources/qml/hifi/avatarapp/MessageBox.qml @@ -17,9 +17,6 @@ Rectangle { property alias dialogButtons: buttons property string imageSource: null - onImageSourceChanged: { - console.debug('imageSource = ', imageSource) - } property string button1color: hifi.buttons.noneBorderlessGray; property string button1text: '' diff --git a/interface/resources/qml/hifi/commerce/checkout/Checkout.qml b/interface/resources/qml/hifi/commerce/checkout/Checkout.qml index 271aab87d1..a1f9d5a447 100644 --- a/interface/resources/qml/hifi/commerce/checkout/Checkout.qml +++ b/interface/resources/qml/hifi/commerce/checkout/Checkout.qml @@ -1086,7 +1086,7 @@ Rectangle { refreshBuyUI(); break; default: - console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message)); + console.log('Checkout.qml: Unrecognized message from marketplaces.js'); } } signal sendToScript(var message); diff --git a/interface/resources/qml/hifi/commerce/common/sendAsset/SendAsset.qml b/interface/resources/qml/hifi/commerce/common/sendAsset/SendAsset.qml index bb4bb624bc..96114720e0 100644 --- a/interface/resources/qml/hifi/commerce/common/sendAsset/SendAsset.qml +++ b/interface/resources/qml/hifi/commerce/common/sendAsset/SendAsset.qml @@ -1867,7 +1867,7 @@ Item { sendAssetStep.selectedRecipientUserName = message.userName; break; default: - console.log('SendAsset: Unrecognized message from wallet.js:', JSON.stringify(message)); + console.log('SendAsset: Unrecognized message from wallet.js'); } } signal sendSignalToParent(var msg); diff --git a/interface/resources/qml/hifi/commerce/inspectionCertificate/InspectionCertificate.qml b/interface/resources/qml/hifi/commerce/inspectionCertificate/InspectionCertificate.qml index 885838a26e..f495b26e36 100644 --- a/interface/resources/qml/hifi/commerce/inspectionCertificate/InspectionCertificate.qml +++ b/interface/resources/qml/hifi/commerce/inspectionCertificate/InspectionCertificate.qml @@ -597,7 +597,7 @@ Rectangle { resetCert(true); break; default: - console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message)); + console.log('InspectionCertificate.qml: Unrecognized message from marketplaces.js'); } } signal sendToScript(var message); diff --git a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml index e7b541b350..e0b93a83bb 100644 --- a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml +++ b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml @@ -1009,7 +1009,7 @@ Rectangle { try { // Not all calls to onFileOpenChanged() connect an event. Window.browseChanged.disconnect(onFileOpenChanged); } catch (e) { - console.log('Purchases.qml ignoring', e); + console.log('Purchases.qml ignoring'); } if (filename) { Commerce.installApp(filename); @@ -1070,7 +1070,7 @@ Rectangle { http.handleHttpResponse(message); break; default: - console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message)); + console.log('Purchases.qml: Unrecognized message from marketplaces.js'); } } signal sendToScript(var message); diff --git a/interface/resources/qml/hifi/commerce/wallet/Help.qml b/interface/resources/qml/hifi/commerce/wallet/Help.qml index 575edfc34d..bba830e4dd 100644 --- a/interface/resources/qml/hifi/commerce/wallet/Help.qml +++ b/interface/resources/qml/hifi/commerce/wallet/Help.qml @@ -250,7 +250,7 @@ At the moment, there is currently no way to convert HFC to other currencies. Sta function fromScript(message) { switch (message.method) { default: - console.log('Unrecognized message from wallet.js:', JSON.stringify(message)); + console.log('Help.qml: Unrecognized message from wallet.js'); } } signal sendSignalToWallet(var msg); diff --git a/interface/resources/qml/hifi/commerce/wallet/NeedsLogIn.qml b/interface/resources/qml/hifi/commerce/wallet/NeedsLogIn.qml index 03af964830..78670879dd 100644 --- a/interface/resources/qml/hifi/commerce/wallet/NeedsLogIn.qml +++ b/interface/resources/qml/hifi/commerce/wallet/NeedsLogIn.qml @@ -183,7 +183,7 @@ Item { function fromScript(message) { switch (message.method) { default: - console.log('Unrecognized message from wallet.js:', JSON.stringify(message)); + console.log('NeedsLogIn.qml: Unrecognized message from wallet.js'); } } signal sendSignalToWallet(var msg); diff --git a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml index f44e715703..5460e00e3e 100644 --- a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml +++ b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml @@ -799,7 +799,7 @@ Rectangle { } break; default: - console.log('Unrecognized message from wallet.js:', JSON.stringify(message)); + console.log('Wallet.qml: Unrecognized message from wallet.js'); } } signal sendToScript(var message); diff --git a/interface/resources/qml/hifi/dialogs/RunningScripts.qml b/interface/resources/qml/hifi/dialogs/RunningScripts.qml index 9a180a66f6..18ee90ce85 100644 --- a/interface/resources/qml/hifi/dialogs/RunningScripts.qml +++ b/interface/resources/qml/hifi/dialogs/RunningScripts.qml @@ -130,17 +130,14 @@ ScrollingWindow { } function loadScript(script) { - console.log("Load script " + script); scripts.loadOneScript(script); } function reloadScript(script) { - console.log("Reload script " + script); scripts.stopScript(script, true); } function stopScript(script) { - console.log("Stop script " + script); scripts.stopScript(script); } diff --git a/interface/resources/qml/hifi/dialogs/TabletAssetServer.qml b/interface/resources/qml/hifi/dialogs/TabletAssetServer.qml index 0eeb252049..7bdbfca096 100644 --- a/interface/resources/qml/hifi/dialogs/TabletAssetServer.qml +++ b/interface/resources/qml/hifi/dialogs/TabletAssetServer.qml @@ -81,16 +81,16 @@ Rectangle { } function doDeleteFile(paths) { - console.log("Deleting " + paths); + console.log("Deleting paths"); Assets.deleteMappings(paths, function(err) { if (err) { - console.log("Asset browser - error deleting paths: ", paths, err); + console.log("Asset browser - error deleting paths: ", err); - box = errorMessageBox("There was an error deleting:\n" + paths + "\n" + err); + box = errorMessageBox("There was an error deleting:\n" + err); box.selected.connect(reload); } else { - console.log("Asset browser - finished deleting paths: ", paths); + console.log("Asset browser - finished deleting paths"); reload(); } }); @@ -113,15 +113,10 @@ Rectangle { box.selected.connect(reload); } - console.log("Asset browser - renaming " + oldPath + " to " + newPath); - Assets.renameMapping(oldPath, newPath, function(err) { if (err) { - console.log("Asset browser - error renaming: ", oldPath, "=>", newPath, " - error ", err); box = errorMessageBox("There was an error renaming:\n" + oldPath + " to " + newPath + "\n" + err); box.selected.connect(reload); - } else { - console.log("Asset browser - finished rename: ", oldPath, "=>", newPath); } reload(); @@ -280,7 +275,7 @@ Rectangle { gravity = Vec3.multiply(Vec3.fromPolar(Math.PI / 2, 0), 0); } - print("Asset browser - adding asset " + url + " (" + name + ") to world."); + print("Asset browser - adding asset " + name + " to world."); // Entities.addEntity doesn't work from QML, so we use this. Entities.addModelEntity(name, url, "", shapeType, dynamic, collisionless, grabbable, addPosition, gravity); @@ -426,7 +421,7 @@ Rectangle { uploadProgressLabel.text = "In progress..."; }, function(err, path) { - print(err, path); + print(err); if (err === "") { uploadProgressLabel.text = "Upload Complete"; timer.interval = 1000; @@ -437,7 +432,6 @@ Rectangle { uploadOpen = false; }); timer.start(); - console.log("Asset Browser - finished uploading: ", fileUrl); reload(); } else { uploadSpinner.visible = false; @@ -445,7 +439,7 @@ Rectangle { uploadOpen = false; if (err !== -1) { - console.log("Asset Browser - error uploading: ", fileUrl, " - error ", err); + console.log("Asset Browser - error uploading:", err); var box = errorMessageBox("There was an error uploading:\n" + fileUrl + "\n" + err); box.selected.connect(reload); } diff --git a/interface/resources/qml/hifi/dialogs/TabletRunningScripts.qml b/interface/resources/qml/hifi/dialogs/TabletRunningScripts.qml index 018c8f5737..7f67fdfe42 100644 --- a/interface/resources/qml/hifi/dialogs/TabletRunningScripts.qml +++ b/interface/resources/qml/hifi/dialogs/TabletRunningScripts.qml @@ -116,17 +116,14 @@ Rectangle { } function loadScript(script) { - console.log("Load script " + script); scripts.loadOneScript(script); } function reloadScript(script) { - console.log("Reload script " + script); scripts.stopScript(script, true); } function stopScript(script) { - console.log("Stop script " + script); scripts.stopScript(script); } @@ -154,7 +151,6 @@ Rectangle { console.log("Stop all scripts"); for (var index = 0; index < runningScriptsModel.count; index++) { var url = runningScriptsModel.get(index).url; - console.log(url); var fileName = url.substring(url.lastIndexOf('/')+1); if (canEditScript(fileName)) { scripts.stopScript(url); diff --git a/interface/resources/qml/hifi/models/PSFListModel.qml b/interface/resources/qml/hifi/models/PSFListModel.qml index 71b253fb27..b9006bc57c 100644 --- a/interface/resources/qml/hifi/models/PSFListModel.qml +++ b/interface/resources/qml/hifi/models/PSFListModel.qml @@ -130,9 +130,9 @@ ListModel { // Check consistency and call processPage. function handlePage(error, response, cb) { var processed; - console.debug('handlePage', listModelName, additionalFirstPageRequested, error, JSON.stringify(response)); + console.debug('handlePage', listModelName, additionalFirstPageRequested, error); function fail(message) { - console.warn("Warning page fail", listModelName, JSON.stringify(message)); + console.warn("Warning page fail", listModelName); currentPageToRetrieve = -1; requestPending = false; delayedClear = false; diff --git a/interface/resources/qml/hifi/tablet/EditTabView.qml b/interface/resources/qml/hifi/tablet/EditTabView.qml index bf7dd3e66b..f180cf4466 100644 --- a/interface/resources/qml/hifi/tablet/EditTabView.qml +++ b/interface/resources/qml/hifi/tablet/EditTabView.qml @@ -285,7 +285,7 @@ TabBar { selectTab(message.params.id); break; default: - console.warn('Unrecognized message:', JSON.stringify(message)); + console.warn('EditTabView.qml: Unrecognized message'); } } diff --git a/interface/resources/qml/hifi/tablet/EditToolsTabView.qml b/interface/resources/qml/hifi/tablet/EditToolsTabView.qml index 13b1caf8fb..24a586c606 100644 --- a/interface/resources/qml/hifi/tablet/EditToolsTabView.qml +++ b/interface/resources/qml/hifi/tablet/EditToolsTabView.qml @@ -276,7 +276,7 @@ TabBar { selectTab(message.params.id); break; default: - console.warn('Unrecognized message:', JSON.stringify(message)); + console.warn('EditToolsTabView.qml: Unrecognized message'); } } diff --git a/interface/resources/qml/hifi/tablet/tabletWindows/TabletFileDialog.qml b/interface/resources/qml/hifi/tablet/tabletWindows/TabletFileDialog.qml index 871d1c92a9..f4d6a0f6cc 100644 --- a/interface/resources/qml/hifi/tablet/tabletWindows/TabletFileDialog.qml +++ b/interface/resources/qml/hifi/tablet/tabletWindows/TabletFileDialog.qml @@ -68,8 +68,6 @@ Rectangle { signal canceled(); Component.onCompleted: { - console.log("Helper " + helper + " drives " + drives); - fileDialogItem.keyboardEnabled = HMD.active; // HACK: The following lines force the model to initialize properly such that the go-up button @@ -762,7 +760,6 @@ Rectangle { } } - console.log("Selecting " + selection) selectedFile(selection); //root.destroy(); } diff --git a/interface/resources/qml/hifi/tablet/tabletWindows/preferences/TabletBrowsablePreference.qml b/interface/resources/qml/hifi/tablet/tabletWindows/preferences/TabletBrowsablePreference.qml index 8c0e934971..9c767948b8 100644 --- a/interface/resources/qml/hifi/tablet/tabletWindows/preferences/TabletBrowsablePreference.qml +++ b/interface/resources/qml/hifi/tablet/tabletWindows/preferences/TabletBrowsablePreference.qml @@ -72,7 +72,6 @@ Preference { }); browser.selectedFile.connect(function(fileUrl){ - console.log(fileUrl); dataTextField.text = fileDialogHelper.urlToPath(fileUrl); }); diff --git a/scripts/developer/libraries/utils.js b/scripts/developer/libraries/utils.js index 0da9703c87..3f461b13b0 100644 --- a/scripts/developer/libraries/utils.js +++ b/scripts/developer/libraries/utils.js @@ -68,7 +68,6 @@ getEntityUserData = function(id) { results = JSON.parse(properties.userData); } catch(err) { logDebug(err); - logDebug(properties.userData); } } return results ? results : {}; diff --git a/scripts/developer/tests/dynamics/dynamicsTests.js b/scripts/developer/tests/dynamics/dynamicsTests.js index db089f09ee..a23c46744b 100644 --- a/scripts/developer/tests/dynamics/dynamicsTests.js +++ b/scripts/developer/tests/dynamics/dynamicsTests.js @@ -693,7 +693,6 @@ } function onWebEventReceived(eventString) { - print("received web event: " + JSON.stringify(eventString)); if (typeof eventString === "string") { var event; try { diff --git a/scripts/developer/tests/entitySpawnTool.js b/scripts/developer/tests/entitySpawnTool.js index d88933b867..a83a1f8d73 100644 --- a/scripts/developer/tests/entitySpawnTool.js +++ b/scripts/developer/tests/entitySpawnTool.js @@ -33,7 +33,6 @@ ENTITY_SPAWNER = function (properties) { function makeEntity(properties) { var entity = Entities.addEntity(properties); - // print("spawning entity: " + JSON.stringify(properties)); return { update: function (properties) { diff --git a/scripts/developer/tests/loadedMachine.js b/scripts/developer/tests/loadedMachine.js index 375e3d8004..41ad98518d 100644 --- a/scripts/developer/tests/loadedMachine.js +++ b/scripts/developer/tests/loadedMachine.js @@ -37,7 +37,7 @@ var scripts = scriptData.filter(function (datum) { return datum.name !== 'defaul // If defaultScripts.js is running, we leave it running, because restarting it safely is a mess. var otherScripts = scripts.filter(function (path) { return path !== thisPath; }); var numberLeftRunning = scriptData.length - otherScripts.length; -print('initially running', otherScripts.length, 'scripts. Leaving', numberLeftRunning, 'and stopping', otherScripts); +print('initially running', otherScripts.length, 'scripts. Leaving', numberLeftRunning, 'and stopping otherScripts'); var typedEntities = {Light: [], ParticleEffect: []}; var interestingTypes = Object.keys(typedEntities); var propertiedEntities = {dynamic: []}; diff --git a/scripts/developer/tests/performance/crowd-agent.js b/scripts/developer/tests/performance/crowd-agent.js index 9db4a112f3..a76ed620eb 100644 --- a/scripts/developer/tests/performance/crowd-agent.js +++ b/scripts/developer/tests/performance/crowd-agent.js @@ -132,7 +132,7 @@ function messageHandler(channel, messageString, senderID) { try { message = JSON.parse(messageString); } catch (e) { - print(e); + } switch (message.key) { case "HELO": diff --git a/scripts/developer/tests/performance/domain-check.js b/scripts/developer/tests/performance/domain-check.js index 398bc4fd0a..c715a2ada8 100644 --- a/scripts/developer/tests/performance/domain-check.js +++ b/scripts/developer/tests/performance/domain-check.js @@ -107,7 +107,7 @@ function messageHandler(channel, messageString, senderID) { try { message = JSON.parse(messageString); } catch (e) { - print(e); + } switch (message.key) { case "hello": @@ -149,7 +149,7 @@ function messageHandler(channel, messageString, senderID) { Window.alert("Someone else is summoning avatars."); break; default: - print("crowd-agent received unrecognized message:", messageString); + print("crowd-agent received unrecognized message"); } } Messages.subscribe(MESSAGE_CHANNEL); diff --git a/scripts/developer/tests/performance/summon.js b/scripts/developer/tests/performance/summon.js index 8e888fe9bc..663a549a2a 100644 --- a/scripts/developer/tests/performance/summon.js +++ b/scripts/developer/tests/performance/summon.js @@ -73,7 +73,7 @@ function messageHandler(channel, messageString, senderID) { try { message = JSON.parse(messageString); } catch (e) { - print(e); + } switch (message.key) { case "hello": @@ -121,7 +121,7 @@ function messageHandler(channel, messageString, senderID) { Window.alert("Someone else is summoning avatars."); break; default: - print("crowd summon.js received unrecognized message:", messageString); + print("crowd summon.js received unrecognized message"); } } Messages.subscribe(MESSAGE_CHANNEL); diff --git a/scripts/developer/tests/unit_tests/assetUnitTests.js b/scripts/developer/tests/unit_tests/assetUnitTests.js index 5d43eaf1de..b9bb66e4d3 100644 --- a/scripts/developer/tests/unit_tests/assetUnitTests.js +++ b/scripts/developer/tests/unit_tests/assetUnitTests.js @@ -327,8 +327,8 @@ describe("Assets", function () { expect(hash).toMatch(IS_ASSET_HASH_REGEX); context.definedHash = hash; // used in later tests context.definedContent = SAMPLE_CONTENTS; - print('context.definedHash = ' + context.definedHash); - print('context.definedContent = ' + context.definedContent); + //print('context.definedHash = ' + context.definedHash); + //print('context.definedContent = ' + context.definedContent); done(); }); }); @@ -339,7 +339,7 @@ describe("Assets", function () { if (error) error += ' ('+JSON.stringify([SAMPLE_FILE_PATH, context.definedHash])+')'; expect(error).toBe(null); context.definedPath = SAMPLE_FILE_PATH; - print('context.definedPath = ' + context.definedPath); + //print('context.definedPath = ' + context.definedPath); done(); }); }); diff --git a/scripts/developer/tests/unit_tests/moduleTests/entity/entityConstructorAPIException.js b/scripts/developer/tests/unit_tests/moduleTests/entity/entityConstructorAPIException.js index bbe694b578..62b861ae8f 100644 --- a/scripts/developer/tests/unit_tests/moduleTests/entity/entityConstructorAPIException.js +++ b/scripts/developer/tests/unit_tests/moduleTests/entity/entityConstructorAPIException.js @@ -2,12 +2,12 @@ // test module method exception being thrown within main constructor (function() { var apiMethod = Script.require('../exceptions/exceptionInFunction.js'); - print(Script.resolvePath(''), "apiMethod", apiMethod); + print("apiMethod", apiMethod); // this next line throws from within apiMethod print(apiMethod()); return { preload: function(uuid) { - print("entityConstructorAPIException::preload -- never seen --", uuid, Script.resolvePath('')); + print("entityConstructorAPIException::preload -- never seen --", uuid); }, }; }); diff --git a/scripts/developer/tests/unit_tests/moduleTests/entity/entityConstructorRequireException.js b/scripts/developer/tests/unit_tests/moduleTests/entity/entityConstructorRequireException.js index 5872bce529..340b7986a0 100644 --- a/scripts/developer/tests/unit_tests/moduleTests/entity/entityConstructorRequireException.js +++ b/scripts/developer/tests/unit_tests/moduleTests/entity/entityConstructorRequireException.js @@ -4,7 +4,7 @@ var mod = Script.require('../exceptions/exception.js'); return { preload: function(uuid) { - print("entityConstructorRequireException::preload (never happens)", uuid, Script.resolvePath(''), mod); + print("entityConstructorRequireException::preload (never happens)", uuid, mod); }, }; }); diff --git a/scripts/developer/tests/unit_tests/moduleTests/entity/entityPreloadAPIError.js b/scripts/developer/tests/unit_tests/moduleTests/entity/entityPreloadAPIError.js index eaee178b0a..2dac86947b 100644 --- a/scripts/developer/tests/unit_tests/moduleTests/entity/entityPreloadAPIError.js +++ b/scripts/developer/tests/unit_tests/moduleTests/entity/entityPreloadAPIError.js @@ -2,12 +2,12 @@ // test module method exception being thrown within preload (function() { var apiMethod = Script.require('../exceptions/exceptionInFunction.js'); - print(Script.resolvePath(''), "apiMethod", apiMethod); + print("apiMethod", apiMethod); return { preload: function(uuid) { // this next line throws from within apiMethod print(apiMethod()); - print("entityPreloadAPIException::preload -- never seen --", uuid, Script.resolvePath('')); + print("entityPreloadAPIException::preload -- never seen --", uuid); }, }; }); diff --git a/scripts/developer/tests/unit_tests/moduleUnitTests.js b/scripts/developer/tests/unit_tests/moduleUnitTests.js index 6810dd8b6d..8dd927a020 100644 --- a/scripts/developer/tests/unit_tests/moduleUnitTests.js +++ b/scripts/developer/tests/unit_tests/moduleUnitTests.js @@ -328,7 +328,6 @@ function instrumentTestrunner() { return base; } var rel = base.replace(/[^\/]+$/, id); - console.info('rel', rel); return require.resolve(rel); }, require: function(mod) { @@ -338,13 +337,13 @@ function instrumentTestrunner() { Script.require.cache = require.cache; Script.require.resolve = function(mod) { if (mod === '.' || /^\.\.($|\/)/.test(mod)) { - throw new Error("Cannot find module '"+mod+"' (is dir)"); + throw new Error("Cannot find module (is dir)"); } var path = require.resolve(mod); // console.info('node-require-reoslved', mod, path); try { if (require('fs').lstatSync(path).isDirectory()) { - throw new Error("Cannot find module '"+path+"' (is directory)"); + throw new Error("Cannot find module (is directory)"); } // console.info('!path', path); } catch (e) { diff --git a/scripts/developer/tests/unit_tests/scriptUnitTests.js b/scripts/developer/tests/unit_tests/scriptUnitTests.js index fa8cb44608..51d7065fdd 100644 --- a/scripts/developer/tests/unit_tests/scriptUnitTests.js +++ b/scripts/developer/tests/unit_tests/scriptUnitTests.js @@ -128,12 +128,12 @@ describe('Script', function () { function run() {} function instrument_testrunner() { if (typeof describe === 'undefined') { - print('instrumenting jasmine', Script.resolvePath('')); + print('instrumenting jasmine'); Script.include('../../libraries/jasmine/jasmine.js'); Script.include('../../libraries/jasmine/hifi-boot.js'); jasmine.getEnv().addReporter({ jasmineDone: Script.stop }); run = function() { - print('executing jasmine', Script.resolvePath('')); + print('executing jasmine'); jasmine.getEnv().execute(); }; } diff --git a/scripts/developer/utilities/render/debugHighlight.js b/scripts/developer/utilities/render/debugHighlight.js index 664af836a9..da6b95746b 100644 --- a/scripts/developer/utilities/render/debugHighlight.js +++ b/scripts/developer/utilities/render/debugHighlight.js @@ -124,7 +124,7 @@ function fromQml(message) { tokens = message.split(' ') - print("Received '"+message+"' from hightlight.qml") + print("Received message from QML") if (tokens[0]=="highlight") { currentSelectionName = tokens[1]; print("Switching to highlight name "+currentSelectionName) diff --git a/scripts/developer/utilities/render/debugTransition.js b/scripts/developer/utilities/render/debugTransition.js index 450b2e3ac9..491905a2ef 100644 --- a/scripts/developer/utilities/render/debugTransition.js +++ b/scripts/developer/utilities/render/debugTransition.js @@ -190,7 +190,6 @@ function fromQml(message) { tokens = message.split('*') - //print("Received '"+message+"' from transition.qml") command = tokens[0].toLowerCase() if (command=="category") { editedCategory = parseInt(tokens[1]) diff --git a/scripts/developer/utilities/render/photobooth/photoboothApp.js b/scripts/developer/utilities/render/photobooth/photoboothApp.js index 154028f091..1d70b2acd1 100644 --- a/scripts/developer/utilities/render/photobooth/photoboothApp.js +++ b/scripts/developer/utilities/render/photobooth/photoboothApp.js @@ -47,7 +47,7 @@ function onWebEventReceived(event) { - print("photobooth.js received a web event:" + event); + print("photobooth.js received a web event"); // Converts the event to a JavasScript Object if (typeof event === "string") { event = JSON.parse(event); diff --git a/scripts/developer/utilities/tests/editEntityStressTest.js b/scripts/developer/utilities/tests/editEntityStressTest.js index 61f10c5d80..14254be56e 100644 --- a/scripts/developer/utilities/tests/editEntityStressTest.js +++ b/scripts/developer/utilities/tests/editEntityStressTest.js @@ -30,7 +30,6 @@ var TEST_ENTITY_NAME = "EntitySpawnTest"; (function () { this.makeEntity = function (properties) { var entity = Entities.addEntity(properties); - // print("spawning entity: " + JSON.stringify(properties)); return { update: function (properties) { diff --git a/scripts/developer/utilities/workload/workload.js b/scripts/developer/utilities/workload/workload.js index bdd33dcc5a..ada3cbbf09 100644 --- a/scripts/developer/utilities/workload/workload.js +++ b/scripts/developer/utilities/workload/workload.js @@ -125,7 +125,6 @@ Script.include("./test_physics_scene.js") function fromQml(message) { - print("fromQml: " + JSON.stringify(message)) switch (message.method) { case "createScene": createScene(); diff --git a/scripts/modules/appUi.js b/scripts/modules/appUi.js index e267293977..3e8e0b1008 100644 --- a/scripts/modules/appUi.js +++ b/scripts/modules/appUi.js @@ -165,7 +165,7 @@ function AppUi(properties) { var urlOfRequest = optionalParams.urlOfRequest; if (error || (response.status !== 'success')) { - print("Error: unable to get", urlOfRequest, error || response.status); + print("Error: unable to complete request from URL. Error:", error || response.status); startNotificationTimer(indexOfRequest); return; } @@ -180,7 +180,7 @@ function AppUi(properties) { } else { notificationData = that.notificationDataProcessPage[indexOfRequest](response); } - console.debug(that.buttonName, that.notificationPollEndpoint[indexOfRequest], + console.debug(that.buttonName, 'truncated notification data for processing:', JSON.stringify(notificationData).substring(0, MAX_LOG_LENGTH_CHARACTERS)); that.notificationPollCallback[indexOfRequest](notificationData); @@ -226,8 +226,6 @@ function AppUi(properties) { } Settings.setValue(settingsKey, currentTimestamp); - console.debug(that.buttonName, 'polling for notifications at endpoint', url); - request({ json: true, uri: url diff --git a/scripts/modules/request.js b/scripts/modules/request.js index 37f3ac0d7b..5464b1bffa 100644 --- a/scripts/modules/request.js +++ b/scripts/modules/request.js @@ -75,9 +75,3 @@ module.exports = { httpRequest.send(options.body || null); } }; - -// =========================================================================================== -// @function - debug logging -function debug() { - print('RequestModule | ' + [].slice.call(arguments).join(' ')); -} diff --git a/scripts/system/avatarapp.js b/scripts/system/avatarapp.js index 44f10396ca..e2f82eccfd 100644 --- a/scripts/system/avatarapp.js +++ b/scripts/system/avatarapp.js @@ -320,7 +320,7 @@ function fromQml(message) { // messages are {method, params}, like json-rpc. See settings = getMyAvatarSettings(); break; default: - print('Unrecognized message from AvatarApp.qml:', JSON.stringify(message)); + print('Unrecognized message from AvatarApp.qml'); } } diff --git a/scripts/system/commerce/wallet.js b/scripts/system/commerce/wallet.js index 9fb336f79c..5e0cdbb94b 100644 --- a/scripts/system/commerce/wallet.js +++ b/scripts/system/commerce/wallet.js @@ -540,7 +540,7 @@ function fromQml(message) { // Handled elsewhere, don't log. break; default: - print('Unrecognized message from QML:', JSON.stringify(message)); + print('wallet.js: Unrecognized message from QML'); } } diff --git a/scripts/system/edit.js b/scripts/system/edit.js index 6425806771..ab2ecfa23e 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -2334,11 +2334,7 @@ var PropertiesTool = function (opts) { return; } var i, properties, dY, diff, newPosition; - if (data.type === "print") { - if (data.message) { - print(data.message); - } - } else if (data.type === "update") { + if (data.type === "update") { selectionManager.saveProperties(); if (selectionManager.selections.length > 1) { for (i = 0; i < selectionManager.selections.length; i++) { @@ -2725,7 +2721,7 @@ entityListTool.webView.webEventReceived.connect(function(data) { try { data = JSON.parse(data); } catch(e) { - print("edit.js: Error parsing JSON: " + e.name + " data " + data); + print("edit.js: Error parsing JSON"); return; } diff --git a/scripts/system/html/js/entityProperties.js b/scripts/system/html/js/entityProperties.js index 78de0d075a..923c336aa1 100644 --- a/scripts/system/html/js/entityProperties.js +++ b/scripts/system/html/js/entityProperties.js @@ -1318,15 +1318,6 @@ var selectedEntityProperties; var lastEntityID = null; var createAppTooltip = new CreateAppTooltip(); -function debugPrint(message) { - EventBridge.emitWebEvent( - JSON.stringify({ - type: "print", - message: message - }) - ); -} - /** * GENERAL PROPERTY/GROUP FUNCTIONS diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index 28451a14cb..1bfa9d4b20 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -546,18 +546,9 @@ data = {}; } - // Extract status message. - if (data.hasOwnProperty("message") && data.message !== null) { - statusMessage = data.message; - console.log("Clara.io FBX: " + statusMessage); - } - // Extract zip file URL. if (data.hasOwnProperty("files") && data.files.length > 0) { zipFileURL = data.files[0].url; - if (zipFileURL.slice(-4) !== ".zip") { - console.log(JSON.stringify(data)); // Data for debugging. - } } } } @@ -587,15 +578,11 @@ var HTTP_OK = 200; if (this.status !== HTTP_OK) { - statusMessage = "Zip file request terminated with " + this.status + " " + this.statusText; - console.log("ERROR: Clara.io FBX: " + statusMessage); EventBridge.emitWebEvent(JSON.stringify({ type: CLARA_IO_STATUS, status: statusMessage })); } else if (zipFileURL.slice(-4) !== ".zip") { - statusMessage = "Error creating zip file for download."; - console.log("ERROR: Clara.io FBX: " + statusMessage + ": " + zipFileURL); EventBridge.emitWebEvent(JSON.stringify({ type: CLARA_IO_STATUS, status: (statusMessage + ": " + zipFileURL) @@ -604,15 +591,12 @@ EventBridge.emitWebEvent(JSON.stringify({ type: CLARA_IO_DOWNLOAD })); - console.log("Clara.io FBX: File download initiated for " + zipFileURL); } xmlHttpRequest = null; } isPreparing = true; - - console.log("Clara.io FBX: Request zip file for " + uuid); EventBridge.emitWebEvent(JSON.stringify({ type: CLARA_IO_STATUS, status: "Initiating download" diff --git a/scripts/system/libraries/connectionUtils.js b/scripts/system/libraries/connectionUtils.js index 166d379330..7b988d3117 100644 --- a/scripts/system/libraries/connectionUtils.js +++ b/scripts/system/libraries/connectionUtils.js @@ -20,7 +20,7 @@ function requestJSON(url, callback) { // callback(data) if successfull. Logs oth uri: url }, function (error, response) { if (error || (response.status !== 'success')) { - print("Error: unable to get", url, error || response.status); + print("Error: unable to get URL", error || response.status); return; } callback(response.data); diff --git a/scripts/system/libraries/entityList.js b/scripts/system/libraries/entityList.js index 585820d32f..ce913031b9 100644 --- a/scripts/system/libraries/entityList.js +++ b/scripts/system/libraries/entityList.js @@ -218,7 +218,7 @@ EntityListTool = function(shouldUseEditTabletApp) { try { data = JSON.parse(data); } catch(e) { - print("entityList.js: Error parsing JSON: " + e.name + " data " + data); + print("entityList.js: Error parsing JSON"); return; } diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index 3bb36d632e..cd92cce922 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -54,7 +54,7 @@ SelectionManager = (function() { try { messageParsed = JSON.parse(message); } catch (err) { - print("ERROR: entitySelectionTool.handleEntitySelectionToolUpdates - got malformed message: " + message); + print("ERROR: entitySelectionTool.handleEntitySelectionToolUpdates - got malformed message"); return; } diff --git a/scripts/system/libraries/utils.js b/scripts/system/libraries/utils.js index f8928dd74a..c0a52a45c6 100644 --- a/scripts/system/libraries/utils.js +++ b/scripts/system/libraries/utils.js @@ -102,7 +102,6 @@ getEntityUserData = function(id) { results = JSON.parse(properties.userData); } catch(err) { logDebug(err); - logDebug(properties.userData); } } return results ? results : {}; diff --git a/scripts/system/marketplaces/marketplaces.js b/scripts/system/marketplaces/marketplaces.js index 8bfd776971..865ee89fe4 100644 --- a/scripts/system/marketplaces/marketplaces.js +++ b/scripts/system/marketplaces/marketplaces.js @@ -653,7 +653,7 @@ var onQmlMessageReceived = function onQmlMessageReceived(message) { case 'giftAsset': break; default: - print('Unrecognized message from Checkout.qml: ' + JSON.stringify(message)); + print('marketplaces.js: Unrecognized message from Checkout.qml'); } }; diff --git a/scripts/system/pal.js b/scripts/system/pal.js index 341ce9ebc8..141ea03330 100644 --- a/scripts/system/pal.js +++ b/scripts/system/pal.js @@ -326,7 +326,7 @@ function fromQml(message) { // messages are {method, params}, like json-rpc. See ui.messagesWaiting(shouldShowDot); break; default: - print('Unrecognized message from Pal.qml:', JSON.stringify(message)); + print('Unrecognized message from Pal.qml'); } } @@ -347,7 +347,7 @@ function requestJSON(url, callback) { // callback(data) if successfull. Logs oth uri: url }, function (error, response) { if (error || (response.status !== 'success')) { - print("Error: unable to get", url, error || response.status); + print("Error: unable to get request", error || response.status); return; } callback(response.data); diff --git a/scripts/system/snapshot.js b/scripts/system/snapshot.js index ed6ff80398..946de6df0f 100644 --- a/scripts/system/snapshot.js +++ b/scripts/system/snapshot.js @@ -261,7 +261,6 @@ function onMessage(message) { } break; case 'removeFromStoryIDsToMaybeDelete': - console.log("Facebook OR Twitter button clicked for story_id " + message.story_id); removeFromStoryIDsToMaybeDelete(message.story_id); break; default: diff --git a/scripts/tutorials/entity_scripts/ambientSound.js b/scripts/tutorials/entity_scripts/ambientSound.js index eab268f9bb..cbd94c22e4 100644 --- a/scripts/tutorials/entity_scripts/ambientSound.js +++ b/scripts/tutorials/entity_scripts/ambientSound.js @@ -71,13 +71,13 @@ try { var data = JSON.parse(props.userData); } catch(e) { - debugPrint("unable to parse userData JSON string: " + props.userData); + debugPrint("unable to parse userData JSON string"); this.cleanup(); return; } if (data.soundURL && !(soundURL === data.soundURL)) { soundURL = data.soundURL; - debugPrint("Read ambient sound URL: " + soundURL); + debugPrint("Read ambient sound URL"); } if (data.range && !(range === data.range)) { range = data.range; @@ -113,7 +113,7 @@ ambientSound = SoundCache.getSound(soundURL); } else if (resource.state === Resource.State.FAILED) { resource.stateChanged.disconnect(onStateChanged); - debugPrint("Failed to download ambient sound: " + soundURL); + debugPrint("Failed to download ambient sound"); } } resource.stateChanged.connect(onStateChanged); @@ -151,7 +151,7 @@ var data = JSON.parse(props.userData); data.disabled = !data.disabled; - debugPrint(hint + " -- triggering ambient sound " + (data.disabled ? "OFF" : "ON") + " (" + data.soundURL + ")"); + debugPrint(hint + " -- triggering ambient sound " + (data.disabled ? "OFF" : "ON")); this.cleanup(); @@ -236,7 +236,7 @@ soundOptions.orientation = rotation; soundOptions.volume = volume; if (!soundPlaying && ambientSound && ambientSound.downloaded) { - debugPrint("Starting ambient sound: " + soundURL + " (duration: " + ambientSound.duration + ")"); + debugPrint("Starting ambient sound: (duration: " + ambientSound.duration + ")"); soundPlaying = Audio.playSound(ambientSound, soundOptions); } else if (soundPlaying && soundPlaying.playing) { soundPlaying.setOptions(soundOptions); @@ -244,7 +244,7 @@ } else if (soundPlaying && soundPlaying.playing && (distance > range * HYSTERESIS_FRACTION)) { soundPlaying.stop(); soundPlaying = false; - debugPrint("Out of range, stopping ambient sound: " + soundURL); + debugPrint("Out of range, stopping ambient sound"); } }; From cef7000a7278e07986b0ef82cd7a699f91a4b4ce Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Tue, 6 Nov 2018 16:24:32 -0800 Subject: [PATCH 03/13] Case 19754 - Remove logging URLs and related file locations. The goal is to strip out data that can be used by untoward users in copying models, avatars, etc. --- libraries/animation/src/AnimClip.cpp | 2 +- libraries/animation/src/AnimNodeLoader.cpp | 61 ++++++++++--------- libraries/animation/src/AnimationCache.cpp | 6 +- libraries/animation/src/Rig.cpp | 4 +- libraries/audio/src/Sound.cpp | 8 +-- libraries/audio/src/SoundCache.cpp | 1 - .../src/avatars-renderer/Avatar.cpp | 10 +-- libraries/avatars/src/AvatarData.cpp | 1 - .../src/AmbientLightPropertyGroup.cpp | 1 - .../entities/src/AnimationPropertyGroup.cpp | 1 - libraries/entities/src/EntityEditFilters.cpp | 11 ++-- libraries/fbx/src/FBXReader.cpp | 2 - libraries/fbx/src/GLTFReader.cpp | 11 ---- libraries/fbx/src/GLTFReader.h | 3 - libraries/gpu/src/gpu/Texture_ktx.cpp | 8 +-- libraries/image/src/image/Image.cpp | 6 +- .../src/model-networking/ModelCache.cpp | 4 -- .../src/model-networking/TextureCache.cpp | 24 +------- libraries/networking/src/AssetClient.cpp | 3 +- .../networking/src/AssetResourceRequest.cpp | 3 - libraries/networking/src/AssetUpload.cpp | 4 -- libraries/networking/src/AssetUtils.cpp | 5 -- .../networking/src/FileResourceRequest.cpp | 3 - .../networking/src/HTTPResourceRequest.cpp | 2 +- libraries/networking/src/MappingRequest.cpp | 3 - libraries/networking/src/ResourceCache.cpp | 15 ++--- libraries/octree/src/Octree.cpp | 5 -- libraries/octree/src/OctreeDataUtils.cpp | 1 - libraries/octree/src/OctreePersistThread.cpp | 2 - .../procedural/src/procedural/Procedural.cpp | 2 - .../src/AssetScriptingInterface.cpp | 4 -- libraries/script-engine/src/BatchLoader.cpp | 4 -- .../src/FileScriptingInterface.cpp | 11 +--- libraries/script-engine/src/ScriptCache.cpp | 18 ++---- libraries/script-engine/src/ScriptEngine.cpp | 29 ++++----- libraries/script-engine/src/ScriptEngines.cpp | 7 +-- 36 files changed, 84 insertions(+), 201 deletions(-) diff --git a/libraries/animation/src/AnimClip.cpp b/libraries/animation/src/AnimClip.cpp index eeac8fadce..9dcf5822cd 100644 --- a/libraries/animation/src/AnimClip.cpp +++ b/libraries/animation/src/AnimClip.cpp @@ -110,7 +110,7 @@ void AnimClip::copyFromNetworkAnim() { for (int i = 0; i < animJointCount; i++) { int skeletonJoint = _skeleton->nameToJointIndex(animSkeleton.getJointName(i)); if (skeletonJoint == -1) { - qCWarning(animation) << "animation contains joint =" << animSkeleton.getJointName(i) << " which is not in the skeleton, url =" << _url; + qCWarning(animation) << "animation contains joint =" << animSkeleton.getJointName(i) << " which is not in the skeleton"; } jointMap.push_back(skeletonJoint); } diff --git a/libraries/animation/src/AnimNodeLoader.cpp b/libraries/animation/src/AnimNodeLoader.cpp index 34305c3ac6..dfa61e9fea 100644 --- a/libraries/animation/src/AnimNodeLoader.cpp +++ b/libraries/animation/src/AnimNodeLoader.cpp @@ -221,26 +221,26 @@ static NodeProcessFunc animNodeTypeToProcessFunc(AnimNode::Type type) { static AnimNode::Pointer loadNode(const QJsonObject& jsonObj, const QUrl& jsonUrl) { auto idVal = jsonObj.value("id"); if (!idVal.isString()) { - qCCritical(animation) << "AnimNodeLoader, bad string \"id\", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad string \"id\""; return nullptr; } QString id = idVal.toString(); auto typeVal = jsonObj.value("type"); if (!typeVal.isString()) { - qCCritical(animation) << "AnimNodeLoader, bad object \"type\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad object \"type\", id =" << id; return nullptr; } QString typeStr = typeVal.toString(); AnimNode::Type type = stringToAnimNodeType(typeStr); if (type == AnimNode::Type::NumTypes) { - qCCritical(animation) << "AnimNodeLoader, unknown node type" << typeStr << ", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, unknown node type" << typeStr << ", id =" << id; return nullptr; } auto dataValue = jsonObj.value("data"); if (!dataValue.isObject()) { - qCCritical(animation) << "AnimNodeLoader, bad string \"data\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad string \"data\", id =" << id; return nullptr; } auto dataObj = dataValue.toObject(); @@ -263,13 +263,13 @@ static AnimNode::Pointer loadNode(const QJsonObject& jsonObj, const QUrl& jsonUr auto childrenValue = jsonObj.value("children"); if (!childrenValue.isArray()) { - qCCritical(animation) << "AnimNodeLoader, bad array \"children\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad array \"children\", id =" << id; return nullptr; } auto childrenArray = childrenValue.toArray(); for (const auto& childValue : childrenArray) { if (!childValue.isObject()) { - qCCritical(animation) << "AnimNodeLoader, bad object in \"children\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad object in \"children\", id =" << id; return nullptr; } AnimNode::Pointer child = loadNode(childValue.toObject(), jsonUrl); @@ -353,14 +353,14 @@ static AnimNode::Pointer loadBlendLinearMoveNode(const QJsonObject& jsonObj, con std::vector characteristicSpeeds; auto speedsValue = jsonObj.value("characteristicSpeeds"); if (!speedsValue.isArray()) { - qCCritical(animation) << "AnimNodeLoader, bad array \"characteristicSpeeds\" in blendLinearMove node, id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad array \"characteristicSpeeds\" in blendLinearMove node, id =" << id; return nullptr; } auto speedsArray = speedsValue.toArray(); for (const auto& speedValue : speedsArray) { if (!speedValue.isDouble()) { - qCCritical(animation) << "AnimNodeLoader, bad number in \"characteristicSpeeds\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad number in \"characteristicSpeeds\", id =" << id; return nullptr; } float speedVal = (float)speedValue.toDouble(); @@ -434,7 +434,7 @@ static AnimNode::Pointer loadOverlayNode(const QJsonObject& jsonObj, const QStri auto boneSetEnum = stringToBoneSetEnum(boneSet); if (boneSetEnum == AnimOverlay::NumBoneSets) { - qCCritical(animation) << "AnimNodeLoader, unknown bone set =" << boneSet << ", defaulting to \"fullBody\", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, unknown bone set =" << boneSet << ", defaulting to \"fullBody\""; boneSetEnum = AnimOverlay::FullBodyBoneSet; } @@ -470,14 +470,14 @@ static AnimNode::Pointer loadManipulatorNode(const QJsonObject& jsonObj, const Q auto jointsValue = jsonObj.value("joints"); if (!jointsValue.isArray()) { - qCCritical(animation) << "AnimNodeLoader, bad array \"joints\" in controller node, id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad array \"joints\" in controller node, id =" << id; return nullptr; } auto jointsArray = jointsValue.toArray(); for (const auto& jointValue : jointsArray) { if (!jointValue.isObject()) { - qCCritical(animation) << "AnimNodeLoader, bad state object in \"joints\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad state object in \"joints\", id =" << id; return nullptr; } auto jointObj = jointValue.toObject(); @@ -490,13 +490,13 @@ static AnimNode::Pointer loadManipulatorNode(const QJsonObject& jsonObj, const Q AnimManipulator::JointVar::Type jointVarRotationType = stringToAnimManipulatorJointVarType(rotationType); if (jointVarRotationType == AnimManipulator::JointVar::Type::NumTypes) { - qCWarning(animation) << "AnimNodeLoader, bad rotationType in \"joints\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCWarning(animation) << "AnimNodeLoader, bad rotationType in \"joints\", id =" << id; jointVarRotationType = AnimManipulator::JointVar::Type::Default; } AnimManipulator::JointVar::Type jointVarTranslationType = stringToAnimManipulatorJointVarType(translationType); if (jointVarTranslationType == AnimManipulator::JointVar::Type::NumTypes) { - qCWarning(animation) << "AnimNodeLoader, bad translationType in \"joints\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCWarning(animation) << "AnimNodeLoader, bad translationType in \"joints\", id =" << id; jointVarTranslationType = AnimManipulator::JointVar::Type::Default; } @@ -512,14 +512,14 @@ AnimNode::Pointer loadInverseKinematicsNode(const QJsonObject& jsonObj, const QS auto targetsValue = jsonObj.value("targets"); if (!targetsValue.isArray()) { - qCCritical(animation) << "AnimNodeLoader, bad array \"targets\" in inverseKinematics node, id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad array \"targets\" in inverseKinematics node, id =" << id; return nullptr; } auto targetsArray = targetsValue.toArray(); for (const auto& targetValue : targetsArray) { if (!targetValue.isObject()) { - qCCritical(animation) << "AnimNodeLoader, bad state object in \"targets\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad state object in \"targets\", id =" << id; return nullptr; } auto targetObj = targetValue.toObject(); @@ -536,7 +536,7 @@ AnimNode::Pointer loadInverseKinematicsNode(const QJsonObject& jsonObj, const QS auto flexCoefficientsValue = targetObj.value("flexCoefficients"); if (!flexCoefficientsValue.isArray()) { - qCCritical(animation) << "AnimNodeLoader, bad or missing flexCoefficients array in \"targets\", id =" << id << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad or missing flexCoefficients array in \"targets\", id =" << id; return nullptr; } auto flexCoefficientsArray = flexCoefficientsValue.toArray(); @@ -554,10 +554,11 @@ AnimNode::Pointer loadInverseKinematicsNode(const QJsonObject& jsonObj, const QS AnimInverseKinematics::SolutionSource solutionSourceType = stringToSolutionSourceEnum(solutionSource); if (solutionSourceType != AnimInverseKinematics::SolutionSource::NumSolutionSources) { node->setSolutionSource(solutionSourceType); - } else { - qCWarning(animation) << "AnimNodeLoader, bad solutionSourceType in \"solutionSource\", id = " << id << ", url = " << jsonUrl.toDisplayString(); } } + else { + qCWarning(animation) << "AnimNodeLoader, bad solutionSourceType in \"solutionSource\", id = " << id; + } READ_OPTIONAL_STRING(solutionSourceVar, jsonObj); @@ -622,7 +623,7 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj, auto statesValue = jsonObj.value("states"); if (!statesValue.isArray()) { - qCCritical(animation) << "AnimNodeLoader, bad array \"states\" in stateMachine node, id =" << nodeId << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad array \"states\" in stateMachine node, id =" << nodeId; return false; } @@ -641,7 +642,7 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj, auto statesArray = statesValue.toArray(); for (const auto& stateValue : statesArray) { if (!stateValue.isObject()) { - qCCritical(animation) << "AnimNodeLoader, bad state object in \"states\", id =" << nodeId << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad state object in \"states\", id =" << nodeId; return false; } auto stateObj = stateValue.toObject(); @@ -657,7 +658,7 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj, auto iter = childMap.find(id); if (iter == childMap.end()) { - qCCritical(animation) << "AnimNodeLoader, could not find stateMachine child (state) with nodeId =" << nodeId << "stateId =" << id << "url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, could not find stateMachine child (state) with nodeId =" << nodeId << "stateId =" << id; return false; } @@ -665,7 +666,7 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj, if (!interpType.isEmpty()) { interpTypeEnum = stringToInterpType(interpType); if (interpTypeEnum == AnimStateMachine::InterpType::NumTypes) { - qCCritical(animation) << "AnimNodeLoader, bad interpType on stateMachine state, nodeId = " << nodeId << "stateId =" << id << "url = " << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad interpType on stateMachine state, nodeId = " << nodeId << "stateId =" << id; return false; } } @@ -688,14 +689,14 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj, auto transitionsValue = stateObj.value("transitions"); if (!transitionsValue.isArray()) { - qCritical(animation) << "AnimNodeLoader, bad array \"transitions\" in stateMachine node, stateId =" << id << "nodeId =" << nodeId << "url =" << jsonUrl.toDisplayString(); + qCritical(animation) << "AnimNodeLoader, bad array \"transitions\" in stateMachine node, stateId =" << id << "nodeId =" << nodeId; return false; } auto transitionsArray = transitionsValue.toArray(); for (const auto& transitionValue : transitionsArray) { if (!transitionValue.isObject()) { - qCritical(animation) << "AnimNodeLoader, bad transition object in \"transtions\", stateId =" << id << "nodeId =" << nodeId << "url =" << jsonUrl.toDisplayString(); + qCritical(animation) << "AnimNodeLoader, bad transition object in \"transtions\", stateId =" << id << "nodeId =" << nodeId; return false; } auto transitionObj = transitionValue.toObject(); @@ -714,14 +715,14 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj, if (iter != stateMap.end()) { srcState->addTransition(AnimStateMachine::State::Transition(transition.second.first, iter->second)); } else { - qCCritical(animation) << "AnimNodeLoader, bad state machine transtion from srcState =" << srcState->_id << "dstState =" << transition.second.second << "nodeId =" << nodeId << "url = " << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad state machine transtion from srcState =" << srcState->_id << "dstState =" << transition.second.second << "nodeId =" << nodeId; return false; } } auto iter = stateMap.find(currentState); if (iter == stateMap.end()) { - qCCritical(animation) << "AnimNodeLoader, bad currentState =" << currentState << "could not find child node" << "id =" << nodeId << "url = " << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad currentState =" << currentState << "could not find child node" << "id =" << nodeId; } smNode->setCurrentState(iter->second); @@ -745,7 +746,7 @@ AnimNode::Pointer AnimNodeLoader::load(const QByteArray& contents, const QUrl& j QJsonParseError error; auto doc = QJsonDocument::fromJson(contents, &error); if (error.error != QJsonParseError::NoError) { - qCCritical(animation) << "AnimNodeLoader, failed to parse json, error =" << error.errorString() << ", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, failed to parse json, error =" << error.errorString(); return nullptr; } QJsonObject obj = doc.object(); @@ -753,7 +754,7 @@ AnimNode::Pointer AnimNodeLoader::load(const QByteArray& contents, const QUrl& j // version QJsonValue versionVal = obj.value("version"); if (!versionVal.isString()) { - qCCritical(animation) << "AnimNodeLoader, bad string \"version\", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad string \"version\""; return nullptr; } QString version = versionVal.toString(); @@ -761,14 +762,14 @@ AnimNode::Pointer AnimNodeLoader::load(const QByteArray& contents, const QUrl& j // check version // AJT: TODO version check if (version != "1.0" && version != "1.1") { - qCCritical(animation) << "AnimNodeLoader, bad version number" << version << "expected \"1.0\", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad version number" << version << "expected \"1.0\""; return nullptr; } // root QJsonValue rootVal = obj.value("root"); if (!rootVal.isObject()) { - qCCritical(animation) << "AnimNodeLoader, bad object \"root\", url =" << jsonUrl.toDisplayString(); + qCCritical(animation) << "AnimNodeLoader, bad object \"root\""; return nullptr; } diff --git a/libraries/animation/src/AnimationCache.cpp b/libraries/animation/src/AnimationCache.cpp index 06dfc0262a..501b9e964d 100644 --- a/libraries/animation/src/AnimationCache.cpp +++ b/libraries/animation/src/AnimationCache.cpp @@ -134,15 +134,13 @@ void Animation::downloadFinished(const QByteArray& data) { } void Animation::animationParseSuccess(HFMModel::Pointer hfmModel) { - - qCDebug(animation) << "Animation parse success" << _url.toDisplayString(); - + qCDebug(animation) << "Animation parse success"; _hfmModel = hfmModel; finishedLoading(true); } void Animation::animationParseError(int error, QString str) { - qCCritical(animation) << "Animation failure parsing " << _url.toDisplayString() << "code =" << error << str; + qCCritical(animation) << "Animation parse error, code =" << error << str; emit failed(QNetworkReply::UnknownContentError); finishedLoading(false); } diff --git a/libraries/animation/src/Rig.cpp b/libraries/animation/src/Rig.cpp index c2f909dd24..c0aa85acaa 100644 --- a/libraries/animation/src/Rig.cpp +++ b/libraries/animation/src/Rig.cpp @@ -1829,7 +1829,7 @@ void Rig::initAnimGraph(const QUrl& url) { emit onLoadComplete(); }); connect(_animLoader.get(), &AnimNodeLoader::error, [url](int error, QString str) { - qCritical(animation) << "Error loading" << url.toDisplayString() << "code = " << error << "str =" << str; + qCritical(animation) << "Error loading: code = " << error << "str =" << str; }); connect(_networkLoader.get(), &AnimNodeLoader::success, [this, weakSkeletonPtr, networkUrl](AnimNode::Pointer nodeIn) { @@ -1855,7 +1855,7 @@ void Rig::initAnimGraph(const QUrl& url) { }); connect(_networkLoader.get(), &AnimNodeLoader::error, [networkUrl](int error, QString str) { - qCritical(animation) << "Error loading" << networkUrl.toDisplayString() << "code = " << error << "str =" << str; + qCritical(animation) << "Error loading: code = " << error << "str =" << str; }); } } diff --git a/libraries/audio/src/Sound.cpp b/libraries/audio/src/Sound.cpp index da284f19a3..3807882b00 100644 --- a/libraries/audio/src/Sound.cpp +++ b/libraries/audio/src/Sound.cpp @@ -68,7 +68,7 @@ void Sound::downloadFinished(const QByteArray& data) { void Sound::soundProcessSuccess(QByteArray data, bool stereo, bool ambisonic, float duration) { - qCDebug(audio) << "Setting ready state for sound file" << _url.toDisplayString(); + qCDebug(audio) << "Setting ready state for sound file"; _byteArray = data; _isStereo = stereo; @@ -81,14 +81,14 @@ void Sound::soundProcessSuccess(QByteArray data, bool stereo, bool ambisonic, fl } void Sound::soundProcessError(int error, QString str) { - qCCritical(audio) << "Failed to process sound file" << _url.toDisplayString() << "code =" << error << str; + qCCritical(audio) << "Failed to process sound file: code =" << error << str; emit failed(QNetworkReply::UnknownContentError); finishedLoading(false); } void SoundProcessor::run() { - qCDebug(audio) << "Processing sound file" << _url.toDisplayString(); + qCDebug(audio) << "Processing sound file"; // replace our byte array with the downloaded data QByteArray rawAudioByteArray = QByteArray(_data); @@ -129,7 +129,7 @@ void SoundProcessor::run() { // since it's raw the only way for us to know that is if the file was called .stereo.raw if (fileName.toLower().endsWith("stereo.raw")) { _isStereo = true; - qCDebug(audio) << "Processing sound of" << rawAudioByteArray.size() << "bytes from" << _url << "as stereo audio file."; + qCDebug(audio) << "Processing sound of" << rawAudioByteArray.size() << "bytes as stereo audio file."; } // Process as 48khz RAW file diff --git a/libraries/audio/src/SoundCache.cpp b/libraries/audio/src/SoundCache.cpp index 2877de3d6f..845fd6ab4f 100644 --- a/libraries/audio/src/SoundCache.cpp +++ b/libraries/audio/src/SoundCache.cpp @@ -35,7 +35,6 @@ SharedSoundPointer SoundCache::getSound(const QUrl& url) { QSharedPointer SoundCache::createResource(const QUrl& url, const QSharedPointer& fallback, const void* extra) { - qCDebug(audio) << "Requesting sound at" << url.toString(); auto resource = QSharedPointer(new Sound(url), &Resource::deleter); resource->setLoadPriority(this, SOUNDS_LOADING_PRIORITY); return resource; diff --git a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp index f694148b30..b5bc0b783d 100644 --- a/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp +++ b/libraries/avatars-renderer/src/avatars-renderer/Avatar.cpp @@ -1517,16 +1517,16 @@ void Avatar::setModelURLFinished(bool success) { const int MAX_SKELETON_DOWNLOAD_ATTEMPTS = 4; // NOTE: we don't want to be as generous as ResourceCache is, we only want 4 attempts if (_skeletonModel->getResourceDownloadAttemptsRemaining() <= 0 || _skeletonModel->getResourceDownloadAttempts() > MAX_SKELETON_DOWNLOAD_ATTEMPTS) { - qCWarning(avatars_renderer) << "Using default after failing to load Avatar model: " << _skeletonModelURL - << "after" << _skeletonModel->getResourceDownloadAttempts() << "attempts."; + qCWarning(avatars_renderer) << "Using default after failing to load Avatar model, " + << "after" << _skeletonModel->getResourceDownloadAttempts() << "attempts."; + // call _skeletonModel.setURL, but leave our copy of _skeletonModelURL alone. This is so that // we don't redo this every time we receive an identity packet from the avatar with the bad url. QMetaObject::invokeMethod(_skeletonModel.get(), "setURL", Qt::QueuedConnection, Q_ARG(QUrl, AvatarData::defaultFullAvatarModelUrl())); } else { - qCWarning(avatars_renderer) << "Avatar model: " << _skeletonModelURL - << "failed to load... attempts:" << _skeletonModel->getResourceDownloadAttempts() - << "out of:" << MAX_SKELETON_DOWNLOAD_ATTEMPTS; + qCWarning(avatars_renderer) << "Avatar model failed to load... attempts:" + << _skeletonModel->getResourceDownloadAttempts() << "out of:" << MAX_SKELETON_DOWNLOAD_ATTEMPTS; } } if (success) { diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index c529865b85..d9d4b57c31 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -1999,7 +1999,6 @@ void AvatarData::setSkeletonModelURL(const QUrl& skeletonModelURL) { } _skeletonModelURL = expanded; - qCDebug(avatars) << "Changing skeleton model for avatar" << getSessionUUID() << "to" << _skeletonModelURL.toString(); updateJointMappings(); diff --git a/libraries/entities/src/AmbientLightPropertyGroup.cpp b/libraries/entities/src/AmbientLightPropertyGroup.cpp index dbcb0eef75..38017a684b 100644 --- a/libraries/entities/src/AmbientLightPropertyGroup.cpp +++ b/libraries/entities/src/AmbientLightPropertyGroup.cpp @@ -42,7 +42,6 @@ void AmbientLightPropertyGroup::merge(const AmbientLightPropertyGroup& other) { void AmbientLightPropertyGroup::debugDump() const { qCDebug(entities) << " AmbientLightPropertyGroup: ---------------------------------------------"; qCDebug(entities) << " ambientIntensity:" << getAmbientIntensity(); - qCDebug(entities) << " ambientURL:" << getAmbientURL(); } void AmbientLightPropertyGroup::listChangedProperties(QList& out) { diff --git a/libraries/entities/src/AnimationPropertyGroup.cpp b/libraries/entities/src/AnimationPropertyGroup.cpp index 95bdae43b9..cf031f2d0f 100644 --- a/libraries/entities/src/AnimationPropertyGroup.cpp +++ b/libraries/entities/src/AnimationPropertyGroup.cpp @@ -173,7 +173,6 @@ void AnimationPropertyGroup::setFromOldAnimationSettings(const QString& value) { void AnimationPropertyGroup::debugDump() const { qCDebug(entities) << " AnimationPropertyGroup: ---------------------------------------------"; - qCDebug(entities) << " url:" << getURL() << " has changed:" << urlChanged(); qCDebug(entities) << " fps:" << getFPS() << " has changed:" << fpsChanged(); qCDebug(entities) << "currentFrame:" << getCurrentFrame() << " has changed:" << currentFrameChanged(); qCDebug(entities) << "allowTranslation:" << getAllowTranslation() << " has changed:" << allowTranslationChanged(); diff --git a/libraries/entities/src/EntityEditFilters.cpp b/libraries/entities/src/EntityEditFilters.cpp index 4865c0ba1e..c1afa6cecb 100644 --- a/libraries/entities/src/EntityEditFilters.cpp +++ b/libraries/entities/src/EntityEditFilters.cpp @@ -203,14 +203,13 @@ void EntityEditFilters::addFilter(EntityItemID entityID, QString filterURL) { auto scriptRequest = DependencyManager::get()->createResourceRequest( this, scriptURL, true, -1, "EntityEditFilters::addFilter"); if (!scriptRequest) { - qWarning() << "Could not create ResourceRequest for Entity Edit filter script at" << scriptURL.toString(); + qWarning() << "Could not create ResourceRequest for Entity Edit filter."; scriptRequestFinished(entityID); return; } // Agent.cpp sets up a timeout here, but that is unnecessary, as ResourceRequest has its own. connect(scriptRequest, &ResourceRequest::finished, this, [this, entityID]{ EntityEditFilters::scriptRequestFinished(entityID);} ); // FIXME: handle atp rquests setup here. See Agent::requestScript() - qInfo() << "Requesting script at URL" << qPrintable(scriptRequest->getUrl().toString()); scriptRequest->send(); qDebug() << "script request sent for entity " << entityID; } @@ -223,7 +222,7 @@ static bool hasCorrectSyntax(const QScriptProgram& program) { const auto error = syntaxCheck.errorMessage(); const auto line = QString::number(syntaxCheck.errorLineNumber()); const auto column = QString::number(syntaxCheck.errorColumnNumber()); - const auto message = QString("[SyntaxError] %1 in %2:%3(%4)").arg(error, program.fileName(), line, column); + const auto message = QString("[SyntaxError] %1 in %2(%3)").arg(error, line, column); qCritical() << qPrintable(message); return false; } @@ -236,8 +235,8 @@ static bool hadUncaughtExceptions(QScriptEngine& engine, const QString& fileName const auto line = QString::number(engine.uncaughtExceptionLineNumber()); engine.clearExceptions(); - static const QString SCRIPT_EXCEPTION_FORMAT = "[UncaughtException] %1 in %2:%3"; - auto message = QString(SCRIPT_EXCEPTION_FORMAT).arg(exception, fileName, line); + static const QString SCRIPT_EXCEPTION_FORMAT = "[UncaughtException] %1 on line %2"; + auto message = QString(SCRIPT_EXCEPTION_FORMAT).arg(exception, line); if (!backtrace.empty()) { static const auto lineSeparator = "\n "; message += QString("\n[Backtrace]%1%2").arg(lineSeparator, backtrace.join(lineSeparator)); @@ -376,7 +375,7 @@ void EntityEditFilters::scriptRequestFinished(EntityItemID entityID) { } } else if (scriptRequest) { const QString urlString = scriptRequest->getUrl().toString(); - qCritical() << "Failed to download script at" << urlString; + qCritical() << "Failed to download script"; // See HTTPResourceRequest::onRequestFinished for interpretation of codes. For example, a 404 is code 6 and 403 is 3. A timeout is 2. Go figure. qCritical() << "ResourceRequest error was" << scriptRequest->getResult(); } else { diff --git a/libraries/fbx/src/FBXReader.cpp b/libraries/fbx/src/FBXReader.cpp index 2cf57e54b4..00096cb4c6 100644 --- a/libraries/fbx/src/FBXReader.cpp +++ b/libraries/fbx/src/FBXReader.cpp @@ -2006,7 +2006,5 @@ HFMModel* readFBX(QIODevice* device, const QVariantHash& mapping, const QString& reader._loadLightmaps = loadLightmaps; reader._lightmapLevel = lightmapLevel; - qCDebug(modelformat) << "Reading FBX: " << url; - return reader.extractHFMModel(mapping, url); } diff --git a/libraries/fbx/src/GLTFReader.cpp b/libraries/fbx/src/GLTFReader.cpp index 9cd43ddf08..eb763cce90 100644 --- a/libraries/fbx/src/GLTFReader.cpp +++ b/libraries/fbx/src/GLTFReader.cpp @@ -937,7 +937,6 @@ HFMModel* GLTFReader::readGLTF(QByteArray& data, const QVariantHash& mapping, bool GLTFReader::readBinary(const QString& url, QByteArray& outdata) { QUrl binaryUrl = _url.resolved(url); - qCDebug(modelformat) << "binaryUrl: " << binaryUrl << " OriginalUrl: " << _url; bool success; std::tie(success, outdata) = requestData(binaryUrl); @@ -1006,8 +1005,6 @@ HFMTexture GLTFReader::getHFMTexture(const GLTFTexture& texture) { QString fname = QUrl(url).fileName(); QUrl textureUrl = _url.resolved(url); qCDebug(modelformat) << "fname: " << fname; - qCDebug(modelformat) << "textureUrl: " << textureUrl; - qCDebug(modelformat) << "Url: " << _url; fbxtex.name = fname; fbxtex.filename = textureUrl.toEncoded(); } @@ -1289,14 +1286,6 @@ void GLTFReader::hfmDebugDump(const HFMModel& hfmModel) { qCDebug(modelformat) << " normalTexture =" << mat.normalTexture.filename; qCDebug(modelformat) << " albedoTexture =" << mat.albedoTexture.filename; qCDebug(modelformat) << " opacityTexture =" << mat.opacityTexture.filename; - qCDebug(modelformat) << " glossTexture =" << mat.glossTexture.filename; - qCDebug(modelformat) << " roughnessTexture =" << mat.roughnessTexture.filename; - qCDebug(modelformat) << " specularTexture =" << mat.specularTexture.filename; - qCDebug(modelformat) << " metallicTexture =" << mat.metallicTexture.filename; - qCDebug(modelformat) << " emissiveTexture =" << mat.emissiveTexture.filename; - qCDebug(modelformat) << " occlusionTexture =" << mat.occlusionTexture.filename; - qCDebug(modelformat) << " scatteringTexture =" << mat.scatteringTexture.filename; - qCDebug(modelformat) << " lightmapTexture =" << mat.lightmapTexture.filename; qCDebug(modelformat) << " lightmapParams =" << mat.lightmapParams; diff --git a/libraries/fbx/src/GLTFReader.h b/libraries/fbx/src/GLTFReader.h index 44186504f0..54a9d8d9b6 100644 --- a/libraries/fbx/src/GLTFReader.h +++ b/libraries/fbx/src/GLTFReader.h @@ -361,9 +361,6 @@ struct GLTFImage { int bufferView; //required (or) QMap defined; void dump() { - if (defined["uri"]) { - qCDebug(modelformat) << "uri: " << uri; - } if (defined["mimeType"]) { qCDebug(modelformat) << "mimeType: " << mimeType; } diff --git a/libraries/gpu/src/gpu/Texture_ktx.cpp b/libraries/gpu/src/gpu/Texture_ktx.cpp index 1b7b552078..b400a81a1f 100644 --- a/libraries/gpu/src/gpu/Texture_ktx.cpp +++ b/libraries/gpu/src/gpu/Texture_ktx.cpp @@ -260,7 +260,7 @@ uint16 KtxStorage::minAvailableMipLevel() const { void KtxStorage::assignMipData(uint16 level, const storage::StoragePointer& storage) { if (level != _minMipLevelAvailable - 1) { - qWarning() << "Invalid level to be stored, expected: " << (_minMipLevelAvailable - 1) << ", got: " << level << " " << _filename.c_str(); + qWarning() << "Invalid level to be stored, expected: " << (_minMipLevelAvailable - 1) << ", got: " << level; return; } @@ -271,20 +271,20 @@ void KtxStorage::assignMipData(uint16 level, const storage::StoragePointer& stor auto& imageDesc = _ktxDescriptor->images[level]; if (storage->size() != imageDesc._imageSize) { qWarning() << "Invalid image size: " << storage->size() << ", expected: " << imageDesc._imageSize - << ", level: " << level << ", filename: " << QString::fromStdString(_filename); + << ", level: " << level; return; } std::lock_guard lock(*_cacheFileMutex); auto file = maybeOpenFile(); if (!file) { - qWarning() << "Failed to open file to assign mip data " << QString::fromStdString(_filename); + qWarning() << "Failed to open file to assign mip data "; return; } auto fileData = file->mutableData(); if (!fileData) { - qWarning() << "Failed to get mutable data for " << QString::fromStdString(_filename); + qWarning() << "Failed to get mutable data for "; return; } diff --git a/libraries/image/src/image/Image.cpp b/libraries/image/src/image/Image.cpp index 1355a24bf4..03d1f90499 100644 --- a/libraries/image/src/image/Image.cpp +++ b/libraries/image/src/image/Image.cpp @@ -214,8 +214,6 @@ QImage processRawImageData(QIODevice& content, const std::string& filename) { newImageReader.setDevice(&content); if (newImageReader.canRead()) { - qCWarning(imagelogging) << "Image file" << filename.c_str() << "has extension" << filenameExtension.c_str() - << "but is actually a" << qPrintable(newImageReader.format()) << "(recovering)"; return newImageReader.read(); } } @@ -238,7 +236,7 @@ gpu::TexturePointer processImage(std::shared_ptr content, const std:: // Validate that the image loaded if (imageWidth == 0 || imageHeight == 0 || image.format() == QImage::Format_Invalid) { QString reason(image.format() == QImage::Format_Invalid ? "(Invalid Format)" : "(Size is invalid)"); - qCWarning(imagelogging) << "Failed to load" << filename.c_str() << qPrintable(reason); + qCWarning(imagelogging) << "Failed to load:" << qPrintable(reason); return nullptr; } @@ -250,7 +248,7 @@ gpu::TexturePointer processImage(std::shared_ptr content, const std:: imageWidth = (int)(scaleFactor * (float)imageWidth + 0.5f); imageHeight = (int)(scaleFactor * (float)imageHeight + 0.5f); image = image.scaled(QSize(imageWidth, imageHeight), Qt::IgnoreAspectRatio, Qt::SmoothTransformation); - qCDebug(imagelogging).nospace() << "Downscaled " << filename.c_str() << " (" << + qCDebug(imagelogging).nospace() << "Downscaled " << " (" << QSize(originalWidth, originalHeight) << " to " << QSize(imageWidth, imageHeight) << ")"; } diff --git a/libraries/model-networking/src/model-networking/ModelCache.cpp b/libraries/model-networking/src/model-networking/ModelCache.cpp index 6430e4599e..e033bd8b0e 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.cpp +++ b/libraries/model-networking/src/model-networking/ModelCache.cpp @@ -69,7 +69,6 @@ void GeometryMappingResource::downloadFinished(const QByteArray& data) { QString filename = _mapping.value("filename").toString(); if (filename.isNull()) { - qCDebug(modelnetworking) << "Mapping file" << _url << "has no \"filename\" field"; finishedLoading(false); } else { QUrl url = _url.resolved(filename); @@ -176,7 +175,6 @@ void GeometryReader::run() { }); if (!_resource.data()) { - qCWarning(modelnetworking) << "Abandoning load of" << _url << "; resource was deleted"; return; } @@ -241,8 +239,6 @@ void GeometryReader::run() { } } catch (const QString& error) { - qCDebug(modelnetworking) << "Error parsing model for" << _url << ":" << error; - auto resource = _resource.toStrongRef(); if (resource) { QMetaObject::invokeMethod(resource.data(), "finishedLoading", diff --git a/libraries/model-networking/src/model-networking/TextureCache.cpp b/libraries/model-networking/src/model-networking/TextureCache.cpp index 740af44591..8ee8f31a8f 100644 --- a/libraries/model-networking/src/model-networking/TextureCache.cpp +++ b/libraries/model-networking/src/model-networking/TextureCache.cpp @@ -576,7 +576,6 @@ bool NetworkTexture::handleFailedRequest(ResourceRequest::Result result) { auto newPath = _request->getRelativePathUrl(); if (newPath.fileName().endsWith(".ktx")) { - qDebug() << "Redirecting to" << newPath << "from" << _url; _currentlyLoadingResourceType = ResourceType::KTX; _activeUrl = newPath; _shouldFailOnRedirect = false; @@ -622,7 +621,6 @@ void NetworkTexture::startMipRangeRequest(uint16_t low, uint16_t high) { this, _activeUrl, true, -1, "NetworkTexture::startMipRangeRequest"); if (!_ktxMipRequest) { - qCWarning(networking).noquote() << "Failed to get request for" << _url.toDisplayString(); PROFILE_ASYNC_END(resource, "Resource:" + getType(), QString::number(_requestID)); return; @@ -681,12 +679,6 @@ void NetworkTexture::ktxInitialDataRequestFinished() { if (result == ResourceRequest::Success) { -// This is an expensive operation that we do not want in release. -#ifdef DEBUG - auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString()); - qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_url.toDisplayString(), extraInfo); -#endif - _ktxHeaderData = _ktxHeaderRequest->getData(); _ktxHighMipData = _ktxMipRequest->getData(); handleFinishedInitialLoad(); @@ -731,8 +723,6 @@ void NetworkTexture::ktxMipRequestFinished() { auto result = _ktxMipRequest->getResult(); if (result == ResourceRequest::Success) { - auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString()); - qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_url.toDisplayString(), extraInfo); if (_ktxResourceState == REQUESTING_MIP) { Q_ASSERT(_ktxMipLevelRangeInFlight.first != NULL_MIP_LEVEL); @@ -835,7 +825,6 @@ void NetworkTexture::handleFinishedInitialLoad() { auto header = reinterpret_cast(ktxHeaderData.data()); if (!ktx::checkIdentifier(header->identifier)) { - qWarning() << "Cannot load " << url << ", invalid header identifier"; QMetaObject::invokeMethod(resource.data(), "setImage", Q_ARG(gpu::TexturePointer, nullptr), Q_ARG(int, 0), @@ -845,7 +834,6 @@ void NetworkTexture::handleFinishedInitialLoad() { auto kvSize = header->bytesOfKeyValueData; if (kvSize > (ktxHeaderData.size() - ktx::KTX_HEADER_SIZE)) { - qWarning() << "Cannot load " << url << ", did not receive all kv data with initial request"; QMetaObject::invokeMethod(resource.data(), "setImage", Q_ARG(gpu::TexturePointer, nullptr), Q_ARG(int, 0), @@ -857,7 +845,6 @@ void NetworkTexture::handleFinishedInitialLoad() { auto imageDescriptors = header->generateImageDescriptors(); if (imageDescriptors.size() == 0) { - qWarning(networking) << "Failed to process ktx file " << url; QMetaObject::invokeMethod(resource.data(), "setImage", Q_ARG(gpu::TexturePointer, nullptr), Q_ARG(int, 0), @@ -987,7 +974,6 @@ void NetworkTexture::loadMetaContent(const QByteArray& content) { TextureMeta meta; if (!TextureMeta::deserialize(content, &meta)) { - qWarning() << "Failed to read texture meta from " << _url; return; } @@ -999,7 +985,6 @@ void NetworkTexture::loadMetaContent(const QByteArray& content) { if (backend->supportedTextureFormat(elFormat)) { auto url = pair.second; if (url.fileName().endsWith(TEXTURE_META_EXTENSION)) { - qWarning() << "Found a texture meta URL inside of the texture meta file at" << _activeUrl; continue; } @@ -1044,7 +1029,6 @@ void NetworkTexture::loadMetaContent(const QByteArray& content) { return; } - qWarning() << "Failed to find supported texture type in " << _activeUrl; Resource::handleFailedRequest(ResourceRequest::NotFound); } @@ -1135,7 +1119,6 @@ void ImageReader::run() { void ImageReader::read() { auto resource = _resource.lock(); // to ensure the resource is still needed if (!resource) { - qCWarning(modelnetworking) << "Abandoning load of" << _url << "; could not get strong ref"; return; } auto networkTexture = resource.staticCast(); @@ -1195,7 +1178,6 @@ void ImageReader::read() { texture = image::processImage(std::move(buffer), _url.toString().toStdString(), _maxNumPixels, networkTexture->getTextureType(), shouldCompress, target); if (!texture) { - qCWarning(modelnetworking) << "Could not process:" << _url; QMetaObject::invokeMethod(resource.data(), "setImage", Q_ARG(gpu::TexturePointer, texture), Q_ARG(int, 0), @@ -1217,13 +1199,9 @@ void ImageReader::read() { size_t length = memKtx->_storage->size(); auto& ktxCache = textureCache->_ktxCache; auto file = ktxCache->writeFile(data, KTXCache::Metadata(hash, length)); - if (!file) { - qCWarning(modelnetworking) << _url << "file cache failed"; - } else { + if (file) { texture->setKtxBacking(file); } - } else { - qCWarning(modelnetworking) << "Unable to serialize texture to KTX " << _url; } // We replace the texture with the one stored in the cache. This deals with the possible race condition of two different diff --git a/libraries/networking/src/AssetClient.cpp b/libraries/networking/src/AssetClient.cpp index 0a5c2c46c6..b9a3e6f61e 100644 --- a/libraries/networking/src/AssetClient.cpp +++ b/libraries/networking/src/AssetClient.cpp @@ -225,7 +225,6 @@ MiniPromise::Promise AssetClient::saveToCacheAsync(const QUrl& url, const QByteA if (ioDevice) { ioDevice->write(data); cache->insert(ioDevice); - qCDebug(asset_client) << url.toDisplayString() << "saved to disk cache ("<< data.size()<<" bytes)"; deferred->resolve({ { "url", url }, { "success", true }, @@ -235,7 +234,7 @@ MiniPromise::Promise AssetClient::saveToCacheAsync(const QUrl& url, const QByteA { "lastModified", metaData.lastModified().toString().isEmpty() ? QDateTime() : metaData.lastModified() }, }); } else { - auto error = QString("Could not save %1 to disk cache").arg(url.toDisplayString()); + auto error = QString("Could not save to disk cache"); qCWarning(asset_client) << error; deferred->reject(CACHE_ERROR_MESSAGE.arg(__FUNCTION__).arg(error)); } diff --git a/libraries/networking/src/AssetResourceRequest.cpp b/libraries/networking/src/AssetResourceRequest.cpp index 6f5b13f98d..bc34243c66 100644 --- a/libraries/networking/src/AssetResourceRequest.cpp +++ b/libraries/networking/src/AssetResourceRequest.cpp @@ -218,9 +218,6 @@ void AssetResourceRequest::onDownloadProgress(qint64 bytesReceived, qint64 bytes int percentage = roundf((float) bytesReceived / (float) bytesTotal * 100.0f); - qCDebug(networking).nospace() << "Progress for " << _url.path() << " - " - << bytesReceived << " of " << bytesTotal << " bytes - " << percentage << "%"; - _lastProgressDebug = now; } } diff --git a/libraries/networking/src/AssetUpload.cpp b/libraries/networking/src/AssetUpload.cpp index f1c84e474a..d4dfa6554b 100644 --- a/libraries/networking/src/AssetUpload.cpp +++ b/libraries/networking/src/AssetUpload.cpp @@ -76,10 +76,6 @@ void AssetUpload::start() { // ask the AssetClient to upload the asset and emit the proper signals from the passed callback auto assetClient = DependencyManager::get(); - - if (!_filename.isEmpty()) { - qCDebug(asset_client) << "Attempting to upload" << _filename << "to asset-server."; - } assetClient->uploadAsset(_data, [this](bool responseReceived, AssetUtils::AssetServerError error, const QString& hash){ if (!responseReceived) { diff --git a/libraries/networking/src/AssetUtils.cpp b/libraries/networking/src/AssetUtils.cpp index 8d3d313ff9..6fb914a8b2 100644 --- a/libraries/networking/src/AssetUtils.cpp +++ b/libraries/networking/src/AssetUtils.cpp @@ -67,10 +67,7 @@ QByteArray loadFromCache(const QUrl& url) { // caller is responsible for the deletion of the ioDevice, hence the unique_ptr if (auto ioDevice = std::unique_ptr(cache->data(url))) { - qCDebug(asset_client) << url.toDisplayString() << "loaded from disk cache."; return ioDevice->readAll(); - } else { - qCDebug(asset_client) << url.toDisplayString() << "not in disk cache"; } } @@ -91,10 +88,8 @@ bool saveToCache(const QUrl& url, const QByteArray& file) { if (auto ioDevice = cache->prepare(metaData)) { ioDevice->write(file); cache->insert(ioDevice); - qCDebug(asset_client) << url.toDisplayString() << "saved to disk cache"; return true; } - qCWarning(asset_client) << "Could not save" << url.toDisplayString() << "to disk cache."; } } diff --git a/libraries/networking/src/FileResourceRequest.cpp b/libraries/networking/src/FileResourceRequest.cpp index 1a4096bc02..11489f13bd 100644 --- a/libraries/networking/src/FileResourceRequest.cpp +++ b/libraries/networking/src/FileResourceRequest.cpp @@ -46,9 +46,6 @@ void FileResourceRequest::doSend() { QFileSelector fileSelector; fileSelector.setExtraSelectors(FileUtils::getFileSelectors()); filename = fileSelector.select(filename); - if (filename != originalFilename) { - qCDebug(resourceLog) << "Using" << filename << "instead of" << originalFilename; - } } if (!_byteRange.isValid()) { diff --git a/libraries/networking/src/HTTPResourceRequest.cpp b/libraries/networking/src/HTTPResourceRequest.cpp index a34f92aaa6..e26f27adcf 100644 --- a/libraries/networking/src/HTTPResourceRequest.cpp +++ b/libraries/networking/src/HTTPResourceRequest.cpp @@ -208,7 +208,7 @@ void HTTPResourceRequest::onDownloadProgress(qint64 bytesReceived, qint64 bytesT } void HTTPResourceRequest::onTimeout() { - qDebug() << "Timeout: " << _url << ":" << _reply->isFinished(); + qDebug() << "Timeout: " << _reply->isFinished(); Q_ASSERT(_state == InProgress); _reply->disconnect(this); _reply->abort(); diff --git a/libraries/networking/src/MappingRequest.cpp b/libraries/networking/src/MappingRequest.cpp index 96f4b63c59..263f8d023c 100644 --- a/libraries/networking/src/MappingRequest.cpp +++ b/libraries/networking/src/MappingRequest.cpp @@ -96,9 +96,6 @@ void GetMappingRequest::doStart() { // if it did grab that re-directed path if (_wasRedirected) { _redirectedPath = message->readString(); - qDebug() << "Got redirected from " << _path << " to " << _redirectedPath; - } else { - qDebug() << "Not redirected: " << _path; } } diff --git a/libraries/networking/src/ResourceCache.cpp b/libraries/networking/src/ResourceCache.cpp index 7aad8d468a..76d1de4b47 100644 --- a/libraries/networking/src/ResourceCache.cpp +++ b/libraries/networking/src/ResourceCache.cpp @@ -646,7 +646,7 @@ void Resource::attemptRequest() { _startedLoading = true; if (_attempts > 0) { - qCDebug(networking).noquote() << "Server unavailable for" << _url + qCDebug(networking).noquote() << "Server unavailable " << "- retrying asset load - attempt" << _attempts << " of " << MAX_ATTEMPTS; } @@ -658,11 +658,9 @@ void Resource::attemptRequest() { void Resource::finishedLoading(bool success) { if (success) { - qCDebug(networking).noquote() << "Finished loading:" << _url.toDisplayString(); _loadPriorities.clear(); _loaded = true; } else { - qCDebug(networking).noquote() << "Failed to load:" << _url.toDisplayString(); _failedToLoad = true; } emit finished(success); @@ -692,7 +690,6 @@ void Resource::makeRequest() { this, _activeUrl, true, -1, "Resource::makeRequest"); if (!_request) { - qCDebug(networking).noquote() << "Failed to get request for" << _url.toDisplayString(); ResourceCache::requestCompleted(_self); finishedLoading(false); PROFILE_ASYNC_END(resource, "Resource:" + getType(), QString::number(_requestID)); @@ -744,8 +741,6 @@ void Resource::handleReplyFinished() { auto result = _request->getResult(); if (result == ResourceRequest::Success) { - auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString()); - qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_activeUrl.toDisplayString(), extraInfo); auto relativePathURL = _request->getRelativePathUrl(); if (!relativePathURL.isEmpty()) { @@ -768,7 +763,7 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) { bool willRetry = false; switch (result) { case ResourceRequest::Result::Timeout: { - qCDebug(networking) << "Timed out loading" << _url << "received" << _bytesReceived << "total" << _bytesTotal; + qCDebug(networking) << "Timed out, received" << _bytesReceived << "total" << _bytesTotal; // Fall through to other cases } // FALLTHRU @@ -776,13 +771,13 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) { _attempts++; _attemptsRemaining--; - qCDebug(networking) << "Retryable error while loading" << _url << "attempt:" << _attempts << "attemptsRemaining:" << _attemptsRemaining; + qCDebug(networking) << "Retryable error while loading: attempt:" << _attempts << "attemptsRemaining:" << _attemptsRemaining; // retry with increasing delays const int BASE_DELAY_MS = 1000; if (_attempts < MAX_ATTEMPTS) { auto waitTime = BASE_DELAY_MS * (int)pow(2.0, _attempts); - qCDebug(networking).noquote() << "Server unavailable for" << _url << "- may retry in" << waitTime << "ms" + qCDebug(networking).noquote() << "Server unavailable for - may retry in" << waitTime << "ms" << "if resource is still needed"; QTimer::singleShot(waitTime, this, &Resource::attemptRequest); willRetry = true; @@ -793,7 +788,7 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) { // FALLTHRU default: { _attemptsRemaining = 0; - qCDebug(networking) << "Error loading " << _url << "attempt:" << _attempts << "attemptsRemaining:" << _attemptsRemaining; + qCDebug(networking) << "Error loading, attempt:" << _attempts << "attemptsRemaining:" << _attemptsRemaining; auto error = (result == ResourceRequest::Timeout) ? QNetworkReply::TimeoutError : QNetworkReply::UnknownNetworkError; emit failed(error); diff --git a/libraries/octree/src/Octree.cpp b/libraries/octree/src/Octree.cpp index 06db92bcf7..088a1f0121 100644 --- a/libraries/octree/src/Octree.cpp +++ b/libraries/octree/src/Octree.cpp @@ -679,7 +679,6 @@ bool Octree::readFromFile(const char* fileName) { QFile file(qFileName); if (!file.open(QIODevice::ReadOnly)) { - qCritical() << "unable to open for reading: " << fileName; return false; } @@ -687,8 +686,6 @@ bool Octree::readFromFile(const char* fileName) { QFileInfo fileInfo(qFileName); uint64_t fileLength = fileInfo.size(); - qCDebug(octree) << "Loading file" << qFileName << "..."; - bool success = readFromStream(fileLength, fileInputStream); file.close(); @@ -699,14 +696,12 @@ bool Octree::readFromFile(const char* fileName) { bool Octree::readJSONFromGzippedFile(QString qFileName) { QFile file(qFileName); if (!file.open(QIODevice::ReadOnly)) { - qCritical() << "Cannot open gzipped json file for reading: " << qFileName; return false; } QByteArray compressedJsonData = file.readAll(); QByteArray jsonData; if (!gunzip(compressedJsonData, jsonData)) { - qCritical() << "json File not in gzip format: " << qFileName; return false; } diff --git a/libraries/octree/src/OctreeDataUtils.cpp b/libraries/octree/src/OctreeDataUtils.cpp index 44a56fe97a..3da498d7f3 100644 --- a/libraries/octree/src/OctreeDataUtils.cpp +++ b/libraries/octree/src/OctreeDataUtils.cpp @@ -24,7 +24,6 @@ bool readOctreeFile(QString path, QJsonDocument* doc) { QFile file(path); if (!file.open(QIODevice::ReadOnly)) { - qCritical() << "Cannot open json file for reading: " << path; return false; } diff --git a/libraries/octree/src/OctreePersistThread.cpp b/libraries/octree/src/OctreePersistThread.cpp index 8b1d766418..5a20f55a76 100644 --- a/libraries/octree/src/OctreePersistThread.cpp +++ b/libraries/octree/src/OctreePersistThread.cpp @@ -127,7 +127,6 @@ void OctreePersistThread::handleOctreeDataFileReply(QSharedPointerclearDirtyBit(); // the tree is clean since we just loaded it - qCDebug(octree, "DONE loading Octrees from file... fileRead=%s", debug::valueOf(persistentFileRead)); unsigned long nodeCount = OctreeElement::getNodeCount(); unsigned long internalNodeCount = OctreeElement::getInternalNodeCount(); diff --git a/libraries/procedural/src/procedural/Procedural.cpp b/libraries/procedural/src/procedural/Procedural.cpp index 1c082ed250..7095732d53 100644 --- a/libraries/procedural/src/procedural/Procedural.cpp +++ b/libraries/procedural/src/procedural/Procedural.cpp @@ -157,13 +157,11 @@ void Procedural::setProceduralData(const ProceduralData& proceduralData) { } if (!shaderUrl.isValid()) { - qCWarning(proceduralLog) << "Invalid shader URL: " << shaderUrl; return; } if (shaderUrl.isLocalFile()) { if (!QFileInfo(shaderUrl.toLocalFile()).exists()) { - qCWarning(proceduralLog) << "Invalid shader URL, missing local file: " << shaderUrl; return; } _shaderPath = shaderUrl.toLocalFile(); diff --git a/libraries/script-engine/src/AssetScriptingInterface.cpp b/libraries/script-engine/src/AssetScriptingInterface.cpp index 4096de9434..e389bd8446 100644 --- a/libraries/script-engine/src/AssetScriptingInterface.cpp +++ b/libraries/script-engine/src/AssetScriptingInterface.cpp @@ -398,7 +398,6 @@ void AssetScriptingInterface::loadFromCache(QScriptValue options, QScriptValue s bool AssetScriptingInterface::canWriteCacheValue(const QUrl& url) { auto scriptEngine = qobject_cast(engine()); if (!scriptEngine) { - qCDebug(scriptengine) << __FUNCTION__ << "invalid script engine" << url; return false; } // allow cache writes only from Client, EntityServer and Agent scripts @@ -407,7 +406,6 @@ bool AssetScriptingInterface::canWriteCacheValue(const QUrl& url) { scriptEngine->isAgentScript() ); if (!isAllowedContext) { - qCDebug(scriptengine) << __FUNCTION__ << "invalid context" << scriptEngine->getContext() << url; return false; } return true; @@ -430,7 +428,6 @@ void AssetScriptingInterface::saveToCache(const QUrl& rawURL, const QByteArray& auto atpURL = AssetUtils::getATPUrl(hashDataHex(data)); atpURL.setQuery(url.query()); atpURL.setFragment(url.fragment()); - qCDebug(scriptengine) << "autogenerated ATP URL" << url << "=>" << atpURL; url = atpURL; } auto hash = AssetUtils::extractAssetHash(url.toDisplayString()); @@ -440,7 +437,6 @@ void AssetScriptingInterface::saveToCache(const QUrl& rawURL, const QByteArray& JS_VERIFY(url.scheme() == "atp" || url.scheme() == "cache", "only 'atp' and 'cache' URL schemes supported"); JS_VERIFY(hash.isEmpty() || hash == hashDataHex(data), QString("invalid checksum hash for atp:HASH style URL (%1 != %2)").arg(hash, hashDataHex(data))); - // qCDebug(scriptengine) << "saveToCache" << url.toDisplayString() << data << hash << metadata; jsPromiseReady(Parent::saveToCache(url, data, metadata), scope, callback); } diff --git a/libraries/script-engine/src/BatchLoader.cpp b/libraries/script-engine/src/BatchLoader.cpp index 4e2943d536..fd38f1b7b1 100644 --- a/libraries/script-engine/src/BatchLoader.cpp +++ b/libraries/script-engine/src/BatchLoader.cpp @@ -51,8 +51,6 @@ void BatchLoader::start(int maxRetries) { for (const auto& rawURL : _urls) { QUrl url = expandScriptUrl(normalizeScriptURL(rawURL)); - qCDebug(scriptengine) << "Loading script at " << url; - auto scriptCache = DependencyManager::get(); // Use a proxy callback to handle the call and emit the signal in a thread-safe way. @@ -65,10 +63,8 @@ void BatchLoader::start(int maxRetries) { _status.insert(url, status); if (isURL && success) { _data.insert(url, contents); - qCDebug(scriptengine) << "Loaded: " << url; } else { _data.insert(url, QString()); - qCDebug(scriptengine) << "Could not load: " << url << status; } if (!_finished && _urls.size() == _data.size()) { diff --git a/libraries/script-engine/src/FileScriptingInterface.cpp b/libraries/script-engine/src/FileScriptingInterface.cpp index 4e07877d57..269a5179c1 100644 --- a/libraries/script-engine/src/FileScriptingInterface.cpp +++ b/libraries/script-engine/src/FileScriptingInterface.cpp @@ -38,10 +38,7 @@ FileScriptingInterface::FileScriptingInterface(QObject* parent) : QObject(parent } void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool isZip, bool isBlocks) { - qCDebug(scriptengine) << "Url that was downloaded: " + url.toString(); - qCDebug(scriptengine) << "Path where download is saved: " + path; QString fileName = "/" + path.section("/", -1); - qCDebug(scriptengine) << "Filename: " << fileName; QString tempDir = path; if (!isZip) { tempDir.remove(fileName); @@ -59,9 +56,7 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool QStringList fileList = unzipFile(path, tempDir); - if (!fileList.isEmpty()) { - qCDebug(scriptengine) << "First file to upload: " + fileList.first(); - } else { + if(fileList.isEmpty()) { qCDebug(scriptengine) << "Unzip failed"; } @@ -131,7 +126,6 @@ QString FileScriptingInterface::convertUrlToPath(QUrl url) { QString newUrl; QString oldUrl = url.toString(); newUrl = oldUrl.section("filename=", 1, 1); - qCDebug(scriptengine) << "Filename should be: " + newUrl; return newUrl; } @@ -149,14 +143,12 @@ void FileScriptingInterface::downloadZip(QString path, const QString link) { // this function is not in use void FileScriptingInterface::recursiveFileScan(QFileInfo file, QString* dirName) { /*if (!file.isDir()) { - qCDebug(scriptengine) << "Regular file logged: " + file.fileName(); return; }*/ QFileInfoList files; // FIXME quazip hasn't been built on the android toolchain #if !defined(Q_OS_ANDROID) if (file.fileName().contains(".zip")) { - qCDebug(scriptengine) << "Extracting archive: " + file.fileName(); JlCompress::extractDir(file.fileName()); } #endif @@ -167,7 +159,6 @@ void FileScriptingInterface::recursiveFileScan(QFileInfo file, QString* dirName) }*/ foreach (QFileInfo file, files) { - qCDebug(scriptengine) << "Looking into file: " + file.fileName(); recursiveFileScan(file, dirName); } return; diff --git a/libraries/script-engine/src/ScriptCache.cpp b/libraries/script-engine/src/ScriptCache.cpp index 8acf88a7ce..9922b125f4 100644 --- a/libraries/script-engine/src/ScriptCache.cpp +++ b/libraries/script-engine/src/ScriptCache.cpp @@ -37,9 +37,6 @@ ScriptCache::ScriptCache(QObject* parent) { void ScriptCache::clearCache() { Lock lock(_containerLock); - foreach(auto& url, _scriptCache.keys()) { - qCDebug(scriptengine) << "clearing cache: " << url; - } _scriptCache.clear(); } @@ -48,7 +45,6 @@ void ScriptCache::clearATPScriptsFromCache() { qCDebug(scriptengine) << "Clearing ATP scripts from ScriptCache"; for (auto it = _scriptCache.begin(); it != _scriptCache.end();) { if (it.key().scheme() == "atp") { - qCDebug(scriptengine) << "Removing: " << it.key(); it = _scriptCache.erase(it); } else { ++it; @@ -60,7 +56,6 @@ void ScriptCache::deleteScript(const QUrl& unnormalizedURL) { QUrl url = DependencyManager::get()->normalizeURL(unnormalizedURL); Lock lock(_containerLock); if (_scriptCache.contains(url)) { - qCDebug(scriptengine) << "Delete script from cache:" << url.toString(); _scriptCache.remove(url); } } @@ -146,7 +141,6 @@ void ScriptCache::scriptContentAvailable(int maxRetries) { _activeScriptRequests.remove(url); _scriptCache[url] = scriptContent = req->getData(); - qCDebug(scriptengine) << "Done downloading script at:" << url.toString(); } else { auto result = req->getResult(); bool irrecoverable = @@ -160,12 +154,12 @@ void ScriptCache::scriptContentAvailable(int maxRetries) { int timeout = exp(scriptRequest.numRetries) * ScriptRequest::START_DELAY_BETWEEN_RETRIES; int attempt = scriptRequest.numRetries; - qCDebug(scriptengine) << QString("Script request failed [%1]: %2 (will retry %3 more times; attempt #%4 in %5ms...)") - .arg(status).arg(url.toString()).arg(maxRetries - attempt + 1).arg(attempt).arg(timeout); + qCDebug(scriptengine) << QString("Script request failed [%1]: (will retry %2 more times; attempt #%3 in %4ms...)") + .arg(status).arg(maxRetries - attempt + 1).arg(attempt).arg(timeout); QTimer::singleShot(timeout, this, [this, url, attempt, maxRetries]() { - qCDebug(scriptengine) << QString("Retrying script request [%1 / %2]: %3") - .arg(attempt).arg(maxRetries).arg(url.toString()); + qCDebug(scriptengine) << QString("Retrying script request [%1 / %2]") + .arg(attempt).arg(maxRetries); auto request = DependencyManager::get()->createResourceRequest( nullptr, url, true, -1, "ScriptCache::scriptContentAvailable"); @@ -186,12 +180,10 @@ void ScriptCache::scriptContentAvailable(int maxRetries) { scriptContent = _scriptCache[url]; } _activeScriptRequests.remove(url); - qCWarning(scriptengine) << "Error loading script from URL " << url << "(" << status <<")"; + qCWarning(scriptengine) << "Error loading script from URL (" << status <<")"; } } - } else { - qCWarning(scriptengine) << "Warning: scriptContentAvailable for inactive url: " << url; } } diff --git a/libraries/script-engine/src/ScriptEngine.cpp b/libraries/script-engine/src/ScriptEngine.cpp index be1a9c20ef..14e8f45da9 100644 --- a/libraries/script-engine/src/ScriptEngine.cpp +++ b/libraries/script-engine/src/ScriptEngine.cpp @@ -369,7 +369,6 @@ void ScriptEngine::runInThread() { Q_ASSERT_X(!_isThreaded, "ScriptEngine::runInThread()", "runInThread should not be called more than once"); if (_isThreaded) { - qCWarning(scriptengine) << "ScriptEngine already running in thread: " << getFilename(); return; } @@ -419,10 +418,10 @@ void ScriptEngine::waitTillDoneRunning() { workerThread->quit(); if (isEvaluating()) { - qCWarning(scriptengine) << "Script Engine has been running too long, aborting:" << getFilename(); + qCWarning(scriptengine) << "Script Engine has been running too long, aborting."; abortEvaluation(); } else { - qCWarning(scriptengine) << "Script Engine has been running too long, throwing:" << getFilename(); + qCWarning(scriptengine) << "Script Engine has been running too long, throwing."; auto context = currentContext(); if (context) { context->throwError("Timed out during shutdown"); @@ -498,7 +497,6 @@ void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) { { static const QString DEBUG_FLAG("#debug"); if (QRegularExpression(DEBUG_FLAG).match(scriptContents).hasMatch()) { - qCWarning(scriptengine) << "NOTE: ScriptEngine for " << QUrl(url).fileName() << " will be launched in debug mode"; _debuggable = true; } } @@ -1632,7 +1630,6 @@ QVariantMap ScriptEngine::fetchModuleSource(const QString& modulePath, const boo auto url = modulePath; auto status = _status[url]; auto contents = data[url]; - qCDebug(scriptengine_module) << "require.fetchModuleSource.onload: " << QUrl(url).fileName() << status << QThread::currentThread(); if (isStopping()) { req["status"] = "Stopped"; req["success"] = false; @@ -1752,8 +1749,8 @@ QScriptValue ScriptEngine::require(const QString& moduleId) { auto exports = module.property("exports"); if (!invalidateCache && exports.isObject()) { // we have found a cached module -- just need to possibly register it with current parent - qCDebug(scriptengine_module) << QString("require - using cached module '%1' for '%2' (loaded: %3)") - .arg(modulePath).arg(moduleId).arg(module.property("loaded").toString()); + qCDebug(scriptengine_module) << QString("require - using cached module for '%1' (loaded: %2)") + .arg(moduleId).arg(module.property("loaded").toString()); registerModuleWithParent(module, parent); maybeEmitUncaughtException("cached module"); return exports; @@ -2138,7 +2135,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& PROFILE_RANGE(script, __FUNCTION__); if (isStopping() || DependencyManager::get()->isStopped()) { - qCDebug(scriptengine) << "loadEntityScript.start " << entityScript << entityID.toString() + qCDebug(scriptengine) << "loadEntityScript.start " << entityID.toString() << " but isStopping==" << isStopping() << " || engines->isStopped==" << DependencyManager::get()->isStopped(); return; @@ -2163,8 +2160,8 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& // since not reloading, assume that the exact same input would produce the exact same output again // note: this state gets reset with "reload all scripts," leaving/returning to a Domain, clear cache, etc. #ifdef DEBUG_ENTITY_STATES - qCDebug(scriptengine) << QString("loadEntityScript.cancelled entity: %1 script: %2 (previous script failure)") - .arg(entityID.toString()).arg(entityScript); + qCDebug(scriptengine) << QString("loadEntityScript.cancelled entity: %1 (previous script failure)") + .arg(entityID.toString()); #endif updateEntityScriptStatus(entityID, EntityScriptStatus::ERROR_LOADING_SCRIPT, "A previous Entity failed to load using this script URL; reload to try again."); @@ -2173,8 +2170,8 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& } else { // another entity is busy loading from this script URL so wait for them to finish #ifdef DEBUG_ENTITY_STATES - qCDebug(scriptengine) << QString("loadEntityScript.deferring[%0] entity: %1 script: %2 (waiting on %3)") - .arg(_deferredEntityLoads.size()).arg(entityID.toString()).arg(entityScript).arg(currentEntityID.toString()); + qCDebug(scriptengine) << QString("loadEntityScript.deferring[%0] entity: %1 (waiting on %2 )") + .arg(_deferredEntityLoads.size()).arg(entityID.toString()).arg(currentEntityID.toString()); #endif _deferredEntityLoads.push_back({ entityID, entityScript }); return; @@ -2188,7 +2185,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& { EntityScriptDetails details; bool hasEntityScript = getEntityScriptDetails(entityID, details); - qCDebug(scriptengine) << "loadEntityScript.LOADING: " << entityScript << entityID.toString() + qCDebug(scriptengine) << "loadEntityScript.LOADING: " << entityID.toString() << "(previous: " << (hasEntityScript ? details.status : EntityScriptStatus::PENDING) << ")"; } #endif @@ -2217,7 +2214,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& } executeOnScriptThread([=]{ #ifdef DEBUG_ENTITY_STATES - qCDebug(scriptengine) << "loadEntityScript.contentAvailable" << status << QUrl(url).fileName() << entityID.toString(); + qCDebug(scriptengine) << "loadEntityScript.contentAvailable" << status << entityID.toString(); #endif if (!isStopping() && hasEntityScriptDetails(entityID)) { _contentAvailableQueue[entityID] = { entityID, url, contents, isURL, success, status }; @@ -2306,7 +2303,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co setEntityScriptDetails(entityID, newDetails); #ifdef DEBUG_ENTITY_STATES - qCDebug(scriptengine) << "entityScriptContentAvailable -- flagging " << entityScript << " as BAD_SCRIPT_UUID_PLACEHOLDER"; + qCDebug(scriptengine) << "entityScriptContentAvailable -- flagging as BAD_SCRIPT_UUID_PLACEHOLDER"; #endif // flag the original entityScript as unusuable _occupiedScriptURLs[entityScript] = BAD_SCRIPT_UUID_PLACEHOLDER; @@ -2352,7 +2349,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co timeout.setSingleShot(true); timeout.start(SANDBOX_TIMEOUT); connect(&timeout, &QTimer::timeout, [=, &sandbox]{ - qCDebug(scriptengine) << "ScriptEngine::entityScriptContentAvailable timeout(" << scriptOrURL << ")"; + qCDebug(scriptengine) << "ScriptEngine::entityScriptContentAvailable timeout"; // Guard against infinite loops and non-performant code sandbox.raiseException( diff --git a/libraries/script-engine/src/ScriptEngines.cpp b/libraries/script-engine/src/ScriptEngines.cpp index 6393ff33ea..2cdfc20647 100644 --- a/libraries/script-engine/src/ScriptEngines.cpp +++ b/libraries/script-engine/src/ScriptEngines.cpp @@ -112,7 +112,7 @@ QUrl expandScriptUrl(const QUrl& rawScriptURL) { QUrl defaultScriptsLoc = PathUtils::defaultScriptsLocation(); if (!defaultScriptsLoc.isParentOf(url)) { - qCWarning(scriptengine) << "Script.include() ignoring file path" << rawScriptURL + qCWarning(scriptengine) << "Script.include() ignoring file path" << "-- outside of standard libraries: " << url.path() << defaultScriptsLoc.path(); @@ -393,7 +393,6 @@ void ScriptEngines::stopAllScripts(bool restart) { } // stop all scripts - qCDebug(scriptengine) << "stopping script..." << it.key(); scriptEngine->stop(); removeScriptEngine(scriptEngine); } @@ -403,11 +402,8 @@ void ScriptEngines::stopAllScripts(bool restart) { for(const auto &scriptName : toReload) { auto scriptEngine = getScriptEngine(scriptName); if (scriptEngine && !scriptEngine->isFinished()) { - qCDebug(scriptengine) << "waiting on script:" << scriptName; scriptEngine->waitTillDoneRunning(); - qCDebug(scriptengine) << "done waiting on script:" << scriptName; } - qCDebug(scriptengine) << "reloading script..." << scriptName; reloadScript(scriptName); } if (restart) { @@ -445,7 +441,6 @@ bool ScriptEngines::stopScript(const QString& rawScriptURL, bool restart) { scriptEngine->stop(); removeScriptEngine(scriptEngine); stoppedScript = true; - qCDebug(scriptengine) << "stopping script..." << scriptURL; } } return stoppedScript; From 142dfab9ac2c2fadde4750cd23c078fbfdcb1f81 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Thu, 8 Nov 2018 10:05:57 -0800 Subject: [PATCH 04/13] CR round 1 --- interface/resources/qml/hifi/AssetServer.qml | 20 ++++++++++--------- .../resources/qml/hifi/RootHttpRequest.qml | 2 -- .../qml/hifi/commerce/purchases/Purchases.qml | 2 +- .../qml/hifi/dialogs/TabletAssetServer.qml | 20 ++++++++++++------- interface/src/ModelPackager.cpp | 4 ++-- libraries/entities/src/EntityEditFilters.cpp | 6 +++--- libraries/octree/src/Octree.cpp | 2 ++ scripts/modules/request.js | 6 ++++++ 8 files changed, 38 insertions(+), 24 deletions(-) diff --git a/interface/resources/qml/hifi/AssetServer.qml b/interface/resources/qml/hifi/AssetServer.qml index 9eb9bde7df..ad337a6361 100644 --- a/interface/resources/qml/hifi/AssetServer.qml +++ b/interface/resources/qml/hifi/AssetServer.qml @@ -81,14 +81,16 @@ Windows.ScrollingWindow { } function doDeleteFile(paths) { + console.log("Deleting " + paths); + Assets.deleteMappings(paths, function(err) { if (err) { - console.log("Asset browser - error deleting paths: ", err); + console.log("Asset browser - error deleting paths: ", paths, err); - box = errorMessageBox("There was an error deleting:\n" + err); + box = errorMessageBox("There was an error deleting:\n" + paths + "\n" + err); box.selected.connect(reload); } else { - console.log("Asset browser - finished deleting paths"); + console.log("Asset browser - finished deleting paths: ", paths); reload(); } }); @@ -115,11 +117,11 @@ Windows.ScrollingWindow { Assets.renameMapping(oldPath, newPath, function(err) { if (err) { - console.log("Asset browser - error renaming:", err); + console.log("Asset browser - error renaming: ", oldPath, "=>", newPath, " - error ", err); box = errorMessageBox("There was an error renaming:\n" + oldPath + " to " + newPath + "\n" + err); box.selected.connect(reload); } else { - console.log("Asset browser - finished rename"); + console.log("Asset browser - finished rename: ", oldPath, "=>", newPath); } reload(); @@ -278,7 +280,7 @@ Windows.ScrollingWindow { gravity = Vec3.multiply(Vec3.fromPolar(Math.PI / 2, 0), 0); } - print("Asset browser - adding asset " + name + " to world."); + print("Asset browser - adding asset " + url + " (" + name + ") to world."); // Entities.addEntity doesn't work from QML, so we use this. Entities.addModelEntity(name, url, "", shapeType, dynamic, collisionless, grabbable, addPosition, gravity); @@ -424,7 +426,7 @@ Windows.ScrollingWindow { uploadProgressLabel.text = "In progress..."; }, function(err, path) { - print(err); + print(err, path); if (err === "") { uploadProgressLabel.text = "Upload Complete"; timer.interval = 1000; @@ -435,7 +437,7 @@ Windows.ScrollingWindow { uploadOpen = false; }); timer.start(); - console.log("Asset Browser - finished uploading"); + console.log("Asset Browser - finished uploading: ", fileUrl); reload(); } else { uploadSpinner.visible = false; @@ -443,7 +445,7 @@ Windows.ScrollingWindow { uploadOpen = false; if (err !== -1) { - console.log("Asset Browser - error uploading:", err); + console.log("Asset Browser - error uploading: ", fileUrl, " - error ", err); var box = errorMessageBox("There was an error uploading:\n" + fileUrl + "\n" + err); box.selected.connect(reload); } diff --git a/interface/resources/qml/hifi/RootHttpRequest.qml b/interface/resources/qml/hifi/RootHttpRequest.qml index b1397dfcbf..0219b4eeab 100644 --- a/interface/resources/qml/hifi/RootHttpRequest.qml +++ b/interface/resources/qml/hifi/RootHttpRequest.qml @@ -20,7 +20,6 @@ Item { // Public function for initiating an http request. // REQUIRES parent to be root to have sendToScript! function request(options, callback) { - console.debug('HttpRequest'); httpCalls[httpCounter] = callback; var message = {method: 'http.request', params: options, id: httpCounter++, jsonrpc: "2.0"}; parent.sendToScript(message); @@ -33,7 +32,6 @@ Item { return; } delete httpCalls[message.id]; - console.debug('HttpRequest response'); callback(message.error, message.response); } } diff --git a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml index 3c8226f9c1..18d6bc9f78 100644 --- a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml +++ b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml @@ -1009,7 +1009,7 @@ Rectangle { try { // Not all calls to onFileOpenChanged() connect an event. Window.browseChanged.disconnect(onFileOpenChanged); } catch (e) { - console.log('Purchases.qml ignoring'); + console.log('Purchases.qml ignoring', e); } if (filename) { Commerce.installApp(filename); diff --git a/interface/resources/qml/hifi/dialogs/TabletAssetServer.qml b/interface/resources/qml/hifi/dialogs/TabletAssetServer.qml index 72a5c32507..f665032b01 100644 --- a/interface/resources/qml/hifi/dialogs/TabletAssetServer.qml +++ b/interface/resources/qml/hifi/dialogs/TabletAssetServer.qml @@ -81,16 +81,16 @@ Rectangle { } function doDeleteFile(paths) { - console.log("Deleting paths"); + console.log("Deleting " + paths); Assets.deleteMappings(paths, function(err) { if (err) { - console.log("Asset browser - error deleting paths: ", err); + console.log("Asset browser - error deleting paths: ", paths, err); - box = errorMessageBox("There was an error deleting:\n" + err); + box = errorMessageBox("There was an error deleting:\n" + paths + "\n" + err); box.selected.connect(reload); } else { - console.log("Asset browser - finished deleting paths"); + console.log("Asset browser - finished deleting paths: ", paths); reload(); } }); @@ -113,10 +113,15 @@ Rectangle { box.selected.connect(reload); } + console.log("Asset browser - renaming " + oldPath + " to " + newPath); + Assets.renameMapping(oldPath, newPath, function(err) { if (err) { + console.log("Asset browser - error renaming: ", oldPath, "=>", newPath, " - error ", err); box = errorMessageBox("There was an error renaming:\n" + oldPath + " to " + newPath + "\n" + err); box.selected.connect(reload); + } else { + console.log("Asset browser - finished rename: ", oldPath, "=>", newPath); } reload(); @@ -275,7 +280,7 @@ Rectangle { gravity = Vec3.multiply(Vec3.fromPolar(Math.PI / 2, 0), 0); } - print("Asset browser - adding asset " + name + " to world."); + print("Asset browser - adding asset " + url + " (" + name + ") to world."); // Entities.addEntity doesn't work from QML, so we use this. Entities.addModelEntity(name, url, "", shapeType, dynamic, collisionless, grabbable, addPosition, gravity); @@ -421,7 +426,7 @@ Rectangle { uploadProgressLabel.text = "In progress..."; }, function(err, path) { - print(err); + print(err, path); if (err === "") { uploadProgressLabel.text = "Upload Complete"; timer.interval = 1000; @@ -432,6 +437,7 @@ Rectangle { uploadOpen = false; }); timer.start(); + console.log("Asset Browser - finished uploading: ", fileUrl); reload(); } else { uploadSpinner.visible = false; @@ -439,7 +445,7 @@ Rectangle { uploadOpen = false; if (err !== -1) { - console.log("Asset Browser - error uploading:", err); + console.log("Asset Browser - error uploading: ", fileUrl, " - error ", err); var box = errorMessageBox("There was an error uploading:\n" + fileUrl + "\n" + err); box.selected.connect(reload); } diff --git a/interface/src/ModelPackager.cpp b/interface/src/ModelPackager.cpp index 25cde7df94..4a82b64535 100644 --- a/interface/src/ModelPackager.cpp +++ b/interface/src/ModelPackager.cpp @@ -83,7 +83,7 @@ bool ModelPackager::loadModel() { QString("ModelPackager::loadModel()"), QString("Could not open FST file %1").arg(_modelFile.filePath()), QMessageBox::Ok); - qWarning() << "ModelPackager::loadModel(): Could not open FST file"; + qWarning() << QString("ModelPackager::loadModel(): Could not open FST file %1").arg(_modelFile.filePath()); return false; } qCDebug(interfaceapp) << "Reading FST file"; @@ -106,7 +106,7 @@ bool ModelPackager::loadModel() { return false; } try { - qCDebug(interfaceapp) << "Reading FBX file"; + qCDebug(interfaceapp) << "Reading FBX file : " << _fbxInfo.filePath(); QByteArray fbxContents = fbx.readAll(); _hfmModel.reset(readFBX(fbxContents, QVariantHash(), _fbxInfo.filePath())); diff --git a/libraries/entities/src/EntityEditFilters.cpp b/libraries/entities/src/EntityEditFilters.cpp index 37132e50df..a763c0f146 100644 --- a/libraries/entities/src/EntityEditFilters.cpp +++ b/libraries/entities/src/EntityEditFilters.cpp @@ -222,7 +222,7 @@ static bool hasCorrectSyntax(const QScriptProgram& program) { const auto error = syntaxCheck.errorMessage(); const auto line = QString::number(syntaxCheck.errorLineNumber()); const auto column = QString::number(syntaxCheck.errorColumnNumber()); - const auto message = QString("[SyntaxError] %1 in %2(%3)").arg(error, line, column); + const auto message = QString("[SyntaxError] %1 in %2:%3(%4)").arg(error, program.fileName(), line, column); qCritical() << qPrintable(message); return false; } @@ -235,8 +235,8 @@ static bool hadUncaughtExceptions(QScriptEngine& engine, const QString& fileName const auto line = QString::number(engine.uncaughtExceptionLineNumber()); engine.clearExceptions(); - static const QString SCRIPT_EXCEPTION_FORMAT = "[UncaughtException] %1 on line %2"; - auto message = QString(SCRIPT_EXCEPTION_FORMAT).arg(exception, line); + static const QString SCRIPT_EXCEPTION_FORMAT = "[UncaughtException] %1 in %2:%3"; + auto message = QString(SCRIPT_EXCEPTION_FORMAT).arg(exception, fileName, line); if (!backtrace.empty()) { static const auto lineSeparator = "\n "; message += QString("\n[Backtrace]%1%2").arg(lineSeparator, backtrace.join(lineSeparator)); diff --git a/libraries/octree/src/Octree.cpp b/libraries/octree/src/Octree.cpp index 088a1f0121..9e77968384 100644 --- a/libraries/octree/src/Octree.cpp +++ b/libraries/octree/src/Octree.cpp @@ -696,12 +696,14 @@ bool Octree::readFromFile(const char* fileName) { bool Octree::readJSONFromGzippedFile(QString qFileName) { QFile file(qFileName); if (!file.open(QIODevice::ReadOnly)) { + qCritical() << "Cannot open gzipped json file for reading: " << qFileName; return false; } QByteArray compressedJsonData = file.readAll(); QByteArray jsonData; if (!gunzip(compressedJsonData, jsonData)) { + qCritical() << "json File not in gzip format: " << qFileName; return false; } diff --git a/scripts/modules/request.js b/scripts/modules/request.js index 5464b1bffa..37f3ac0d7b 100644 --- a/scripts/modules/request.js +++ b/scripts/modules/request.js @@ -75,3 +75,9 @@ module.exports = { httpRequest.send(options.body || null); } }; + +// =========================================================================================== +// @function - debug logging +function debug() { + print('RequestModule | ' + [].slice.call(arguments).join(' ')); +} From e0ca5358537f9cc90b0ca2c89af98cba2eee286a Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Thu, 8 Nov 2018 10:08:42 -0800 Subject: [PATCH 05/13] CR round 2 --- libraries/script-engine/src/ScriptEngine.cpp | 4 ++-- .../moduleTests/entity/entityConstructorAPIException.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/script-engine/src/ScriptEngine.cpp b/libraries/script-engine/src/ScriptEngine.cpp index 14e8f45da9..455fd93f4b 100644 --- a/libraries/script-engine/src/ScriptEngine.cpp +++ b/libraries/script-engine/src/ScriptEngine.cpp @@ -418,10 +418,10 @@ void ScriptEngine::waitTillDoneRunning() { workerThread->quit(); if (isEvaluating()) { - qCWarning(scriptengine) << "Script Engine has been running too long, aborting."; + qCWarning(scriptengine) << "Script Engine has been running too long, aborting:" << getFilename(); abortEvaluation(); } else { - qCWarning(scriptengine) << "Script Engine has been running too long, throwing."; + qCWarning(scriptengine) << "Script Engine has been running too long, throwing:" << getFilename(); auto context = currentContext(); if (context) { context->throwError("Timed out during shutdown"); diff --git a/scripts/developer/tests/unit_tests/moduleTests/entity/entityConstructorAPIException.js b/scripts/developer/tests/unit_tests/moduleTests/entity/entityConstructorAPIException.js index 62b861ae8f..bbe694b578 100644 --- a/scripts/developer/tests/unit_tests/moduleTests/entity/entityConstructorAPIException.js +++ b/scripts/developer/tests/unit_tests/moduleTests/entity/entityConstructorAPIException.js @@ -2,12 +2,12 @@ // test module method exception being thrown within main constructor (function() { var apiMethod = Script.require('../exceptions/exceptionInFunction.js'); - print("apiMethod", apiMethod); + print(Script.resolvePath(''), "apiMethod", apiMethod); // this next line throws from within apiMethod print(apiMethod()); return { preload: function(uuid) { - print("entityConstructorAPIException::preload -- never seen --", uuid); + print("entityConstructorAPIException::preload -- never seen --", uuid, Script.resolvePath('')); }, }; }); From 811b01816bfb214d44fcdae010a489e7ab4e2486 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Thu, 8 Nov 2018 10:41:31 -0800 Subject: [PATCH 06/13] CR round 3 --- interface/src/assets/ATPAssetMigrator.cpp | 2 +- libraries/networking/src/AssetUpload.cpp | 4 ++++ libraries/networking/src/ResourceCache.cpp | 2 +- .../unit_tests/moduleTests/entity/entityPreloadAPIError.js | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/interface/src/assets/ATPAssetMigrator.cpp b/interface/src/assets/ATPAssetMigrator.cpp index 41f2367670..59e2277cec 100644 --- a/interface/src/assets/ATPAssetMigrator.cpp +++ b/interface/src/assets/ATPAssetMigrator.cpp @@ -209,7 +209,7 @@ void ATPAssetMigrator::migrateResource(ResourceRequest* request) { // add this URL to our hash of AssetUpload to original URL _originalURLs.insert(upload, request->getUrl()); - qCDebug(asset_migrator) << "Starting upload of asset"; + qCDebug(asset_migrator) << "Starting upload of asset from" << request->getUrl(); // connect to the finished signal so we know when the AssetUpload is done QObject::connect(upload, &AssetUpload::finished, this, &ATPAssetMigrator::assetUploadFinished); diff --git a/libraries/networking/src/AssetUpload.cpp b/libraries/networking/src/AssetUpload.cpp index d4dfa6554b..f1c84e474a 100644 --- a/libraries/networking/src/AssetUpload.cpp +++ b/libraries/networking/src/AssetUpload.cpp @@ -76,6 +76,10 @@ void AssetUpload::start() { // ask the AssetClient to upload the asset and emit the proper signals from the passed callback auto assetClient = DependencyManager::get(); + + if (!_filename.isEmpty()) { + qCDebug(asset_client) << "Attempting to upload" << _filename << "to asset-server."; + } assetClient->uploadAsset(_data, [this](bool responseReceived, AssetUtils::AssetServerError error, const QString& hash){ if (!responseReceived) { diff --git a/libraries/networking/src/ResourceCache.cpp b/libraries/networking/src/ResourceCache.cpp index fa7dae1bf1..98e6a453e9 100644 --- a/libraries/networking/src/ResourceCache.cpp +++ b/libraries/networking/src/ResourceCache.cpp @@ -765,7 +765,7 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) { bool willRetry = false; switch (result) { case ResourceRequest::Result::Timeout: { - qCDebug(networking) << "Timed out, received" << _bytesReceived << "total" << _bytesTotal; + qCDebug(networking) << "Timed out loading" << _url.fileName() << "received" << _bytesReceived << "total" << _bytesTotal; // Fall through to other cases } // FALLTHRU diff --git a/scripts/developer/tests/unit_tests/moduleTests/entity/entityPreloadAPIError.js b/scripts/developer/tests/unit_tests/moduleTests/entity/entityPreloadAPIError.js index 2dac86947b..eaee178b0a 100644 --- a/scripts/developer/tests/unit_tests/moduleTests/entity/entityPreloadAPIError.js +++ b/scripts/developer/tests/unit_tests/moduleTests/entity/entityPreloadAPIError.js @@ -2,12 +2,12 @@ // test module method exception being thrown within preload (function() { var apiMethod = Script.require('../exceptions/exceptionInFunction.js'); - print("apiMethod", apiMethod); + print(Script.resolvePath(''), "apiMethod", apiMethod); return { preload: function(uuid) { // this next line throws from within apiMethod print(apiMethod()); - print("entityPreloadAPIException::preload -- never seen --", uuid); + print("entityPreloadAPIException::preload -- never seen --", uuid, Script.resolvePath('')); }, }; }); From 1b2593fd2668af50c75a96eae48b0f2102e32d2a Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Thu, 8 Nov 2018 11:28:07 -0800 Subject: [PATCH 07/13] CR round 4 --- libraries/gpu/src/gpu/Texture_ktx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/gpu/src/gpu/Texture_ktx.cpp b/libraries/gpu/src/gpu/Texture_ktx.cpp index b400a81a1f..f471baf2c7 100644 --- a/libraries/gpu/src/gpu/Texture_ktx.cpp +++ b/libraries/gpu/src/gpu/Texture_ktx.cpp @@ -271,7 +271,7 @@ void KtxStorage::assignMipData(uint16 level, const storage::StoragePointer& stor auto& imageDesc = _ktxDescriptor->images[level]; if (storage->size() != imageDesc._imageSize) { qWarning() << "Invalid image size: " << storage->size() << ", expected: " << imageDesc._imageSize - << ", level: " << level; + << ", level: " << level << ", filename: " << QString::fromStdString(_filename); return; } From 5cf2041c65a7d47c9d72e3ae67663816d874bafc Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 9 Nov 2018 10:38:20 -0800 Subject: [PATCH 08/13] Remove unused variable --- libraries/networking/src/AssetResourceRequest.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/libraries/networking/src/AssetResourceRequest.cpp b/libraries/networking/src/AssetResourceRequest.cpp index bc34243c66..423e4f3521 100644 --- a/libraries/networking/src/AssetResourceRequest.cpp +++ b/libraries/networking/src/AssetResourceRequest.cpp @@ -216,8 +216,6 @@ void AssetResourceRequest::onDownloadProgress(qint64 bytesReceived, qint64 bytes if (bytesReceived != bytesTotal && now - _lastProgressDebug > std::chrono::seconds(DOWNLOAD_PROGRESS_LOG_INTERVAL_SECONDS)) { - int percentage = roundf((float) bytesReceived / (float) bytesTotal * 100.0f); - _lastProgressDebug = now; } } From df7486d0f5486d71008f54fc5044f222f0b60910 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 9 Nov 2018 10:40:46 -0800 Subject: [PATCH 09/13] Remove unused variable, fixing unix build warning --- libraries/model-networking/src/model-networking/ModelCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/model-networking/src/model-networking/ModelCache.cpp b/libraries/model-networking/src/model-networking/ModelCache.cpp index e033bd8b0e..8e87566610 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.cpp +++ b/libraries/model-networking/src/model-networking/ModelCache.cpp @@ -237,7 +237,7 @@ void GeometryReader::run() { } else { throw QString("url is invalid"); } - } catch (const QString& error) { + } catch { auto resource = _resource.toStrongRef(); if (resource) { From be5dc36ccd735f6df492b4f7aaa0643faeee4683 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 9 Nov 2018 14:23:15 -0800 Subject: [PATCH 10/13] Actually fix build error...hopefully! --- libraries/model-networking/src/model-networking/ModelCache.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/model-networking/src/model-networking/ModelCache.cpp b/libraries/model-networking/src/model-networking/ModelCache.cpp index 8e87566610..eac2b65a5e 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.cpp +++ b/libraries/model-networking/src/model-networking/ModelCache.cpp @@ -237,8 +237,7 @@ void GeometryReader::run() { } else { throw QString("url is invalid"); } - } catch { - + } catch (const std::exception&) { auto resource = _resource.toStrongRef(); if (resource) { QMetaObject::invokeMethod(resource.data(), "finishedLoading", From 7a14cb1bbc4e8d4a45704d664093d5946dbd4a97 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Mon, 12 Nov 2018 13:36:14 -0800 Subject: [PATCH 11/13] Remove additional url logging message. --- libraries/networking/src/ResourceCache.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/networking/src/ResourceCache.cpp b/libraries/networking/src/ResourceCache.cpp index 98e6a453e9..3c29fcd441 100644 --- a/libraries/networking/src/ResourceCache.cpp +++ b/libraries/networking/src/ResourceCache.cpp @@ -699,7 +699,6 @@ void Resource::makeRequest() { _request->setByteRange(_requestByteRange); _request->setFailOnRedirect(_shouldFailOnRedirect); - qCDebug(resourceLog).noquote() << "Starting request for:" << _url.toDisplayString(); emit loading(); connect(_request, &ResourceRequest::progress, this, &Resource::onProgress); From 762033580d0b9bfb080c51b49e725a3c95d0e4b0 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Mon, 12 Nov 2018 13:48:08 -0800 Subject: [PATCH 12/13] And remove another url log item. --- libraries/networking/src/ResourceCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/networking/src/ResourceCache.cpp b/libraries/networking/src/ResourceCache.cpp index 3c29fcd441..0d5e987cca 100644 --- a/libraries/networking/src/ResourceCache.cpp +++ b/libraries/networking/src/ResourceCache.cpp @@ -764,7 +764,7 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) { bool willRetry = false; switch (result) { case ResourceRequest::Result::Timeout: { - qCDebug(networking) << "Timed out loading" << _url.fileName() << "received" << _bytesReceived << "total" << _bytesTotal; + qCDebug(networking) << "Timed out loading: received " << _bytesReceived << " total " << _bytesTotal; // Fall through to other cases } // FALLTHRU From 938b45d3da8632ec9185013880ac95697980b4f4 Mon Sep 17 00:00:00 2001 From: Howard Stearns Date: Tue, 13 Nov 2018 11:05:45 -0800 Subject: [PATCH 13/13] more removal --- libraries/fbx/src/OBJReader.cpp | 4 ++-- libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/fbx/src/OBJReader.cpp b/libraries/fbx/src/OBJReader.cpp index 87fae0e965..0772dce7e2 100644 --- a/libraries/fbx/src/OBJReader.cpp +++ b/libraries/fbx/src/OBJReader.cpp @@ -845,7 +845,7 @@ HFMModel::Pointer OBJReader::readOBJ(QByteArray& data, const QVariantHash& mappi preDefinedMaterial.diffuseColor = glm::vec3(1.0f); QVector extensions = { "jpg", "jpeg", "png", "tga" }; QByteArray base = basename.toUtf8(), textName = ""; - qCDebug(modelformat) << "OBJ Reader looking for default texture of" << url; + qCDebug(modelformat) << "OBJ Reader looking for default texture"; for (int i = 0; i < extensions.count(); i++) { QByteArray candidateString = base + extensions[i]; if (isValidTexture(candidateString)) { @@ -866,7 +866,7 @@ HFMModel::Pointer OBJReader::readOBJ(QByteArray& data, const QVariantHash& mappi foreach (QString libraryName, librariesSeen.keys()) { // Throw away any path part of libraryName, and merge against original url. QUrl libraryUrl = _url.resolved(QUrl(libraryName).fileName()); - qCDebug(modelformat) << "OBJ Reader material library" << libraryName << "used in" << _url; + qCDebug(modelformat) << "OBJ Reader material library" << libraryName; bool success; QByteArray data; std::tie(success, data) = requestData(libraryUrl); diff --git a/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp b/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp index d1b5969793..4068865274 100644 --- a/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp +++ b/libraries/gpu-gl/src/gpu/gl41/GL41BackendTexture.cpp @@ -69,12 +69,12 @@ GLTexture* GL41Backend::syncGPUObject(const TexturePointer& texturePointer) { break; case TextureUsageType::STRICT_RESOURCE: - qCDebug(gpugllogging) << "Strict texture " << texture.source().c_str(); + qCDebug(gpugllogging) << "Strict texture"; object = new GL41StrictResourceTexture(shared_from_this(), texture); break; case TextureUsageType::RESOURCE: - qCDebug(gpugllogging) << "variable / Strict texture " << texture.source().c_str(); + qCDebug(gpugllogging) << "variable / Strict texture"; object = new GL41ResourceTexture(shared_from_this(), texture); _textureManagement._transferEngine->addMemoryManagedTexture(texturePointer); break;