
I seem to be able to get around it by simply commenting out the entire #if JUCE_DEBUG section
Looks like it’s checking that the rectangle size/position are within sensible ranges.
What causes the error? Do you see this in any of the example projects, or only in your own program?
the macro is used to warn you about mistakes before going to release mode
Don’t ever do that.
You’re getting the errors for a reason. That may very well end up being a massive security flaw in your software.
If the sizes aren’t valid, either you’re forgetting to set bounds for the rectangle, or, you’re using a pointer and not initialising it therefor making the rectangle NULL.
Can you share more info on the calling method you’re using
This is a uni project. Not the example projects.
All good now. It’s been fixed by a classmate.
Before:
void WaveformDisplay::setPositionRelative(double pos)
{
if (pos != position)
{
position = pos;
repaint();
}
}
After:
void WaveformDisplay::setPositionRelative(double pos)
{
if (pos != position && pos > 0)
{
position = pos;
repaint();
}
}
I think the error is further down, since a negative position should be allowed. However a negative width or height are not, so I assume the width or height are somehow deduced from the position and therefore become negative.
Oh well, maybe it became very negative to exceed this magic maxVal, which looks dodgy too me anyway.
This helped!
