View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001664 | OpenMPT | Plugins / VST | public | 2023-02-11 10:19 | 2023-02-11 14:46 |
Reporter | Vad1m_1719 | Assigned To | Saga Musix | ||
Priority | high | Severity | crash | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Platform | x64 | OS | Windows | OS Version | 10 |
Product Version | OpenMPT 1.31.00.* (old testing) | ||||
Target Version | OpenMPT 1.31.01.00 / libopenmpt 0.7.0 (upgrade first) | Fixed in Version | OpenMPT 1.31.01.00 / libopenmpt 0.7.0 (upgrade first) | ||
Summary | 0001664: Crash when loading plugins while song is playing | ||||
Description | https://cdn.discordapp.com/attachments/1067281758476828843/1073908350317760512/image.png I lost a module during cover to mptm (module is not saved) and OpenMPT crash files and dumps is not saved. I didn't know. Why I'm lost this work when crashes and NOT SAVED this module to OpenMPT Crash Files | ||||
Additional Information |
| ||||
Tags | No tags attached. | ||||
Has the bug occurred in previous versions? | |||||
Tested code revision (in case you know it) | 18724 | ||||
You could try to reproduce the issue by using procdump to generate a memory dump: https://wiki.openmpt.org/Manual:_Frequently_Asked_Questions#OpenMPT_crashed_but_did_not_create_a_memory_dump |
|
I think I see what's going on now, the memory dump is no longer required. An important aspect is that audio playback must be running while the plugin is loaded. This broke in r17406. Plugin instances are now inserted into the @manx I would suggest to partially rework r17406 to make sure that |
|
Potential fix using the second option Fix-Plugin-Insertion.patch (2,188 bytes)
Index: mptrack/mod2midi.cpp =================================================================== --- mptrack/mod2midi.cpp (revision 18727) +++ mptrack/mod2midi.cpp (working copy) @@ -456,6 +456,7 @@ m_tracks.reserve(m_sndFile.GetNumInstruments() + 1); MidiTrack &tempoTrack = *(new MidiTrack(m_plugFactory, m_sndFile, m_songLength, tempoTrackPlugin, nullptr, mpt::ToUnicode(m_sndFile.GetCharsetInternal(), m_sndFile.m_songName), nullptr, overlappingInstruments)); + tempoTrackPlugin.pMixPlugin = &tempoTrack; tempoTrack.WriteString(kText, mpt::ToUnicode(m_sndFile.GetCharsetInternal(), m_sndFile.m_songMessage.GetString())); tempoTrack.WriteString(kCopyright, m_sndFile.m_songArtist); m_tracks.push_back(&tempoTrack); Index: soundlib/plugins/PluginManager.cpp =================================================================== --- soundlib/plugins/PluginManager.cpp (revision 18727) +++ soundlib/plugins/PluginManager.cpp (working copy) @@ -737,6 +737,8 @@ { pFound->InsertPluginInstanceIntoList(*plugin); } + CriticalSection cs; + mixPlugin.pMixPlugin = plugin; return plugin != nullptr; } @@ -785,8 +787,6 @@ if(pEffect != nullptr && pEffect->dispatcher != nullptr && pEffect->magic == Vst::kEffectMagic) { - validPlugin = true; - GetPluginInformation(maskCrashes, pEffect, *pFound); // Update cached information @@ -797,10 +797,9 @@ { pFound->InsertPluginInstanceIntoList(*pVstPlug); } - if(pVstPlug == nullptr) - { - validPlugin = false; - } + validPlugin = (pVstPlug != nullptr); + CriticalSection cs; + mixPlugin.pMixPlugin = pVstPlug; } if(!validPlugin) Index: soundlib/plugins/PlugInterface.cpp =================================================================== --- soundlib/plugins/PlugInterface.cpp (revision 18727) +++ soundlib/plugins/PlugInterface.cpp (working copy) @@ -54,7 +54,6 @@ , m_pMixStruct(&mixStruct) { m_SndFile.m_loadedPlugins++; - m_pMixStruct->pMixPlugin = this; m_MixState.pMixBuffer = mpt::align_bytes<8, MIXBUFFERSIZE * 2>(m_MixBuffer); while(m_pMixStruct != &(m_SndFile.m_MixPlugins[m_nSlot]) && m_nSlot < MAX_MIXPLUGINS - 1) { |
|
ok. I'm waiting to bot build, after the build, updating to the latest |
|
Yeah, patch looks fine to me. |
|
Fixed in r18728. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2023-02-11 10:19 | Vad1m_1719 | New Issue | |
2023-02-11 11:40 | Saga Musix | Note Added: 0005546 | |
2023-02-11 13:52 | Saga Musix | Assigned To | => Saga Musix |
2023-02-11 13:52 | Saga Musix | Status | new => assigned |
2023-02-11 14:11 | Saga Musix | Note Added: 0005547 | |
2023-02-11 14:18 | Saga Musix | Note Added: 0005548 | |
2023-02-11 14:18 | Saga Musix | File Added: Fix-Plugin-Insertion.patch | |
2023-02-11 14:20 | Saga Musix | Summary | Tracker was crashing when putting plugin into FX 8 => Crash when loading plugins while song is playing |
2023-02-11 14:31 | Vad1m_1719 | Note Added: 0005549 | |
2023-02-11 14:42 | manx | Note Added: 0005550 | |
2023-02-11 14:46 | Saga Musix | Note Added: 0005551 | |
2023-02-11 14:46 | Saga Musix | Status | assigned => resolved |
2023-02-11 14:46 | Saga Musix | Resolution | open => fixed |
2023-02-11 14:46 | Saga Musix | Fixed in Version | => OpenMPT 1.31.01.00 / libopenmpt 0.7.0 (upgrade first) |
2023-02-11 14:46 | Saga Musix | Target Version | => OpenMPT 1.31.01.00 / libopenmpt 0.7.0 (upgrade first) |