Crash on setResizeLimits

I am resizing my plugin window and used following two lines in ProcessorEditor file.

setResizable (true, true);
setResizeLimits (989, 640, 1211, getHeight());

But as i start Repear and add plugin, it crashes. Crash log is as follows,

JUCE Assertion failure in juce_ComponentBoundsConstrainer.cpp:65
Process 14573 stopped

  • thread #1: tid = 0xc13cae, 0x0000000109c42783 juce::ComponentBoundsConstrainer::setSizeLimits(this=0x000000010210ecf0, minimumWidth=989, minimumHeight=640, maximumWidth=1211, maximumHeight=150) + 179 at juce_ComponentBoundsConstrainer.cpp:65, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0) frame #0: 0x0000000109c42783juce::ComponentBoundsConstrainer::setSizeLimits(this=0x000000010210ecf0, minimumWidth=989, minimumHeight=640, maximumWidth=1211, maximumHeight=150) + 179 at juce_ComponentBoundsConstrainer.cpp:65
    62 int maximumHeight) noexcept
    63 {
    64 jassert (maximumWidth >= minimumWidth);
    -> 65 jassert (maximumHeight >= minimumHeight);
    66 jassert (maximumWidth > 0 && maximumHeight > 0);
    67 jassert (minimumWidth > 0 && minimumHeight > 0);
    68

Your minimumHeight argument to setResizeLimits() is greater than the maximumHeight argument, which obviously doesn’t make sense so you’re hitting an assertion. Try using a minimum value that is less than the maximum