Application freezes on macOS when calling repaint() in onNanoDisplay
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 https://github.com/wolf-plugins/wolf-spectrum/issues/54
Best regards, Johannes
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
Are you referring to this? https://github.com/lv2/pugl/issues/56
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();
}
no, this is something else. I noticed with cardinal, I cannot slow down the repaints on macOS.
What would you recommend to do about it?
dont call repaint on macOS for now, is the quick workaround.
I mean dont call repaint during the drawing function.
Hmm... okay but do you think it is a good idea to also open an issue at pugl?
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.
can you try with latest develop branch? lots of commits since this issue was first opened, and there were some crucial macOS related fixes.