| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
I can't manage to trigger any error with the example as it is right now, and removing the blit line makes the example not work anymore on tkagg for me.
Anyone can dismiss the review if this problem is sorted out.
Sorry, something went wrong.
|
Ok, seems this needs some more detailed bug report. With Qt5Agg backend, py 3.6 on windows 8.1, running the example as script produces This error (hidden for convenience)QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
QWidget::repaint: Recursive repaint detected
Traceback (most recent call last):
File "d:\data\computer\entwicklung\python\matplotlib\sour
self.draw()
File "d:\data\computer\entwicklung\python\matplotlib\sour
self.figure.draw(self.renderer)
File "d:\data\computer\entwicklung\python\matplotlib\sour
return draw(artist, renderer, *args, **kwargs)
File "d:\data\computer\entwicklung\python\matplotlib\sour
renderer, self, artists, self.suppressComposite)
File "d:\data\computer\entwicklung\python\matplotlib\sour
a.draw(renderer)
File "d:\data\computer\entwicklung\python\matplotlib\sour
return draw(artist, renderer, *args, **kwargs)
File "d:\data\computer\entwicklung\python\matplotlib\sour
mimage._draw_list_compositing_images(renderer, self, ar
File "d:\data\computer\entwicklung\python\matplotlib\sour
a.draw(renderer)
File "d:\data\computer\entwicklung\python\matplotlib\sour
return draw(artist, renderer, *args, **kwargs)
File "d:\data\computer\entwicklung\python\matplotlib\sour
ticks_to_draw = self._update_ticks(renderer)
File "d:\data\computer\entwicklung\python\matplotlib\sour
tick_tups = list(self.iter_ticks()) # iter_ticks calls
File "d:\data\computer\entwicklung\python\matplotlib\sour
majorLocs = self.major.locator()
File "d:\data\computer\entwicklung\python\matplotlib\sour
return self.tick_values(vmin, vmax)
File "d:\data\computer\entwicklung\python\matplotlib\sour
locs = self._raw_ticks(vmin, vmax)
File "d:\data\computer\entwicklung\python\matplotlib\sour
nbins = np.clip(self.axis.get_tick_space(),
File "d:\data\computer\entwicklung\python\matplotlib\sour
tick = self._get_tick(True)
File "d:\data\computer\entwicklung\python\matplotlib\sour
return XTick(self.axes, 0, '', major=major, **tick_kw)
File "d:\data\computer\entwicklung\python\matplotlib\sour
self.apply_tickdir(tickdir)
File "d:\data\computer\entwicklung\python\matplotlib\sour
self.stale = True
File "d:\data\computer\entwicklung\python\matplotlib\sour
self.stale_callback(self, val)
File "d:\data\computer\entwicklung\python\matplotlib\sour
self.axes.stale = val
File "d:\data\computer\entwicklung\python\matplotlib\sour
self.stale_callback(self, val)
File "d:\data\computer\entwicklung\python\matplotlib\sour
self.figure.stale = val
File "d:\data\computer\entwicklung\python\matplotlib\sour
self.stale_callback(self, val)
File "d:\data\computer\entwicklung\python\matplotlib\sour
if val and matplotlib.is_interactive() and not fig.canv
RecursionError: maximum recursion depth exceeded
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::end: Painter not active, aborted
...this is hidden, collapsable content... With TkAgg backend, py 3.6 on windows 8.1, running the example as script runs fine without error and produces the desired plot. Removing the line self.canvas.blit(self.ax.bbox) as proposed here, lets the script run fine in TkAgg backend as well as Qt5Agg backend. This led me to the conclusion that, similarly to the poly_editor example, one should not try to blit inside the draw_event callback. Logically this makes sense to me because there is no reason to blit if the figure is drawn anyways shortly afterwards. @anntzer What kind of error do you get when running this with the line in question removed? Does the same happen for the poly_editor example as it is now? |
Sorry, something went wrong.
|
This is the race condition that just keeps giving.... |
Sorry, something went wrong.
|
For me (linux/py3/tkagg), removing the line causes nothing to happen at all when attempting to drag a point. |
Sorry, something went wrong.
|
Any conclusion? Should I better close this and open an issue about it? |
Sorry, something went wrong.
|
I think leaving this open is just as good as opening a separate issue. |
Sorry, something went wrong.
|
Just marking as "Needs revision" so folks don't click on this as a PR that needs review, not as a spur to action.... |
Sorry, something went wrong.
|
Keeping this as an unfinished/dead PR will probably rather cause confusion once someone revisists this in the future. So, I guess I will open an issue about it one of those days. It's currently not clear (to me) why there is even a difference between the examples being run on windows and linux and this might well point towards a bigger underlying problem. |
Sorry, something went wrong.
|
I cannot reproduce any error with Qt5Agg using current master. |
Sorry, something went wrong.
|
I cannot reproduce the error either with:
@ImportanceOfBeingErnest can you test on a more recent version yourself? Otherwise I propose to close this assuming fixed tue to @QuLogic and me not being able to reproduce it. |
Sorry, something went wrong.
|
The issue is still present. matplotlib/examples/event_handling/poly_editor.py Lines 88 to 90 in 2d4fcc7 |
Sorry, something went wrong.
|
No wait. This is actually fixed by #16028 |
Sorry, something went wrong.
|
Actually in my hands the path_editor example now also works on tkagg without the blit; if others can confirm that perhaps we can just remove it. |
Sorry, something went wrong.
|
I was just playing with the path_editor example and found that with QtAgg if I resize the window I get QWidget::repaint: Recursive repaint detected QWidget::paintEngine: Should no longer be called QPainter::begin: Paint device returned engine == 0, type: 1 QPainter::end: Painter not active, aborted Segmentation fault (core dumped) Removing the blit line fixes this for me. TkAgg works fine whether the blit line is there or not. I am on Ubuntu 22.04 and tested this with main. I was going to open a new issue but then found this. Maybe I should still open a new issue... |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
The path editor example errors when being run with an interactive backend, due to a recursion in drawing the elements.
This PR fixes this issue by not blitting inside the draw_event (because that happens before the screen update anyways).