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

LMMS master loses Carla instrument configuration when loading old project file #6414

Open
Rua opened this issue May 24, 2022 · 16 comments
Open
Labels

Comments

@Rua
Copy link

Rua commented May 24, 2022

I have an old project file created in LMMS 1.2.2, which has a track whose instrument is a Carla rack with a loaded VST. If I load this project in the latest LMMS master, then the Carla rack loads, but many of the parameters of the VST instrument are set to 0.

The problem does not seem to occur if the project was saved with LMMS master instead of 1.2.2, then the instruments are loaded correctly.

Steps to reproduce

  • Open LMMS 1.2.2 with a new project.
  • Add a track with a Carla rack instrument.
  • Load a VST plugin with Carla and set parameters as desired.
  • Save the project and exit.
  • Open LMMS master and open the previously saved project.
  • Open the Carla rack GUI of the track in question.

Expected behavior

The VST parameters are preserved.

Actual behavior

The VST parameters are set to zero, including things like master volume, ADSR levels, filter cutoff etc. It depends on the instrument, but it happens with at least Dexed and TAL-U-No-LX.

Screenshot

image

Affected LMMS versions

3518d30

The bug does not occur in 1.3.0-alpha.1, so it must have been introduced at some point since.

@zonkmachine
Copy link
Member

Have you tested earlier builds of lmms master?

@Rua
Copy link
Author

Rua commented Jun 5, 2022

No, how would I do that? Downloading and building each time will take a while.

@zonkmachine
Copy link
Member

No, how would I do that? Downloading and building each time will take a while.

Yes. Pinpointing the precise commit that introduced an issue can take quite some time. 'git bisect' is a command that speeds up the process.

The older 1.3 alpha is here:
https://github.com/LMMS/lmms/releases/tag/v1.3.0-alpha.1

@Rua
Copy link
Author

Rua commented Jun 5, 2022

I have been able to determine that the problem appeared somewhere in 2021. I am unable to investigate further because, for some reason, every build I make is now triggering a segmentation fault when I run it, even from commits that previously worked.

@zonkmachine
Copy link
Member

Does the alpha above work?

@Rua
Copy link
Author

Rua commented Jun 5, 2022

If that's the same version that's available from the LMMS website, then yes. There is no bug in that one.

@zonkmachine
Copy link
Member

every build I make is now triggering a segmentation fault when I run it, even from commits that previously worked.

Did you build it with debug flags?
Can you run it from gdb and get a backtrace when it crashes?

@Rua
Copy link
Author

Rua commented Jun 5, 2022

(gdb) r
Starting program: /home/rua/code/lmms-bisect/build/lmms 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
*** WEAK-JACK: initializing
*** WEAK-JACK: OK. (0)
[New Thread 0x7ffff1812700 (LWP 207109)]
qt5ct: using qt5ct plugin

Thread 1 "lmms" received signal SIGSEGV, Segmentation fault.
0x000055555577382c in ConfigManager::<lambda(ConfigManager::UpgradeMethod)>::operator()(ConfigManager::UpgradeMethod) const (__closure=0x7fffffffd8c8, 
    um=&virtual table offset 38654705664, this adjustment 10)
    at /home/rua/code/lmms-bisect/src/core/ConfigManager.cpp:145
145				(this->*um)();
(gdb) backtrace
#0  0x000055555577382c in ConfigManager::<lambda(ConfigManager::UpgradeMethod)>::operator()(ConfigManager::UpgradeMethod) const (__closure=0x7fffffffd8c8, 
    um=&virtual table offset 38654705664, this adjustment 10)
    at /home/rua/code/lmms-bisect/src/core/ConfigManager.cpp:145
#1  0x0000555555778614 in std::for_each<__gnu_cxx::__normal_iterator<void (ConfigManager::* const*)(), std::vector<void (ConfigManager::*)()> >, ConfigManager::upgrade()::<lambda(ConfigManager::UpgradeMethod)> >(__gnu_cxx::__normal_iterator<void (ConfigManager::* const*)(), std::vector<void (ConfigManager::*)(), std::allocator<void (ConfigManager::*)()> > >, __gnu_cxx::__normal_iterator<void (ConfigManager::* const*)(), std::vector<void (ConfigManager::*)(), std::allocator<void (ConfigManager::*)()> > >, ConfigManager::<lambda(ConfigManager::UpgradeMethod)>) (__first=&virtual table offset 38654705664, this adjustment 10, 
    __last=NULL, __f=...) at /usr/include/c++/9/bits/stl_algo.h:3882
#2  0x00005555557738e0 in ConfigManager::upgrade (this=0x555555d321b0)
    at /home/rua/code/lmms-bisect/src/core/ConfigManager.cpp:147
#3  0x0000555555776448 in ConfigManager::loadConfigFile (this=0x555555d321b0, 
    configFile=...)
    at /home/rua/code/lmms-bisect/src/core/ConfigManager.cpp:547
#4  0x00005555557345c8 in main (argc=1, argv=0x7fffffffddc8)
    at /home/rua/code/lmms-bisect/src/core/main.cpp:716

@zonkmachine
Copy link
Member

You could try removing the config File, .lmmsrc.xml
When you run lmms from the build directory it will create a local one. Delete it or rename it and lmms will create a new one on startup.

@zonkmachine
Copy link
Member

What commit are you on now?
Did you quit bisecting with git bisect reset?

@Rua
Copy link
Author

Rua commented Jun 5, 2022

I didn't use that command, I did it manually instead so I could understand more easily what's going on. That's how I narrowed it down to 2021 (bug wasn't there on the last commit in 2020, was there on the last commit in 2021). The gdb build above was running commit aa02a21. This build previously worked, but now it segfaults.

Removing ~/.lmmsrc.xml didn't make any difference, the backtrace is the same.

@Rua
Copy link
Author

Rua commented Jun 5, 2022

I found another .lmmsrc.xml in the build directory. If I remove that one as well, it starts. I have been clearing the build directory each time I start a new build with a different commit, so I guess it was reading the one in the home directory and then copying it there?

@zonkmachine
Copy link
Member

I guess it was reading the one in the home directory and then copying it there?

No. It creates a new default File.

@Rua
Copy link
Author

Rua commented Jun 5, 2022

I've identified the commit that introduced the issue as f8d7fa3.

@zonkmachine
Copy link
Member

I've identified the commit that introduced the issue as f8d7fa3.

Brilliant!
Ping @cyber-bridge !

@Rua
Copy link
Author

Rua commented Jun 5, 2022

I noticed that the commit message says:

The param window state isn't stored yet in a LMMS project, this is still TODO.

This seems to be related to what's going on, but I wouldn't expect previously working functionality to be broken?

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

No branches or pull requests

2 participants