Only "MidiDemo.h" crash

I downloaded JUCE 7.0.0 and trying to run DemoRunner on Windows 10. However, only “MidiDemo.h” crash.
It crashes in the same way whether I use the one from the JUCE folder or the one I compiled myself.

Is this happening only with this version? Or am I doing something wrong?

Where does the program crash? Please provide a stack trace at the point of the crash, along with any steps you took to trigger the crash (e.g. clicking on a specific button, plugging in or disconnecting a MIDI device).

c

When click “MidiDemo.h”, it crash.

I am not very good at English and programming, so please let me know if I have made any mistakes

MidiDemo also not running for me from DemoRunner. When I build it (MacOS) it asserts in ListBox::checkModelPtrIsValid().
jassert ((model == nullptr) == (weakModelPtr.lock() == nullptr));
Quite a lot of changes in juce_ListBox.h/cpp. If I JUCE_DISABLE_ASSERTIONS, also fails in setModel. All works fine on JUCE 6

Thank you for reporting.

Thank you for replying, but MidiDemo still cannot run from DemoRunnner.

You need to rebuild the DemoRunner using the develop branch. The change has not yet been merged to the master branch.

Using the develop branch, I found I had to adapt my “similar to MidiDemo” program to work, by not calling:

        MidiDeviceListBox (const String& name,
                           MidiDemo& contentComponent,
                           bool isInputDeviceList)
            : ListBox (name, this),
              parent (contentComponent),
              isInput (isInputDeviceList)
        {
            setModel (this);

but
calling initializing the ListBox after the parent had been instatiated:
i.e.

        MidiDeviceListBox (const String& name,
                           MidiDemo& contentComponent,
                           bool isInputDeviceList)
            : parent (contentComponent),
              isInput (isInputDeviceList)
        {
            juce::ListBox (name, this);
            setModel (this);

Perhaps this could also improve MidiDemo.h?
It tries to dereference parent within void ListBox::updateContent().