surge-synthesizer / surge

Synthesizer plug-in (previously released as Vember Audio Surge)
https://surge-synthesizer.github.io/
GNU General Public License v3.0
3.08k stars 394 forks source link

Logic crashed validation (multiple startup deal improperly with locked db) #4822

Closed chigkim closed 3 years ago

chigkim commented 3 years ago

Bug Description: I installed the Surge Nightly_XT, and Logic validation fails.

Surge Version

Reproduction Steps:

  1. Install
  2. Launch Logic

Expected Behavior: Validation passes.

Computer Information (please complete the following information):

Additional Information:

validating Audio Unit Surge XT by Surge Synth Team:

    AU Validation Tool
    Version: 1.8.0 
    Copyright 2003-2019, Apple Inc. All Rights Reserved.
    Specify -h (-help) for command options

--------------------------------------------------
VALIDATING AUDIO UNIT: 'aumu' - 'SgXT' - 'VmbA'
--------------------------------------------------
Manufacturer String: Surge Synth Team
AudioUnit Name: Surge XT
Component Version: 0.9.0 (0x900)

* * PASS
--------------------------------------------------
TESTING OPEN TIMES:
COLD:
SurgeXT Startup
  - Version      : 0.9.nightly.bd44a5c
  - Build Info   : x86_64 AppleClang-12.0.0.12000032
  - Build Time   : 2021-08-10 13:24:09
  - JUCE Version : 60008
  - Accessiblity : Enabled
  - JUCE Host Context Support Enabled
  - CPU          : Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz

PatchDB : Opening sqlitedb /Users/cgk/Documents/Surge XT/SurgePatches.db
        : schema check. DBVersion='4' SchemaVersion='4'
        : Schema matches. Reusing database.
SynthProcessor: /Users/runner/work/1/s/surge/src/surge_synth_juce/SurgeSynthAUExtensions.cpp
Time to open AudioUnit:         136.388 ms
WARM:
SurgeXT Startup
  - Version      : 0.9.nightly.bd44a5c
  - Build Info   : x86_64 AppleClang-12.0.0.12000032
  - Build Time   : 2021-08-10 13:24:09
  - JUCE Version : 60008
  - Accessiblity : Enabled
  - JUCE Host Context Support Enabled
  - CPU          : Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Sync Accident.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Acid Seq 3.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Burial Ground.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Filter Buildup.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Gate Chord.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Phase 1.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/When Good Combs Go Bad.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Phase 2.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Multi Seq.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Damn Aliens.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/FM Seq.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Wabbit MW.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Octave Arp.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Bit Seq.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Evilish.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/FM Motion Sweep.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Retrig Me.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Tyskland.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Distorted Glassy Seq.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Sync Arp.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Sequences/Table Seq.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/MPE/Lead With A Bell Attack.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/MPE/Moving Day In The Caves.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/MPE/Sticky.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/MPE/The Shoebox.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/MPE/Bloom.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/MPE/The Elephant Told You.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/MPE/Baritonosaurus Saxus.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/MPE/Coteaux du Giennois.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/MPE/Pad Plink 'n' Move.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Vocoder/Noise.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Vocoder/Pop.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Vocoder/Solo.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Templates/Init Saw.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Templates/Audio In Left Osc 1 + Right Osc 2.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Templates/Audio In Mono Osc 1.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Templates/Audio In Left Scene A + Right Scene B.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Templates/Init Emu WT.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Templates/Init Sine.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Templates/Init Emu VA.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Templates/Init Emu.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Templates/Init FM2.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Templates/Init Env Per Osc.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Templates/Init Karplus-Strong.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Templates/Audio In Stereo Osc 1.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Delay Pops 2.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Hybrid 1.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/80s Gliss.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Asymmetry.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Delay Dancer.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Tinker.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Brut de Bollebygd.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Harmonics 2.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Icebreaker.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Delay Pops 3.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Delay Pops 1.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Hybrid 2.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Square Blinks.fxp'
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Falling Down.fxp'

PatchDB : Opening sqlitedb /Users/cgk/Documents/Surge XT/SurgePatches.db
        : schema check. DBVersion='4' SchemaVersion='4'
        : Schema matches. Reusing database.
        - Loading '/Library/Application Support/Surge XT/patches_factory/Plucks/Pie.fxp'
SynthProcessor: /Users/runner/work/1/s/surge/src/surge_synth_juce/SurgeSynthAUExtensions.cpp
libc++abi: terminating with uncaught exception of type Surge::PatchStorage::SQL::Exception: SQL Error[5]: database is locked

validation result: crashed validation
baconpaul commented 3 years ago

Oh wow yeah that’s my fault. The validation will start multiple surges and I don’t deal with that case properly. Thanks for the excellent bug report

as a quick workaround start the xt standalone and let it run for a minute before trying in logic

baconpaul commented 3 years ago

Fix here is theee things (note to self)

  1. catch that exception obvs
  2. Only start patch db when you look at it
  3. Add a “loading” screen if loading is going on

I’ll close this when I merge 1 and 2; and add 3 to the patch browser book of work issue

chigkim commented 3 years ago
  1. Opened the standalone Surge XT.

  2. Let it run for a while.

  3. Closed the app.

  4. Opened Logic

  5. Rescanned in plugin manager.

  6. Validation still failed.

baconpaul commented 3 years ago

Same error? yeah I also need to catch that exception I will fix today or tomorrow. Thank you for the excellent bug report - really clear

chigkim commented 3 years ago

Yes I got the same error.

However, I restarted, rescanned, and it passed!!!

baconpaul commented 3 years ago

Yeah it’s a timing tbing if the db is built which is why running headless for a bit plus a restart masked it. I will def get a fix in though. Thanks for the great report!

baconpaul commented 3 years ago

OK super easy to repro.

Just build latest XT at head rm -rf ~/Documents/Surge XT/SurgetPatches.db auval -v aumu SgXT VmbA

baconpaul commented 3 years ago

OK I have a fix for the validation crash. Still get a huge mess of errors though if you end up starting two patch browsers at once against a fresh db. I'll add that over in #2359 though along with the status indicator.

baconpaul commented 3 years ago

OK great this problem on crash-at-validation is now fixed. Thanks for the excellent report.

baconpaul commented 3 years ago

(new nightly will have fix in ~1hour)