View Issue Details

IDProjectCategoryView StatusLast Update
0001266OpenMPTPlugins / VSTpublic2020-02-10 21:03
Reporterherodotas Assigned ToSaga Musix  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Platformx64OSWindowsOS Version7
Product VersionOpenMPT 1.29.00.* (old testing) 
Target VersionOpenMPT 1.29.01.00 / libopenmpt 0.5.0 (upgrade first)Fixed in VersionOpenMPT 1.29.01.00 / libopenmpt 0.5.0 (upgrade first) 
Summary0001266: Unloading SynthEdit plugins causes crash if another SynthEdit plugin is loaded afterwards
Description

Hi,
After I try to change loaded SynthEdit x64 plugin to another, OPENMPT always crashes.

Steps To Reproduce
  1. Load first SynthEdit plugin, open plugin editor
  2. Unload the plugin
  3. Load another SynthEdit plugin, open editor
  4. Observe crash
TagsNo tags attached.
Attached Files
OpenMPT Crash Files.rar (37,415 bytes)
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Activities

Saga Musix

Saga Musix

2019-09-28 11:15

administrator   ~0004095

The crash dumps themselves are not too revealing so please provide some information which plugins caused the crash.

herodotas

herodotas

2019-09-28 14:49

reporter   ~0004096

Any x64 synthedit plugin. In my case: Kx Polymod, Aegis, Sk7, Synlay, Lynx.

Saga Musix

Saga Musix

2019-09-28 19:10

administrator   ~0004097

Here the plugins only crash here when trying to open the editor after having opened another SynthEdit plugin's editor. The crash happens deep inside effEditOpen so I doubt there is something we can do about this. However, forcing the plugins to run inside the plugin bridge circumvents the problem.

Saga Musix

Saga Musix

2019-09-28 19:39

administrator   ~0004098

I contacted the SynthEdit author as the issue even happened when I created a SynthEdit plugin that consisted of nothing but a knob.

Saga Musix

Saga Musix

2019-10-11 16:16

administrator   ~0004107

I got no reply from Jeff yet, but I was able to verify that not calling FreeLibrary when unloading the plugin prevents the issue from happening. Apparently Reaper even has an option which I guess does exactly that. While it would fix the problem, not calling FreeLibrary would of course be a rather dirty workaround that would potentially prevent memory used by unloaded plugins from being reused.

Saga Musix

Saga Musix

2019-10-11 17:10

administrator   ~0004108

I confirmed that the same crash happens in Reaper if you enable "Allow complete unload of VST-plug-ins", so it's not an OpenMPT-specific bug. This really is something that must be fixed in SynthEdit. Maybe we can add an option to OpenMPT to never unload plugins, but I don't think this should be enabled by default.

Saga Musix

Saga Musix

2020-01-03 21:17

administrator   ~0004176

As there are no news from the SynthEdit developer, OpenMPT will now (as of version 1.29.00.42 / r12445) no longer call FreeLibrary anymore to avoid these crashes. For users concerned with resource consumption (mostly RAM) from plugins that are no longer fully unloaded, there is a hidden setting VST Plugins.FullyUnloadPlugin which can be enabled to return to the old behaviour (including crashing SynthEdit plugins, obviously).

Saga Musix

Saga Musix

2020-02-10 21:03

administrator   ~0004203

The bug was fixed in a recent SynthEdit version (sometime between build 433 and 442), so I changed the default of the newly added VST Plugins.FullyUnloadPlugin setting to 1 in r12519 again. This means that with the default setting, those faulty plugins will crash again.

I recommend that you contact the authors of plugins you care about and advise them to recompile their plugins with the latest SynthEdit version, as this is a more practical and future-proof approach than keeping the setting in its non-default state.

Issue History

Date Modified Username Field Change
2019-09-28 10:59 herodotas New Issue
2019-09-28 10:59 herodotas File Added: OpenMPT Crash Files.rar
2019-09-28 11:15 Saga Musix Note Added: 0004095
2019-09-28 14:49 herodotas Note Added: 0004096
2019-09-28 19:10 Saga Musix Note Added: 0004097
2019-09-28 19:39 Saga Musix Note Added: 0004098
2019-10-11 16:16 Saga Musix Note Added: 0004107
2019-10-11 17:10 Saga Musix Note Added: 0004108
2019-10-11 18:06 Saga Musix Summary SynthEdit plugins crash OpenMpt => Unloading SynthEdit plugins cause crash if another SynthEdit plugin is loaded
2019-10-11 18:06 Saga Musix Summary Unloading SynthEdit plugins cause crash if another SynthEdit plugin is loaded => Unloading SynthEdit plugins causes crash if another SynthEdit plugin is loaded
2019-10-11 18:06 Saga Musix Summary Unloading SynthEdit plugins causes crash if another SynthEdit plugin is loaded => Unloading SynthEdit plugins causes crash if another SynthEdit plugin is loaded afterwards
2019-10-11 18:06 Saga Musix Steps to Reproduce Updated
2020-01-03 21:15 Saga Musix Assigned To => Saga Musix
2020-01-03 21:15 Saga Musix Status new => assigned
2020-01-03 21:17 Saga Musix Note Added: 0004176
2020-01-03 21:17 Saga Musix Status assigned => resolved
2020-01-03 21:17 Saga Musix Resolution open => fixed
2020-01-03 21:17 Saga Musix Fixed in Version => OpenMPT 1.29.01.00 / libopenmpt 0.5.0 (upgrade first)
2020-01-03 21:17 Saga Musix Target Version => OpenMPT 1.29.01.00 / libopenmpt 0.5.0 (upgrade first)
2020-02-10 21:03 Saga Musix Note Added: 0004203