- 
                Notifications
    You must be signed in to change notification settings 
- Fork 146
Open
Description
VST3 plugins crash with segmentation fault on Linux during initialization when loading in DAWs like Reaper. The crash occurs in the markdown documentation system during FloatingTile initialization.
Environment
- OS: Linux (PopOS)
- Plugin Format: VST3
- DAW: Reaper (and likely others)
- HISE Version: Current develop branch
Steps to Reproduce
- Compile a VST3 plugin on Linux that contains a markdown floating tile
- Load the VST3 plugin in Reaper on Linux
- Plugin crashes immediately during initialization
Expected Behavior
The VST3 plugin should load successfully without crashing, as it does on macOS and Windows.
Actual Behavior
The plugin crashes with a segmentation fault during initialization.
Stack Trace
Thread 1 "reaper" received signal SIGSEGV, Segmentation fault.
0x00007fffcba83e24 in juce::Thread::threadShouldExit() const ()
(gdb) bt
#0  0x00007fffcba83e24 in juce::Thread::threadShouldExit() const ()
#1  0x00007fffcb662549 in hise::MarkdownDatabaseHolder::rebuildDatabase() ()
#2  0x00007fffcbd8c949 in hise::MainController::getProjectDocHolder() ()
#3  0x00007fffcb1c5dba in hise::MarkdownPreviewPanel::initPanel() ()
#4  0x00007fffcbed0ff8 in hise::FloatingTile::setContent(juce::var const&) ()
#5  0x00007fffcb1b9ddd in hise::ScriptCreatedComponentWrappers::FloatingTileWrapper::FloatingTileWrapper(...)
...
The crash occurs in MarkdownDatabaseHolder::shouldAbort() method in /hi_tools/hi_markdown/MarkdownDatabase.cpp. The method calls:
Thread::getCurrentThread()->threadShouldExit()This fix is working for me
Add a null pointer check in the shouldAbort() method before calling threadShouldExit():
File: hi_tools/hi_markdown/MarkdownDatabase.cpp
Before (lines ~762-768):
bool MarkdownDatabaseHolder::shouldAbort() const
{
    if (!MessageManager::getInstance()->isThisTheMessageThread() &&
        Thread::getCurrentThread()->threadShouldExit())
    {
        return true;
    }
    return false;
}After:
bool MarkdownDatabaseHolder::shouldAbort() const
{
    if (!MessageManager::getInstance()->isThisTheMessageThread())
    {
        // getCurrentThread() may return nullptr during VST3 initialization
        auto* currentThread = Thread::getCurrentThread();
        if (currentThread != nullptr && currentThread->threadShouldExit())
        {
            return true;
        }
    }
    return false;
}davidhealey
Metadata
Metadata
Assignees
Labels
No labels