-
Notifications
You must be signed in to change notification settings - Fork 62
Description
The undo history window (QUndoStack) sometimes causes a segfault when rapidly clicking to undo a bunch of changes to the "scale" setting of the Image component. It's not actually a new bug (it exists in 2.0.0 as well), but I just discovered it.
It is probably a similar cause as one previous segfault I fixed related to Pillow images, so I'm optimistic I'll figure it out soon. Specifically the problem occurs within ComponentUpdate, a QUndoCommand used for (almost) every component setting change (in src/avp/component.py)
A more common crash related to the same core issue occurs on the Python side:
Traceback (most recent call last):
File "/home/b/code/audio-visualizer-python/src/avp/component.py", line 951, in redo
self.setWidgetValues(self.modifiedVals)
File "/home/b/code/audio-visualizer-python/src/avp/component.py", line 941, in setWidgetValues
else self.parent.pixelValForAttr(attr, val)
File "/home/b/code/audio-visualizer-python/src/avp/component.py", line 735, in relativeWidgetAxis
return func(self, attr, *args, **kwargs)
File "/home/b/code/audio-visualizer-python/src/avp/component.py", line 753, in pixelValForAttr
log.verbose(
File "/home/b/code/audio-visualizer-python/src/avp/__init__.py", line 26, in verbose
if self.isEnabledFor(5):
RecursionError: maximum recursion depth exceeded
Aborted (core dumped) avp
This happens often when scrolling up and down with my mousewheel on the "scale" setting of the Image component. The problem occurs because the Image component defines its scale widget to be a "relative widget" so it gets handled specially (especially brokenly, it turns out).
I'm hoping to get this fixed within a couple of weeks, because it's a good excuse to re-familiarize myself with sections of the codebase I want to refactor the most in future (after writing more tests).