Jump to content


Photo

[Fixed B3] Linux: Some Juce Based Vst Pluings Not Correctly Restored


  • This topic is locked This topic is locked
22 replies to this topic

#1 bluszcz

bluszcz

    Local Chief Member

  • Normal Members
  • PipPipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:Copenhagen

Posted 19 March 2011 - 23:25

Symptoms, looks like bug (started after upgrade to 2.7b2, on both laptops):

I have a track with few VSTi plugins (Loomer Sequent, Tal DUB3/Filter):

after save the track and load again - some presets for VST are reseted (like volume...).

I attach two screenshot for SequentVST plugin - after save, and after reload.

after save:
Posted Image


after reload:
Posted Image

I think that problem exists during save - when I am loading track save in renoise 2.6 - I have VST presets.

Cheers and thanks for huge 2.7 update.

#2 bluszcz

bluszcz

    Local Chief Member

  • Normal Members
  • PipPipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:Copenhagen

Posted 20 March 2011 - 09:28




yyyyyy,,

i was pretty sure that title of this topic was different.

however - problem exists with not only Sequent - ALL vst plugins used in the song.

It affects (all of the are using JUCE afaik):

TAL Plugins
Mr Alias Pro
Sequent VST

Edited by bluszcz, 20 March 2011 - 09:31.


#3 bluszcz

bluszcz

    Local Chief Member

  • Normal Members
  • PipPipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:Copenhagen

Posted 20 March 2011 - 11:07

yyyyyy,,

however - problem exists with not only Sequent - ALL vst plugins used in the song.
It affects (all of the are using JUCE afaik):


Ok,

as attachment broken track with two VST Plugins,

one is KillerRinger, second is TAL Filter2.

Both from Ubuntu with package from KXStudio (10.10, I believe).

I don't know what is difference between plugins on API level - but KillerRinger survives Save/Load operation in opposite to Filter2 (or Sequent, Dub3...) which dies and need reload plugin.

Attached also log from the Renoise.

Attached Files



#4 taktik

taktik

    Renoise Developer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 15040 posts
  • Gender:Male
  • Location:Berlin, Germany
  • Interests:füße waschen

Posted 20 March 2011 - 12:23

Hey bluszcz,

thanks for reporting.
Does this happen in Renoise 2.6 as well, and also in other VST hosts? Would be great if you could try this out.

#5 bluszcz

bluszcz

    Local Chief Member

  • Normal Members
  • PipPipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:Copenhagen

Posted 20 March 2011 - 13:44

Hey bluszcz,

thanks for reporting.
Does this happen in Renoise 2.6 as well, and also in other VST hosts? Would be great if you could try this out.


Hi taktik.

I will make these tests today afternoon and will send info.

#6 bluszcz

bluszcz

    Local Chief Member

  • Normal Members
  • PipPipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:Copenhagen

Posted 20 March 2011 - 14:30

Hey bluszcz,

thanks for reporting.
Does this happen in Renoise 2.6 as well, and also in other VST hosts? Would be great if you could try this out.


OK made additional tests on second Linux laptop.

Testes with TAL Filter 2

On laptop B,

Renoie 2.6.1 read and writes song correctly.
Renoise 2.7b2 read and writes and song correctly.

On laptop A(which I used to create this thread and make screenshot),

Renoie 2.6.1 read and writes song correctly.
Renoise 2.7b2 read correctly songs from all other instances of Renoise (laptop A 2.6.1 /2.7b2, laptop B 2.6.1), (with keeping VST states), during save and reload same song in other Renoise 2.7b2 whenever - there are VST params missing.

Tests will other VST send later.

#7 bluszcz

bluszcz

    Local Chief Member

  • Normal Members
  • PipPipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:Copenhagen

Posted 20 March 2011 - 19:21

Tests will other VST send later.


Tried with energyXT 2.6beta + TAL Filter 2 + 2xSequent VST (one custom settings, second from preset banks), created drums tracks + added output to three plugins.

After reload track - I still had settings.

Can I help somehow more?

#8 taktik

taktik

    Renoise Developer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 15040 posts
  • Gender:Male
  • Location:Berlin, Germany
  • Interests:füße waschen

