Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application freezes on macOS when calling repaint() in onNanoDisplay #369

Open
hpfmn opened this issue Feb 22, 2022 · 9 comments
Open

Application freezes on macOS when calling repaint() in onNanoDisplay #369

hpfmn opened this issue Feb 22, 2022 · 9 comments

Comments

@hpfmn
Copy link

hpfmn commented Feb 22, 2022

Hi,

when repaint() is called inside of a onNanoDisplay callback the application freezes on macOS. Seems that the draw queue gets filled up with to many requests. I'm not totally sure if that is bug or these situations should be handled differently? An example where this happens is wolf-spectrum - see wolf-plugins/wolf-spectrum#54

Best regards,
Johannes

@falkTX
Copy link
Contributor

falkTX commented Feb 22, 2022

on macOS things are a bit weird with repaints, it always does so even if you never call repaint.
seems to be a bug in pugl

@hpfmn
Copy link
Author

hpfmn commented Feb 22, 2022

Are you referring to this? lv2/pugl#56

@hpfmn
Copy link
Author

hpfmn commented Feb 22, 2022

What would you recommend to do about it? Open a bug report at pugl? If I'm getting rid of all repaint calls in wolf-spectrogram it does work for me on macOS. But repaint is also called in

void SubWidget::setAbsolutePos(const Point<int>& pos) noexcept
{
    if (pData->absolutePos == pos)
        return;

    PositionChangedEvent ev;
    ev.oldPos = pData->absolutePos;
    ev.pos = pos;

    pData->absolutePos = pos;
    onPositionChanged(ev);

    repaint();
}

@falkTX
Copy link
Contributor

falkTX commented Feb 22, 2022

no, this is something else. I noticed with cardinal, I cannot slow down the repaints on macOS.

@falkTX
Copy link
Contributor

falkTX commented Feb 22, 2022

What would you recommend to do about it?

dont call repaint on macOS for now, is the quick workaround.

@falkTX
Copy link
Contributor

falkTX commented Feb 22, 2022

I mean dont call repaint during the drawing function.

@hpfmn
Copy link
Author

hpfmn commented Feb 22, 2022

Hmm... okay but do you think it is a good idea to also open an issue at pugl?

@falkTX
Copy link
Contributor

falkTX commented Feb 22, 2022

Hmm... okay but do you think it is a good idea to also open an issue at pugl?

I will do that eventually, will try to make a fix for it first.

@falkTX
Copy link
Contributor

falkTX commented Jul 11, 2022

can you try with latest develop branch? lots of commits since this issue was first opened, and there were some crucial macOS related fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants