LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.14k stars 1.01k forks source link

LMMS fails in multi-user environment. #6032

Open Parakleta opened 3 years ago

Parakleta commented 3 years ago

I get the error from the following line when trying to boot LMMS with two different users on the same computer (system is accessed through VNC).

https://github.com/LMMS/lmms/blob/2f17c0da2b20ecb9b00f8dcb227d02731325796b/src/core/VstSyncController.cpp#L79

Spekular commented 3 years ago

Please specify your LMMS version and operating system.

Parakleta commented 3 years ago

Sorry, I get the following version string from LMMS.

LMMS 1.2.2
(FreeBSD x86_64, Qt 5.15.2, GCC FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2))

I'm running FreeBSD 12.2

Parakleta commented 3 years ago

The issue I think is that the shared memory key is determined by the following line:

https://github.com/LMMS/lmms/blob/2f17c0da2b20ecb9b00f8dcb227d02731325796b/src/core/VstSyncController.cpp#L64

Which in turn uses the following global path:

https://github.com/LMMS/lmms/blob/2f17c0da2b20ecb9b00f8dcb227d02731325796b/include/VstSyncData.h#L37

Since this doesn't have any element relevant to to the process ID or the user ID this is the same for all users, but different users cannot (and should not) access the same shared memory due to the access permissions. The solution is probably to use the user's home directory or some temporary file based on the process ID (or something else similar).