diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index a9746f2c..7a4e99fd 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -18,42 +18,49 @@ jobs: target: scxt-core cmakeConfig: -A x64 runTests: false + clapValidate: false - name: "windows clang VST3" os: windows-latest target: scxt_clapfirst_VST3 cmakeConfig: -GNinja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang runTests: false + clapValidate: false - name: "mac AU" os: macos-latest target: scxt_clapfirst_AU cmakeConfig: -GNinja runTests: true + clapValidate: false - name: "ubuntu Standalone" os: ubuntu-latest target: scxt_clapfirst_Standalone cmakeConfig: -GNinja runTests: false + clapValidate: false - name: "win unity" os: windows-latest target: shortcircuit-products cmakeConfig: -GNinja -DCMAKE_UNITY_BUILD=TRUE -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang runTests: false + clapValidate: true - name: "mac unity" os: macos-latest target: shortcircuit-products cmakeConfig: -GNinja -DCMAKE_UNITY_BUILD=TRUE runTests: false + clapValidate: true - name: "ubuntu unity" os: ubuntu-latest target: shortcircuit-products cmakeConfig: -GNinja -DCMAKE_UNITY_BUILD=TRUE runTests: false + clapValidate: true steps: - name: Checkout code @@ -71,6 +78,12 @@ jobs: cmake -S . -B ./build ${{ matrix.cmakeConfig }} -DCMAKE_BUILD_TYPE=Debug cmake --build ./build --config Debug --target ${{ matrix.target }} --parallel 4 + - name: Run Clap Validator + if: ${{ matrix.clapValidate }} + uses: jatinchowdhury18/clap-val-action@main + with: + plugin_path: "./build/shortcircuit-products/Shortcircuit XT.clap" + - name: Run Tests if: ${{ matrix.runTests }} run: | diff --git a/clients/clap-first/scxt-plugin/scxt-plugin.cpp b/clients/clap-first/scxt-plugin/scxt-plugin.cpp index f2875cd0..c2944840 100644 --- a/clients/clap-first/scxt-plugin/scxt-plugin.cpp +++ b/clients/clap-first/scxt-plugin/scxt-plugin.cpp @@ -151,10 +151,15 @@ bool SCXTPlugin::stateLoad(const clap_istream *istream) noexcept } } buffer[totalRd] = 0; + if (totalRd == 0) + { + SCLOG("Received stream size 0. Invalid state"); + return false; + } - auto xml = std::string(buffer.data()); + auto data = std::string(buffer.data()); - synchronousEngineUnstream(engine, xml); + synchronousEngineUnstream(engine, data); scxt::messaging::client::clientSendToSerialization( scxt::messaging::client::RequestHostCallback{(uint64_t)RESCAN_PARAM_IVT}, @@ -450,8 +455,6 @@ bool SCXTPlugin::handleEvent(const clap_event_header_t *nextEvent) break; default: { - std::cout << __FILE__ << ":" << __LINE__ << " Unhandled event " << nextEvent->type - << std::endl; } break; } diff --git a/src/browser/browser_db.cpp b/src/browser/browser_db.cpp index 975d6f71..15ff2e69 100644 --- a/src/browser/browser_db.cpp +++ b/src/browser/browser_db.cpp @@ -501,7 +501,8 @@ CREATE TABLE IF NOT EXISTS DeviceLocations ( { std::ostringstream oss; oss << le.what() << "\n" - << "Patch database is locked for writing. Most likely, another Surge " + << "Patch database is locked for writing. Most likely, another " + "Shortcircuit " "XT instance has exclusive write access. We will attempt to retry " "writing up to 10 more times. " "Please dismiss this error in the meantime!\n\n Attempt: "