BR: juce::DocumentWindow::getWindowStateAsString() returns nonsense values sometimes

        MainWindow (juce::String name) : DocumentWindow (name, juce::Desktop::getInstance().getDefaultLookAndFeel().findColour (juce::ResizableWindow::backgroundColourId), DocumentWindow::allButtons)
        {
            setUsingNativeTitleBar (true);
            setContentOwned (new MainComponent(), true);

            setResizable (true, true);
            setBounds (200, 200, 1000, 1000);

            juce::Timer::callAfterDelay (1000, []
            {
                JUCEApplication::getInstance()->systemRequestedQuit();
            });
        }

        ~MainWindow() override
        {
            auto str = getWindowStateAsString();
            printf("%s\n", str.toRawUTF8());
            jassert (juce::StringArray::fromTokens (str, " ", "").strings.getLast().getIntValue() == getHeight());
        }

I set the Component bounds to 200, 200, 1000, 1000 and then getWindowStateAsString() returns 50 50 256 256.

Code to reproduce: juce_bugs/Main.cpp at master · FigBug/juce_bugs · GitHub

On macOS, to get good values i have to add setVisible (true); after setting the bounds.