Posted 20 March 2011 - 19:25

Strange thing is that everything's OK with Laptop B, this only happens on laptop A.
Are you using the sample plug versions there, the same audio settings? What else may be different?

Also I do not understand what "reload same song in other Renoise 2.7b2 whenever" means. Does this only happen if you have more than once instance open?

#9 bluszcz

bluszcz

    Local Chief Member

  • Normal Members
  • PipPipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:Copenhagen

Posted 20 March 2011 - 23:25

Strange thing is that everything's OK with Laptop B, this only happens on laptop A.
Are you using the sample plug versions there, the same audio settings? What else may be different?

Also I do not understand what "reload same song in other Renoise 2.7b2 whenever" means. Does this only happen if you have more than once instance open?


On both I am using same version of TAL Filter, same version of Renoise and same version of SequentVST.


About "reload same song in other Renoise 2.7b2 whenever" - typo.

Should be "reload same song in other Renoise 2.7b2 wherever, same laptop, other laptop - fails". Which means, that after load this song - lack of VST presets.

On both using same version of system packages (jack and so on) - latest apt-get update && upgrade.

Well, settings audio are different at some point - on laptop B (which works) I am using internal HDA Intel card, on Laptop A - ALESIS Multimix Mixer...

But it shoudnt be related with it, I think.

Any idea what I can check / which prefs?

:(

#10 taktik

taktik

    Renoise Developer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 15040 posts
  • Gender:Male
  • Location:Berlin, Germany
  • Interests:füße waschen

Posted 21 March 2011 - 15:38

Are you using a 64bit linux (and Renoise) on one machine and 32bit on the other one?

The Tal Filter 2 plugin presets are completely garbled in your song. Strange is also that a freshly initialized "Tal Filter 2" works just fine, but the one from your song does not.

Maybe you've saved the song in a 32bit version, loaded and resaved them in a 64bit version OS or vice versa? In theory this should not be a problem, if the plugin properly handles this, is aware of this. Will also check if that's somehow Renoises fault

#11 bluszcz

bluszcz

    Local Chief Member

  • Normal Members
  • PipPipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:Copenhagen

Posted 21 March 2011 - 15:50

Are you using a 64bit linux (and Renoise) on one machine and 32bit on the other one?

The Tal Filter 2 plugin presets are completely garbled in your song. Strange is also that a freshly initialized "Tal Filter 2" works just fine, but the one from your song is completely broken.

Maybe you've saved the song in a 32bit version, loaded and resaved them in a 64bit version OS or vice versa? In theory this should not be a problem, if the plugin properly handles this, is aware of this. Will also check if that's somehow Renoises fault


Hi taktik.
On both machines I am using 32 bit OS with all 32 bit packages.

Let me know if I can help more to investigate it - running some gdb or smth :)

#12 taktik

taktik

    Renoise Developer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 15040 posts
  • Gender:Male
  • Location:Berlin, Germany
  • Interests:füße waschen

Posted 21 March 2011 - 16:09

32 vs 64bit plugin parameter im/exports also seem to work.


---

When loading this song:
Attached File  VST.xrns   13.35KB   7 downloads
Fixing the volume parameters (let's say setting them to 0.5), then loading it again. Are the parameters then garbled again?

---

Can you also replicate this by starting a new song with only once instance of the TAL 2 plugin, then loading/saving this thing?

---

Probably some of the plugs or Renoise in combination with the plugins messes around with memory, so this only only happens randomly. Either way its hard to do anything here without being able to replicate this.

Maybe someone else here has the same problem and/or any idea?

---

Which sample rates are using on laptop A/B?

#13 Loomer

Loomer

    Member

  • Normal Members
  • PipPip
  • 31 posts

Posted 21 March 2011 - 19:36

I may have seen something similar to this before, but despite spending days (literally) looking into it, I never managed to come close to replicating in a development environment. If it is the same bug, it could be a conflict with LADSPA plugins - bluszcz, could you try disabling LADSPA support in your Renoise preferences? Thanks!

@taktik - If you need a Sequent NFR for testing, just me know and I can sort you out.

#14 bluszcz

bluszcz

    Local Chief Member

  • Normal Members
  • PipPipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:Copenhagen

Posted 22 March 2011 - 12:02

I may have seen something similar to this before, but despite spending days (literally) looking into it, I never managed to come close to replicating in a development environment. If it is the same bug, it could be a conflict with LADSPA plugins - bluszcz, could you try disabling LADSPA support in your Renoise preferences? Thanks!

@taktik - If you need a Sequent NFR for testing, just me know and I can sort you out.


Hi guys, and thanks for replies.

I will send you results of tests today after work.

#15 bluszcz

bluszcz

    Local Chief Member

  • Normal Members
  • PipPipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:Copenhagen

Posted 22 March 2011 - 19:25

I may have seen something similar to this before, but despite spending days (literally) looking into it, I never managed to come close to replicating in a development environment. If it is the same bug, it could be a conflict with LADSPA plugins - bluszcz, could you try disabling LADSPA support in your Renoise preferences? Thanks!

@taktik - If you need a Sequent NFR for testing, just me know and I can sort you out.


Hej Loomer.

I have only two words to say - LADSPA FTW! ;)

Yes, turns off the ladspa turns on the SequentVST. Turns on ladspa plugins kills Juce.

Taktik - since I have difficult to reproduce environment - maybe will be possible somehow to fix it.

Loomer - thanks again, since I am not able to work anymore in 2.6 (2.7 is killer) it saved my life :) With this good mood I can now take a closer look to Aspect and String.

Cheers!

#16 taktik

taktik

    Renoise Developer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 15040 posts
  • Gender:Male
  • Location:Berlin, Germany
  • Interests:füße waschen

Posted 23 March 2011 - 09:40

If some of the LADPAs manage to break the Juce framework (with a buffer overflow maybe?), this can create a lot more random problems or even random crashes in Renoise. Pretty important to find that buggy plug then. Could try a binary search (throw away half of all LADSPAs, restart Renoise, test, throw away another half) to find the LADSPA that is causing this.

Another problem may be the locale settings. Maybe some of the LADSPAs do change the locale, and the juice framework relies on LC_NUMERIC="C" to be set for its im/export, but do not make sure its set to "C"?

Loomer: Could you quickly try out if a setlocale(LC_NUMERIC, "C"), setlocale(LC_LC_CTYPE="C") solves the issue with SequentVST and LADSPAs?

We could also enforce a "C" locale when instantiating plugins, and before loading/saving the plugin. We already do so for our imports, but do not explicitly do this for every plugin that gets loaded/saved.

#17 Loomer

Loomer

    Member

  • Normal Members
  • PipPip
  • 31 posts

Posted 23 March 2011 - 13:53

If some of the LADPAs manage to break the Juce framework (with a buffer overflow maybe?), this can create a lot more random problems or even random crashes in Renoise. Pretty important to find that buggy plug then. Could try a binary search (throw away half of all LADSPAs, restart Renoise, test, throw away another half) to find the LADSPA that is causing this.

Although I never managed to duplicate this problem myself (even though I had a more or less identical system, right down to the md5 of all loaded libs), the user who reported it said that *any* LADSPA plugin causes the problem, it doesn't matter which one it is. If you remove all LADSPA plugins and start Renoise, it's fine; if you put any back in and start Renoise, you get the problem.

Looking at bluszcz's screenshot, it appears that each parameter has been set to either 0.0f or 1.0f. Taktik, can you think of any way that having a LADSPA plugin loaded would cause setParameter for another plugin to pass only 0.0f or 1.0f? And as to why it would only affect JUCE plugins, I'm stumped!

Loomer: Could you quickly try out if a setlocale(LC_NUMERIC, "C"), setlocale(LC_LC_CTYPE="C") solves the issue with SequentVST and LADSPAs?

Will do, when I can: I can't at this very moment because I'm in the middle of ripping some other code apart. A quick glance through the JUCE codebase suggests that it doesn't rely on a particular locale; the only place locale seems important is when handling XKeyEvent keypresses, and here JUCE sets the locale accordingly and responsibly returns it to its previous setting.

