Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting missing member errors attempting to build SmartAmpPro #22

Open
jamsden opened this issue Dec 29, 2021 · 5 comments
Open

Getting missing member errors attempting to build SmartAmpPro #22

jamsden opened this issue Dec 29, 2021 · 5 comments

Comments

@jamsden
Copy link

jamsden commented Dec 29, 2021

I'm trying to build SmartAmpPro on MacOS 10.15.7 using Projucer 6.1.4, boost_78_0, and Xcode 12.4.

I'm getting 5 compilation errors in PluginEditor.cpp, all similar to: No member named 'browseForMultipleFilesToOpen' in 'juce::FileChooser'. I have looked at the header files that are getting included and the missing members are there. Haven't done much C++ in many years, but I don't see any solution. Any idea how to fix this?

My Projucer.app Header search paths is:
$(HOME)/eigen/
~/Documents/GitHub/json/include
~/Documents/GitHub/NumCpp/include
~/Developer/boost_1_78_0

The missing methods are in in juce_FileChooser.h, but are not include unless JUCE_MODAL_LOOPS_PERMITTED is defined.

I resolved the issue by adding JUCE_MODAL_LOOPS_PERMITTED=1 in the SmartAppPro Exporter Preprocessor Definitions, but I'm not sure that's the correct solution.

@jamsden
Copy link
Author

jamsden commented Dec 29, 2021

After getting beyond the compilation errors, I was able to build SmartAmpPro.component, but when scanning the component on Logic Pro X startup, SmartAmpPro crashes during plugin validation with:

validating Audio Unit SmartAmpPro by GuitarML:

AU Validation Tool
Version: 1.7.0 
Copyright 2003-2019, Apple Inc. All Rights Reserved.
Specify -h (-help) for command options

VALIDATING AUDIO UNIT: 'aufx' - 'sa10' - 'Manu'

Manufacturer String: GuitarML
AudioUnit Name: SmartAmpPro
Component Version: 1.0.0 (0x10000)

    • PASS

TESTING OPEN TIMES:
COLD:
JUCE v6.1.4
File: /Users/jamsden/Documents/GitHub/NumCpp/include/NumCpp/NdArray/NdArrayIterators.hpp
Function: NdArrayConstIterator
Line: 72
Error: NdArray has not been initialized.libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: File: /Users/jamsden/Documents/GitHub/NumCpp/include/NumCpp/NdArray/NdArrayIterators.hpp
Function: NdArrayConstIterator
Line: 72
Error: NdArray has not been initialized.

validation result: crashed validation

This stack trace from the crash might be relevant:

8 com.GuitarML.SmartAmpPro 0x0000000109b3f251 nc::NdArray<float, std::__1::allocator >::fill(float) + 33 (NdArrayCore.hpp:2880)
9 com.GuitarML.SmartAmpPro 0x0000000109b3f1d2 nc::NdArray<float, std::__1::allocator > nc::full(unsigned int, unsigned int, float) + 66 (full.hpp:72)
10 com.GuitarML.SmartAmpPro 0x0000000109b3bb6a nc::NdArray<float, std::__1::allocator > nc::zeros(unsigned int, unsigned int) + 42 (zeros.hpp:73)
11 com.GuitarML.SmartAmpPro 0x0000000109b3c610 lstm::pad_init(nc::NdArray<float, std::__1::allocator >) + 320 (lstm.cpp:123)
12 com.GuitarML.SmartAmpPro 0x0000000109b3bf82 lstm::setParams(int, int, int, int, int, nc::NdArray<float, std::__1::allocator >, nc::NdArray<float, std::__1::allocator >, std::__1::vector<nc::NdArray<float, std::__1::allocator >, std::__1::allocator<nc::NdArray<float, std::__1::allocator > > >, std::__1::vector<nc::NdArray<float, std::__1::allocator >, std::__1::allocator<nc::NdArray<float, std::__1::allocator > > >, nc::NdArray<float, std::__1::allocator >, nc::NdArray<float, std::__1::allocator >, nc::NdArray<float, std::__1::allocator >, nc::NdArray<float, std::__1::allocator >, int, int, int) + 770 (lstm.cpp:77)
13 com.GuitarML.SmartAmpPro 0x0000000109b8f5ab SmartAmpProAudioProcessor::loadConfig(juce::File) + 699 (PluginProcessor.cpp:203)
14 com.GuitarML.SmartAmpPro 0x0000000109b8d4ce SmartAmpProAudioProcessor::SmartAmpProAudioProcessor() + 1742 (PluginProcessor.cpp:34)
15 com.GuitarML.SmartAmpPro 0x0000000109b8f805 SmartAmpProAudioProcessor::SmartAmpProAudioProcessor() + 21 (PluginProcessor.cpp:36)
16 com.GuitarML.SmartAmpPro 0x0000000109b90d08 createPluginFilter() + 40 (PluginProcessor.cpp:453)
17 com.GuitarML.SmartAmpPro 0x0000000109af19b8 juce::createPluginFilterOfType(juce::AudioProcessor::WrapperType) + 24 (juce_CreatePluginFilter.h:39)
18 com.GuitarML.SmartAmpPro 0x0000000109aebb14 AudioProcessorHolder::AudioProcessorHolder(bool) + 100 (juce_AU_Wrapper.mm:113)
19 com.GuitarML.SmartAmpPro 0x0000000109aeb2b7 JuceAU::JuceAU(ComponentInstanceRecord*) + 103 (juce_AU_Wrapper.mm:136)
20 com.GuitarML.SmartAmpPro 0x0000000109aeb11d JuceAU::JuceAU(ComponentInstanceRecord*) + 29 (juce_AU_Wrapper.mm:182)
21 com.GuitarML.SmartAmpPro 0x0000000109b17084 APFactory<AUBaseLookup, JuceAU>::Construct(void*, ComponentInstanceRecord*) + 36 (ComponentBase.h:231)
22 com.GuitarML.SmartAmpPro 0x0000000109b2cb44 ComponentBase::AP_Open(void*, ComponentInstanceRecord*) + 68 (ComponentBase.cpp:104)

@vackva
Copy link

vackva commented Mar 10, 2022

I was running into the same use..

I think since JUCE 6 you have to use JUCE_MODAL_LOOPS_PERMITTED=1 in your CMakeList or Projucer to use the FileExplorer.

So I got the plugin running with a dirty hack.

For off all be sure using NumCPP Version >= 2.4.1 (otherwise you will run into some linking errors).

But the plugin still crashes at startup. The reason for the crash is due to this File -> NumCpp\include\NumCpp\NdArray\NdArrayIterators.hpp in Line 67-74 (Version 2.4.1)

explicit NdArrayConstIterator(pointer ptr) :
    ptr_(ptr)
{
    if (ptr == nullptr)
    {
        THROW_RUNTIME_ERROR("NdArray has not been initialized.");
    }
}

By commeting out the Line: //THROW_RUNTIME_ERROR("NdArray has not been initialized."); you can run and use the plugin.
I didn't fount time yet to have a deeper look for that error.

Hope it helps someone!

@GuitarML
Copy link
Owner

@vackva Thank you for the help! SmartAmpPro has not been in active development for awhile, but it's on my list to bring up to date and improve the interface between the plugin and tensorflow. And yes, if you use later than JUCE 6.08 it will not be able to compile the file browser part of the code, reference this open issue on NeuralPi: GuitarML/NeuralPi#28

@vackva
Copy link

vackva commented Mar 10, 2022

Sure, took me some time to figure that out and I'm sure others will run into the same issue :)

I also have a working CMake build (CMakeLists.txt), I could share this as well if you are interested in that.

@jamsden
Copy link
Author

jamsden commented Mar 11, 2022

Glad to see some activity. I hope to put some time into this once it's working again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants