Skip to content
This repository was archived by the owner on Oct 3, 2022. It is now read-only.
This repository was archived by the owner on Oct 3, 2022. It is now read-only.

Exception when opening plugin interface and update to JUCE 5.4.6 #2

Description

@cornzz

The exception is only thrown in debug mode since it is triggered by a valid coordinates assertion during currentPositionMarker.setRectangle() in AudioThumbnailComp.cpp, caused by timeToX() returning -nan(ind) and therefore the new Rectangle having an x value of -nan(ind).

timeToX() is returning that because for some reason visibleRange.getLength() is 0 at that point.
A possible fix would be this:

float AudioThumbnailComp::timeToX(const double time) const
{
    if (visibleRange.getLength() == 0)
        return 0.0f;

    return getWidth() * (float)((time - visibleRange.getStart()) / (visibleRange.getLength()));
}


Furthermore a little change in PluginProcessor.cpp is needed, since getXmlFromBinary (now?) returns std::unique_ptr:

void AudioFilePlayerProcessor::setStateInformation(const void* data, int sizeInBytes)
{
    std::unique_ptr<XmlElement> xmlState(getXmlFromBinary(data, sizeInBytes));


Last, I was getting Cannot open include file: 'pluginterfaces/vst2.x/vstfxstore.h': No such file or directory, adding JUCE_VST3_CAN_REPLACE_VST2 = 0 to preprocessor definitions in the projucer fixed that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions