Forum
    • Categories
    • Register
    • Login

    Linux Issues...

    Scheduled Pinned Locked Moved AI discussion
    24 Posts 2 Posters 152 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MorphoiceM
      Morphoice @David Healey
      last edited by

      @David-Healey said in Linux Issues...:

      @Morphoice said in Linux Issues...:

      Synth.deferCallbacks(true)

      The UI script should always use this, and all my plugins use it, so this is not the cause of the issue.

      Unless you can test and debug it I'd suggest pulling your Linux version.

      the probably suspendState mechanism - suspends timers/deferredExecutioner when no editor is open
      KillStateHandler stuck in Suspended state
      which comes with the Silentsynth/Voicekiller construct I use to make faust-only synths

      https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

      David HealeyD 1 Reply Last reply Reply Quote 0
      • David HealeyD
        David Healey @Morphoice
        last edited by

        @Morphoice If your customer is willing to be your tester then make the change and get them to see if it fixes it. Otherwise, without being able to test it's all just guessing.

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        MorphoiceM 2 Replies Last reply Reply Quote 0
        • MorphoiceM
          Morphoice @David Healey
          last edited by

          @David-Healey right.

          https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

          1 Reply Last reply Reply Quote 0
          • MorphoiceM
            Morphoice @David Healey
            last edited by

            @David-Healey I've had a chance to look at it briefly at a friends PC who has Trixie installed and bitwig, the plugins load just fine and the ones with graphical drum pads do produce sound, but none receive midi... so i reckon the DSP and tone generation isnt the problem at all but the underlying JUCE framework isnt passing midi data along

            one thing to note is that the midi indicator led i put in my guy does light up, but no sound. so actually the midi is not passed along to the faust automatically

            https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

            David HealeyD 1 Reply Last reply Reply Quote 0
            • David HealeyD
              David Healey @Morphoice
              last edited by

              @Morphoice Must be something faust specific. Is it wrapped in a MIDI container? I could be talking nonsense here as I've not used it.

              Free HISE Bootcamp Full Course for beginners.
              YouTube Channel - Public HISE tutorials
              My Patreon - HISE tutorials

              MorphoiceM 1 Reply Last reply Reply Quote 0
              • MorphoiceM
                Morphoice @David Healey
                last edited by Morphoice

                @David-Healey

                The HISE export_ci process corrupted parameter values in the binary preset data (PresetData.cpp). All parameters within each HardcodedMasterFX/HardcodedPolyphonicFX node were overwritten with the last parameter's value. For one plugin, the Chorus effect's Volume was set to 0.0, which made pow(20, 2*0) - 1 = 0, multiplying all audio output by zero.

                Fix: Wrote a Python script that decompresses the zstd-compressed binary preset (using HISE's custom dictionary), parses the JUCE ValueTree binary format, replaces corrupted values with correct ones from the XML backup, and writes back.

                https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                MorphoiceM 1 Reply Last reply Reply Quote 0
                • MorphoiceM
                  Morphoice @Morphoice
                  last edited by

                  When running HISE export_ci on Linux (GCC 12, Debian), the generated PresetData.cpp contains corrupted parameter values for all HardcodedMasterFX and HardcodedPolyphonicFX nodes. Every parameter in each node is overwritten with the last parameter's value.

                  Reproduction: Export any project containing HardcodedMasterFX nodes on Linux. Compare the binary preset values against XmlPresetBackups/*.xml — they will differ.

                  Example (Chorus effect with 12 params):

                  XML has: Delay=5.23, ModAmount=1.0, ..., Volume=0.5, Noise=0.0
                  Binary preset has: Delay=0.0, ModAmount=0.0, ..., Volume=0.0, Noise=0.0 (all = last param value)
                  Impact: Plugins produce complete silence when a volume-like parameter gets zeroed.

                  Location: The bug appears to be in HardcodedSwappableEffect::writeHardcodedData() in HardcodedModuleBase.cpp, reading from the lastParameters MemoryBlock.

                  Workaround: Post-export script that decompresses the binary, patches values from the XML backup, and recompresses.

                  Platform: Linux only. macOS and Windows exports are correct.

                  https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                  MorphoiceM David HealeyD 2 Replies Last reply Reply Quote 0
                  • MorphoiceM
                    Morphoice @Morphoice
                    last edited by

                    @Christoph-Hart

                    There are two bugs in the "uncompiled effect" code path in restoreHardcodedData():

                    Bug 1 (Primary — line 982): v[up.getLast()] should be v[up[i]]

                    This reads the LAST property name for EVERY parameter index, causing all parameters to get the last parameter's value
                    Bug 2 (Secondary — lines 967, 563): lastParameters.setSize(numParameters) should be lastParameters.setSize(numParameters * sizeof(float))

                    The compiled path correctly uses numParameters * sizeof(float), but the uncompiled path allocates only numParameters bytes instead of numParameters * 4 bytes — a buffer underallocation
                    Why Linux-only: hasLoadedButUncompiledEffect() returns true when factory == nullptr || factory->getNumNodes() == 0. On Linux, during export_ci, the scriptnode factory has no compiled nodes, so this buggy code path is taken. On macOS/Windows, the factory can instantiate the nodes, so the correct opaqueNode path is used instead.

                    https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                    1 Reply Last reply Reply Quote 0
                    • David HealeyD
                      David Healey @Morphoice
                      last edited by

                      @Morphoice said in Linux Issues...:

                      Workaround: Post-export script that decompresses the binary, patches values from the XML backup, and recompresses.

                      That is not the solution. The fix needs to be made on the HISE side. But good that you tracked down the cause, I'll have to test.

                      Are you on the latest develop branch?

                      Free HISE Bootcamp Full Course for beginners.
                      YouTube Channel - Public HISE tutorials
                      My Patreon - HISE tutorials

                      MorphoiceM 1 Reply Last reply Reply Quote 0
                      • MorphoiceM
                        Morphoice @David Healey
                        last edited by

                        @David-Healey yes

                        https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                        David HealeyD 1 Reply Last reply Reply Quote 0
                        • David HealeyD
                          David Healey @Morphoice
                          last edited by

                          @Morphoice I don't fully understand the setup that demonstrates the problem. Can you modify this snippet as minimally as possible in such a way that it creates the issue?

                          HiseSnippet 1415.3oc2W0raaaDDdokoZrRZZCZBPOxC8fSQfAkibZL5AK+mRMZjsfoha5ozUjqjVHxcYWtz1pE8dOTfdN25iPu1a4Qn.8EIuAoytKoHkspisP9AoN.AZlYmc+l+G1Qv8IIIbAxpV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NRI0GGhNRkZnrF8cZbsF.qNZU6AJvME1uNfcAYkAmcoGCJyz30.vEJCPTGr.zElqpd9JSnfBr1TVF.mzS+EswmdFdPFijDahRZd+wye9esg2HxIFfmw8EC9y6zzXU5Ez5RNU1kquKHG6X.Np2TMFxm1iDBvZfY6JuzdORvSi0Dm6s2gzGmFJOGezEaHPV1YMjl+dyKkg7Ce1N+yFYcbh3b4PnD7+vZpZqWk7RYJMZNaSoQSza+XxMrOjjPxd52YQFU12Vb9nHrtsxbssR4AS2zHDhKPos96EzE12QS67c3iINOh.E8pwpWvWL72u4+hgC7kvq2UfYIw7joCTjHZWXaqjxLeRBruK4GOT0ErL+s4XwLE8xMZA13L0wCKSE51o4sYKsePkomEs3kaVzzqJU57yXx8huG9Bk2L6a8dbkvo12YobL5QUKprKTRFB0EY6DlUlMgaYP1ly34ybKB5GRf8EFLfHJC8YZOaJkvm5Vv41MOjDRvkSf+hlOFR7vh15wVykq3p+8jyLb841F35nJFc9vcS9J+udS92IKs9t3Mhv9B9y7M65qxSullCX2L8pXKY2VQ6TGc7Ym.FAM4dlu+zW04Tb04Uw6OuJ1XdUbs4UwGLuJ9UyqhO70qnZFzloRdjozDVUryt5ESrr1kggrbcEA5eIfiJFL
                          

                          Free HISE Bootcamp Full Course for beginners.
                          YouTube Channel - Public HISE tutorials
                          My Patreon - HISE tutorials

                          MorphoiceM 1 Reply Last reply Reply Quote 0
                          • MorphoiceM
                            Morphoice @David Healey
                            last edited by

                            @David-Healey I don't see how that would help, the problem isn't specific to my setup there are fundamental bugs in HISE/JUCE

                            HISE on ARM64 Linux: three bugs blocking DSP-network / project-DLL compilation

                            Environment: Debian 13 (trixie), aarch64 (Apple Silicon), HISE develop (4.9.x, JUCE 6.1.3),
                            g++-12, Faust 2.79.3. Building the standalone and exporting plugins/DLLs natively for arm64.

                            Three separate bugs had to be fixed to compile DSP networks / project DLLs on arm64. Two are
                            architecture-independent UB (only bite on arm64); one is an arm64 MIR codegen loop.


                            1. CustomKeyboardState writes one element past its array (segfaults on arm64)

                            Any project load / export / compile_networks crashes immediately:

                            #0 hise::CustomKeyboardState::CustomKeyboardState()
                            #1 hise::MainController::MainController()
                            #2 hise::BackendProcessor::BackendProcessor(...)
                            

                            hi_core/hi_core/UtilityClasses.h:

                            Colour noteColours[127];   // 127 entries, valid 0..126
                            

                            The constructor (UtilityClasses.cpp) writes all 128 MIDI notes:

                            for (int i = 0; i < 128; i++)
                                setColourForSingleKey(i, Colours::transparentBlack);   // writes noteColours[127] -> OOB
                            

                            setColourForSingleKey also guards noteNumber <= 127, so 128 entries are intended. Index 127
                            is out of bounds. Harmless on x86_64 (overwrites the adjacent lowestKey), segfaults under -O3
                            on arm64.

                            Fix:

                            Colour noteColours[128];
                            

                            2. SNEX MIR JIT infinite loop on arm64 (expression node)

                            "Compile DSP networks as DLL" and the compile_networks CLI hang at 100% CPU forever on arm64
                            (IDE looks frozen). It happens while the exporter instantiates each node in
                            DspNetwork::createAllNodesOnce(). Backtrace of the spinning thread:

                            #0 generate_func_code ()                                <- MIR generator
                            #1 MIR_link ()
                            #2 snex::mir::MirCompiler::compileMirCode(juce::String)
                            #3 snex::mir::MirCompiler::compileMirCode(juce::ValueTree)
                            #4 snex::jit::Compiler::compileJitObject(juce::String)
                            #5 snex::JitExpression::JitExpression(...)
                            #6 scriptnode::dynamic_expression::updateCode(...)
                            ...
                            #15 scriptnode::DspNetwork::createAllNodesOnce()
                            #16 hise::DspNetworkCompileExporter::DspNetworkCompileExporter(...)
                            

                            Creating a math.expr / dynamic_expression node JIT-compiles its expression through the MIR
                            backend. MIR's aarch64 generator (generate_func_code, from MIR_link) loops indefinitely.
                            Lowering MIR_gen_set_optimize_level from 3 to 1 in snex_MirObject.cpp does not help (it loops
                            at lower levels too), so this is a MIR aarch64 codegen bug (bundled MIR in hi_snex/snex_mir/src).

                            During createAllNodesOnce() the JIT result is never used (the node's C++ is generated from the
                            expression source), so the JIT is skippable there. Flag on DspNetwork set during
                            createAllNodesOnce, checked in dynamic_expression::updateCode before new JitExpression:

                            if (node->getRootNetwork()->isCreatingAllNodesOnce())
                            {
                                r = Result::ok();
                                return;
                            }
                            

                            This unblocks DSP-network / DLL export on arm64. Live JIT of expression nodes in the IDE still
                            hits the MIR loop; the real fix belongs in the MIR aarch64 backend.


                            3. Headless/CLI export crash: JUCE display query derefs null

                            With #2 worked around, compile_networks on a headless display (no monitor / Xvfb) segfaults
                            while the export dialog is constructed:

                            #0 juce::Component::getParentMonitorArea()             (then later centreWithSize)
                            #1 juce::AlertWindow::updateLayout(bool)
                            #2 juce::AlertWindow::setMessage(...)
                            #3 juce::AlertWindow::AlertWindow(...)
                            #4 hise::DialogWindowWithBackgroundThread::DialogWindowWithBackgroundThread(...)
                            #5 hise::DspNetworkCompileExporter::DspNetworkCompileExporter(...)
                            #6 CommandLineActions::compileNetworks(...)
                            

                            DspNetworkCompileExporter is a DialogWindowWithBackgroundThread, so it builds an AlertWindow
                            even from the CLI. On a headless Linux session JUCE detects zero displays and these deref null:

                            juce_gui_basics/components/juce_Component.cpp:

                            // getParentMonitorArea():
                            return Desktop::getInstance().getDisplays().getDisplayForRect(getScreenBounds())->userArea;
                            // ComponentHelpers::getParentOrMainMonitorBounds():
                            return Desktop::getInstance().getDisplays().getPrimaryDisplay()->userArea;
                            

                            getDisplayForRect() returns nullptr when no display intersects (or the list is empty);
                            getPrimaryDisplay() returns nullptr when the list is empty.

                            Fix - guard both:

                            Rectangle<int> Component::getParentMonitorArea() const
                            {
                                auto& d = Desktop::getInstance().getDisplays();
                                if (auto* x = d.getDisplayForRect(getScreenBounds())) return x->userArea;
                                if (auto* p = d.getPrimaryDisplay())                  return p->userArea;
                                return { 0, 0, 1920, 1080 };
                            }
                            // getParentOrMainMonitorBounds(): same guard around getPrimaryDisplay()
                            

                            After these three changes, compile_networks -c:Release runs to completion on a headless
                            display and produces a working DspNetworks/Binaries/dll/.so for arm64 Linux.
                            getParentMonitorArea / getParentOrMainMonitorBounds derefing null also affects the CLI on any
                            Linux box with no usable display, so it is worth guarding regardless of architecture.

                            https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post

                            18

                            Online

                            2.4k

                            Users

                            13.8k

                            Topics

                            119.6k

                            Posts