Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaner error around missing windows.wt on linux and elsewhere (was Surge hard crashes in Renoise / Debian 10) #1247

Closed
codecollider opened this issue Oct 13, 2019 · 17 comments · Fixed by #1248
Milestone

Comments

@codecollider
Copy link

Surge crashes Renoise in Debian 10 / XFCE with the following window:

https://i.imgur.com/0j5P27D.png

Version Build Oct. 6, VST2, 64 Bit

To Reproduce
Happens spontaneously

Desktop (please complete the following information):

  • OS: Debian 10
  • Renoise
  • 3.2.1

Last line in Renoise terminal:


renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
^CRenoise LOG> Application: Caught signal:2 - Terminating...
Renoise LOG> Application: Saving a backup...
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
Renoise LOG> VstWindow: Closing the Editor...
Renoise LOG> VstWindow: Editor was closed
Renoise LOG> Application: Exit...
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
renoise: src/common/thread/CriticalSection.h:33: void Surge::CriticalSection::enter(): Assertion `!(refcount > 10)' failed.
Renoise LOG> Shut down: Stopped the Player
Renoise LOG> MIDI: Shut down: Closing all acquired MIDI devices...
Renoise LOG> MIDI: Shutting down MIDI server...
Renoise LOG> MIDI-IO: Closing MIDI in device 'MPK Mini Mk II MIDI 1'...
Renoise LOG> MIDI-IO: Shutting down the MIDI sequencers...
Renoise LOG> Shut down: Stopped and released all MIDI-Devices
Renoise LOG> Jack: Deactivate...
Renoise LOG> Jack: Releasing port 'renoise:input_01_left'
Renoise LOG> Jack: Releasing port 'renoise:input_01_right'
Renoise LOG> Jack: Releasing port 'renoise:output_01_left'
Renoise LOG> Jack: Releasing port 'renoise:output_01_right'
Renoise LOG> Jack: Close...
^CRenoise LOG> Application: Caught signal:2 - Terminating...
Renoise LOG> Jack: Jack was released
Renoise LOG> Shut down: Stopped and released the active Audio-Device
Renoise LOG> Shut down: Destroyed the Player
Renoise LOG> Shut down: Destroyed the Document
Renoise LOG> Shut down: Destroyed the GraphPort
Renoise LOG> Shut down: Saving the Preferences
Renoise LOG> Shut down: Destroyed the Preferences
Renoise LOG> Shut down: App is down
Renoise LOG> Application: Exit OK
Renoise LOG> VstPlugs: Releasing /home/marco/.vst/lsp-plugins-lxvst-1.1.10/lsp-plugins-vst-para-equalizer-x16-stereo.so (finalizing the plugin)...
Renoise LOG> VstPlugs: Releasing /home/marco/.vst/lsp-plugins-lxvst-1.1.10/lsp-plugins-vst-para-equalizer-x16-stereo.so (unloading the DLL)...
Renoise LOG> VstPlugs: /home/marco/.vst/lsp-plugins-lxvst-1.1.10/lsp-plugins-vst-para-equalizer-x16-stereo.so was successfully released
Renoise LOG> VstPlugs: Releasing /usr/lib/vst/carla.vst/CarlaRackFX.so (finalizing the plugin)...
Renoise LOG> VstPlugs: Releasing /usr/lib/vst/carla.vst/CarlaRackFX.so (unloading the DLL)...
Renoise LOG> VstPlugs: /usr/lib/vst/carla.vst/CarlaRackFX.so was successfully released
Renoise LOG> VstPlugs: Releasing /home/marco/.vst/wolf-shaper-vst.so (finalizing the plugin)...
Renoise LOG> VstPlugs: Releasing /home/marco/.vst/wolf-shaper-vst.so (unloading the DLL)...
Renoise LOG> VstPlugs: /home/marco/.vst/wolf-shaper-vst.so was successfully released
Renoise LOG> LADSPA: Unloading plugin 'MVerb'...
Renoise LOG> LADSPA: Unloading plugin 'MVerb'...
Renoise LOG> VstPlugs: Releasing /home/marco/.vst/Surge.so (finalizing the plugin)...
Renoise LOG> VstPlugs: Releasing /home/marco/.vst/Surge.so (unloading the DLL)...
Renoise LOG> VstPlugs: /home/marco/.vst/Surge.so was successfully released
Renoise LOG> VstPlugs: Releasing /usr/lib/vst/helm.so (finalizing the plugin)...
Renoise LOG> VstPlugs: Releasing /usr/lib/vst/helm.so (unloading the DLL)...
Renoise LOG> VstPlugs: /usr/lib/vst/helm.so was successfully released
Renoise LOG> VstPlugs: Releasing /usr/lib/vst/helm.so (finalizing the plugin)...
Renoise LOG> VstPlugs: Releasing /usr/lib/vst/helm.so (unloading the DLL)...
Renoise LOG> VstPlugs: /usr/lib/vst/helm.so was successfully released
Renoise LOG> VstPlugs: Releasing /home/marco/.vst/tunefish/Tunefish4.so (finalizing the plugin)...
Renoise LOG> VstPlugs: Releasing /home/marco/.vst/tunefish/Tunefish4.so (unloading the DLL)...
Renoise LOG> VstPlugs: /home/marco/.vst/tunefish/Tunefish4.so was successfully released
Renoise LOG> Application: Finalizing the API...
Renoise LOG> Closing log file...




@baconpaul
Copy link
Collaborator

Huh that only happens when reading wav files goes crazy. I’ve only seen it in the wild when reading a mis-formatted wav on windows and have never been able to capture it reliably.

Do you have all the factory defaults in the right place? Most importantly, is your “windows.wt” file in the correct spot? They need to be in right share location - either global or local - for the synth to start up properly.

My guess (guess) from your other note is that you are trying to run the synth with the assets in a non-standard location, you haven’t changed the location in the code though, and the load of window.wt in SurgeStorage which is needed to set up the window oscillator interpolation samples is failing. But that’s just a guess.

@baconpaul
Copy link
Collaborator

load_wt_wt(datapath + "windows.wt", &WindowWT);

That line is where the data path + “windows.wt” is loaded. We probably want to do some error checking on that file existing (but you would think the configuration.xml check would have already failed if the windows.wt file isn’t in the data path).

@baconpaul
Copy link
Collaborator

Oh on linux we bake in configuration.xml so you actually won’t get an error message if your /usr/share is broken. So I bet that’s it.

I think you either need to

  1. make sure the shared assets are in the right place or
  2. modify the code to read from the place you want appropriately

And when I’m next in the code, for defensive purposes, I’ll

  1. put an error check on that load of windows.wt that throws an error and stops the synth if it isn’t found, like we do with configuration.xml on mac and windows.

@baconpaul
Copy link
Collaborator

Oh also: if this is what’s reliably causing the crit section ref count runaway it’s great to have an example of that breakage so i can fix the code to do something more reasonable. I’m away from my laptop this weekend but will definitely look. I may end up splitting this into a couple of issues but for now I’ll tag this one 1.6.3 to at least make sure the defense goes into the next release.

@baconpaul baconpaul added this to the 1.6.3 milestone Oct 13, 2019
@baconpaul
Copy link
Collaborator

And finally finally as you can see here

const char* xdgDataPath = getenv("XDG_DATA_HOME");

The path from which the files are read are controlled by XDG_DATA_PATH if set, and tries a local copy before resorting to global. that should answer your question over in the issue as to whether they can be somewhere else. I suppose that same code could also check SURGE_SHARE_LOCATION env or something and default to the behavior we currently have if not set. If you want to make it do that and fire in a PR I’d be happy to review and merge that sort of functionality.

@codecollider
Copy link
Author

Hi Paul,

thanks for the comments. I´m not a C programmer, so I really can´t help here. I didn´t install Surge by the installer, but just put surge.so and the surge presets folder into my home folder. If I undertand correctly surge wants to have the surge preset folder also in /usr/share . So the solution would be to copy the appropriate folder with root priveleges by hand into /usr/share. Right? Is the installer doing anything else?

@baconpaul
Copy link
Collaborator

Yes the contents of resources/data need to be in /use/share/Surge or ~/.local/share/Surge

Both the installer and the build-linux.sh script will do this for you

Best

@codecollider
Copy link
Author

I will try to put them in ~/.local/share/Surge. IIRC I tried this and it didn´t work. At least there was still an error message window popping up. Maybe this can be deactivated?

@baconpaul
Copy link
Collaborator

Surge needs all that content laid out properly to work. It needs to be laid out correctly also (which is why we have the build script and the deb file to do so). So there’s sort of not anything to deactivate if you know what I mean!

@codecollider
Copy link
Author

The deb installation was not working in Debian 10 due to a missing library. That´s why I had to compile it by myself. So, I guess I have to use the sh script afterwards to install it. I have to check if I have it in the folder when I´m back home.

@baconpaul
Copy link
Collaborator

Yeah that’s the xcb0 thing? #931 and #1143 both discuss that. I’m not a Linux desktop user really so I am not sure what the right thing is.

@baconpaul
Copy link
Collaborator

Oh and if you build with build Linux you can also install with it

build-linux.sh install —project=vst2 —local

Should do it

@codecollider
Copy link
Author

Great, I do that then. Stupid question, but I need root privileges for that, right?

@baconpaul
Copy link
Collaborator

The local option puts everything in your home directory so no not if you include local

Without local yes you would

@codecollider
Copy link
Author

Perfect. Thanks!

@baconpaul baconpaul changed the title Surge hard crashes in Renoise / Debian 10 Cleaner error around missing windows.wt on linux and elsewhere (was Surge hard crashes in Renoise / Debian 10) Oct 14, 2019
@tank-trax
Copy link
Collaborator

./build-linux.sh -p vst2 build

to build only the VST2

./build-linux.sh -l install

to install local

./build-linux.sh -l uninstall

to remove locally installed files

baconpaul added a commit to baconpaul/surge that referenced this issue Oct 15, 2019
If Windows.wt is missing, surge can go horribly awry. We
issued no error message in this case. So do so now.

Closes surge-synthesizer#1247
@baconpaul
Copy link
Collaborator

OK I'm pushing a change to make the windows.wt fail to load a much noisier error. That will close this issue.

I'll open a separate issue not in the 1.6.3 pipeline for why this failure causes the criticsection overflow.

baconpaul added a commit to baconpaul/surge that referenced this issue Oct 15, 2019
If Windows.wt is missing, surge can go horribly awry. We
issued no error message in this case. So do so now.

Closes surge-synthesizer#1247
baconpaul added a commit that referenced this issue Oct 15, 2019
If Windows.wt is missing, surge can go horribly awry. We
issued no error message in this case. So do so now.

Closes #1247
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants