Project recovery
-
Hey, I've worked on a project yesterday which was working fine. However this morning I could neither load my
.xml
nor my.hip
presets.I've used a older commit to try to get it to load but HISE instantly crashes when trying to open any preset. I've ran an XML Validator and could not detect any Errors. How would I debug this.
HISE just crashes with a segmentation fault.
What I've tried so far:
- clean building HISE
- update HISE
- running xml validator
- reverting to a older commit of my project
- reverting
Interface.js
to its default state
-
@oskarsh If you did all those steps, then it's pretty likely that you've created a bitwise copy of an earlier state, so I guess there is some intermediate glitching going on.
What happens when you run a debug build with a debugger attached?
-
@Christoph-Hart I've used Valgrind to run HISE here is the important output:
It looks like a memory leak when compiling my faust network.
==541864== Invalid read of size 8 ==541864== at 0x51C6CBC: llvm_dsp_factory::getWarningMessages[abi:cxx11]() (in /usr/local/lib/libfaust.so.2.54.9) ==541864== by 0xCFB599: scriptnode::faust::faust_jit_wrapper<1>::setup(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (FaustWrapper.h:145) ==541864== by 0xCF297A: scriptnode::faust::faust_jit_node<1>::setupFaust(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (FaustJitNode.h:150) ==541864== by 0xA31D9A: scriptnode::faust::faust_jit_node_base::reinitFaustWrapper() (FaustJitNode.cpp:292) ==541864== by 0xA3261D: scriptnode::faust::faust_jit_node_base::compileFaustCode(juce::File const&) (FaustJitNode.cpp:341) ==541864== by 0x12B5D80: scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}::operator()(hise::Processor*) const (DspNetwork.cpp:1971) ==541864== by 0x1339927: hise::SafeFunctionCall::Status std::__invoke_impl<hise::SafeFunctionCall::Status, scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}&, hise::Processor*>(std::__invoke_other, scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}&, hise::Processor*&&) (invoke.h:61) ==541864== by 0x13319B2: std::enable_if<is_invocable_r_v<hise::SafeFunctionCall::Status, scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}&, hise::Processor*>, hise::SafeFunctionCall::Status>::type std::__invoke_r<hise::SafeFunctionCall::Status, scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}&, hise::Processor*>(scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}&, hise::Processor*&&) (invoke.h:114) ==541864== by 0x132ACEA: std::_Function_handler<hise::SafeFunctionCall::Status (hise::Processor*), scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}>::_M_invoke(std::_Any_data const&, hise::Processor*&&) (std_function.h:290) ==541864== by 0x8668E6: std::function<hise::SafeFunctionCall::Status (hise::Processor*)>::operator()(hise::Processor*) const (std_function.h:590) ==541864== by 0x7F7086: hise::MainController::KillStateHandler::killVoicesAndCall(hise::Processor*, std::function<hise::SafeFunctionCall::Status (hise::Processor*)> const&, hise::MainController::KillStateHandler::TargetThread) (KillStateHandler.cpp:428) ==541864== by 0x12B60A1: scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType) (DspNetwork.cpp:1994) ==541864== Address 0x10017 is not stack'd, malloc'd or (recently) free'd ==541864== ==541864== ==541864== Process terminating with default action of signal 11 (SIGSEGV) ==541864== Access not within mapped region at address 0x10017 ==541864== at 0x51C6CBC: llvm_dsp_factory::getWarningMessages[abi:cxx11]() (in /usr/local/lib/libfaust.so.2.54.9) ==541864== by 0xCFB599: scriptnode::faust::faust_jit_wrapper<1>::setup(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (FaustWrapper.h:145) ==541864== by 0xCF297A: scriptnode::faust::faust_jit_node<1>::setupFaust(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (FaustJitNode.h:150) ==541864== by 0xA31D9A: scriptnode::faust::faust_jit_node_base::reinitFaustWrapper() (FaustJitNode.cpp:292) ==541864== by 0xA3261D: scriptnode::faust::faust_jit_node_base::compileFaustCode(juce::File const&) (FaustJitNode.cpp:341) ==541864== by 0x12B5D80: scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}::operator()(hise::Processor*) const (DspNetwork.cpp:1971) ==541864== by 0x1339927: hise::SafeFunctionCall::Status std::__invoke_impl<hise::SafeFunctionCall::Status, scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}&, hise::Processor*>(std::__invoke_other, scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}&, hise::Processor*&&) (invoke.h:61) ==541864== by 0x13319B2: std::enable_if<is_invocable_r_v<hise::SafeFunctionCall::Status, scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}&, hise::Processor*>, hise::SafeFunctionCall::Status>::type std::__invoke_r<hise::SafeFunctionCall::Status, scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}&, hise::Processor*>(scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}&, hise::Processor*&&) (invoke.h:114) ==541864== by 0x132ACEA: std::_Function_handler<hise::SafeFunctionCall::Status (hise::Processor*), scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType)::{lambda(hise::Processor*)#1}>::_M_invoke(std::_Any_data const&, hise::Processor*&&) (std_function.h:290) ==541864== by 0x8668E6: std::function<hise::SafeFunctionCall::Status (hise::Processor*)>::operator()(hise::Processor*) const (std_function.h:590) ==541864== by 0x7F7086: hise::MainController::KillStateHandler::killVoicesAndCall(hise::Processor*, std::function<hise::SafeFunctionCall::Status (hise::Processor*)> const&, hise::MainController::KillStateHandler::TargetThread) (KillStateHandler.cpp:428) ==541864== by 0x12B60A1: scriptnode::DspNetwork::FaustManager::sendCompileMessage(juce::File const&, juce::NotificationType) (DspNetwork.cpp:1994) ==541864== If you believe this happened as a result of a stack ==541864== overflow in your program's main thread (unlikely but ==541864== possible), you can try to increase the size of the ==541864== main thread stack using the --main-stacksize= flag. ==541864== The main thread stack size used in this run was 8388608. ==541864== ==541864== HEAP SUMMARY: ==541864== in use at exit: 1,621,665,039 bytes in 506,672 blocks ==541864== total heap usage: 4,208,134 allocs, 3,701,462 frees, 10,705,734,479 bytes allocated ==541864== ==541864== LEAK SUMMARY: ==541864== definitely lost: 7,304 bytes in 8 blocks ==541864== indirectly lost: 155,057 bytes in 859 blocks ==541864== possibly lost: 11,751,445 bytes in 53,303 blocks ==541864== still reachable: 1,609,751,233 bytes in 452,502 blocks ==541864== of which reachable via heuristic: ==541864== multipleinheritance: 50,496 bytes in 574 blocks ==541864== suppressed: 0 bytes in 0 blocks ==541864== Rerun with --leak-check=full to see details of leaked memory ==541864== ==541864== Use --track-origins=yes to see where uninitialised values come from ==541864== For lists of detected and suppressed errors, rerun with: -s ==541864== ERROR SUMMARY: 87964 errors from 37 contexts (suppressed: 0 from 0)
-
@oskarsh valgrind is overkill here and a memory leak in the compile process is sloppy but should cause a crash.
I‘m thinking of GDB or something like this.
-
@Christoph-Hart this is the output I am getting with gdb
Thread 3 "HISE Standalone" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffed5bd640 (LWP 803743)] 0x00007ffff7700cd0 in llvm_dsp_factory::getWarningMessages[abi:cxx11]() () from /usr/local/lib/libfaust.so.2
Does this help you? I am running the latest commit of HISE and I am using FAUST 2.54
-
@oskarsh yeah you need to change a flag in the projucer to make it work with older faust versions. Read the instructions in the faust category.
-
A damn it I think I‘ve accidently changed the default flag in one if the last commits, so that was on me :)
-
@Christoph-Hart Currently 2.54.9 is the latest official release from FAUST.
Releases · grame-cncm/faust
Functional programming language for signal processing and sound synthesis - Releases · grame-cncm/faust
GitHub (github.com)
-
@oskarsh I'm using that version here and no issues so far.
-
@d-healey @Christoph-Hart Indeed I had to change the flag in the projucer. Now its working again. I make sure to double check that flag in the future.