( As an aside, this isn't a specific problem with Renoise 2.7; the user who reported it to me was using a much older version, Renoise 2.1. )

Edited by Loomer, 23 March 2011 - 13:58.


#18 taktik

taktik

    Renoise Developer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 15040 posts
  • Gender:Male
  • Location:Berlin, Germany
  • Interests:füße waschen

Posted 23 March 2011 - 14:11

Although I never managed to duplicate this problem myself (even though I had a more or less identical system, right down to the md5 of all loaded libs), the user who reported it said that *any* LADSPA plugin causes the problem, it doesn't matter which one it is. If you remove all LADSPA plugins and start Renoise, it's fine; if you put any back in and start Renoise, you get the problem.

Looking at bluszcz's screenshot, it appears that each parameter has been set to either 0.0f or 1.0f. Taktik, can you think of any way that having a LADSPA plugin loaded would cause setParameter for another plugin to pass only 0.0f or 1.0f? And as to why it would only affect JUCE plugins, I'm stumped!


scanf, atof and co use the current locale for the decimal point. This would explain why you never could replicate this (cause you had a different locale than the user) and why the values are truncated to 1, 0 in the examples above?

I'll do a few more tests based on this...

#19 bluszcz

bluszcz

    Local Chief Member

  • Normal Members
  • PipPipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:Copenhagen

Posted 23 March 2011 - 15:00

scanf, atof and co use the current locale for the decimal point. This would explain why you never could replicate this (cause you had a different locale than the user) and why the values are truncated to 1, 0 in the examples above?

I'll do a few more tests based on this...


BTW, on Laptop B (where renoise works) I have below locales:


$ locale
LANG=C
LANGUAGE=pl_PL.UTF-8
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

Don't have access now to Laptop A, so not sure.

#20 Loomer

Loomer

    Member

  • Normal Members
  • PipPip
  • 31 posts

Posted 23 March 2011 - 15:03

Taktik, you're absolutely right: shame on me for not realizing this sooner! JUCE plugins tend to save their state as Xml documents:

<Parameters Volume="0.714300513" Polyphony="0.129032254" ... >
Obviously this is going to parse differently depending on the locale's interpretation of the decimal point.

So, the questions remain:
  • Why does loading any LADSPA plugin cause this problem?
  • Where is the best place to fix it? Should the JUCE framework detect this situation, or should this be Renoise's responsibility?

Edited by Loomer, 23 March 2011 - 15:04.


#21 Loomer

Loomer

    Member

  • Normal Members
  • PipPip
  • 31 posts

Posted 23 March 2011 - 15:22

Oh, apparently JUCE does already use a locale-neutral conversion method already, as evidenced by this thread.

#22 taktik

taktik

    Renoise Developer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 15040 posts
  • Gender:Male
  • Location:Berlin, Germany
  • Interests:füße waschen

Posted 23 March 2011 - 20:46

Could verify that is the locale mess (saving TAL plugs with a German locale, which uses ',' as decimal point, breaks parameters when loaded again with the same locale)

Will hack around this, so we get this fixed now as soon as possible, by:

* ensuring that opening LADSPAs, DSSIs, and VSTs does not change the apps locale (do not let plugins mess with locales).
We can't do this for every single call to the plugin though, so its still possible that plugs mess around with it, but thats very unlikely.

* set LC_NUMERIC, and LC_CTYPE to "C" before calling effSetChunk, effGetChunk, which fixes bluszcz's problem and should also fix the problems with Sequent. Unfortunately this can't fix old, buggy saved song. Only the plugins could, by ignoring, dealing with any locale in their parsers.

Loomer: I think you should do the same in your im/export handlers. This might be a problem in other VST hosts as well. Also, if something relies on a specific locale to be set, it must ensure its set correctly. On Windows and OSX this also could be a problem, but usually no one changes locales there.

#23 bluszcz

bluszcz

    Local Chief Member

  • Normal Members
  • PipPipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:Copenhagen

Posted 24 March 2011 - 15:26

Could verify that is the locale mess (saving TAL plugs with a German locale, which uses ',' as decimal point, breaks parameters when loaded again with the same locale)

Will hack around this, so we get this fixed now as soon as possible, by:


thanks guys. I am not going perform more binary search in ladspa plugins.

Cheers.