Really annoying you write a script, open it in vspreview, you misstyped lwlibavsource, vspreview crashes and you need to restart.
# repro script
import sys
if "asd" not in sys.modules:
sys.modules['asd'] = object()
assert False
else:
del sys.modules["asd"]
from vstools import core
core.std.BlankClip().set_output(0)
Traceback (most recent call last):
File "/home/user/git/vs-preview/vspreview/main/timeline.py", line 99, in paintEvent
self.drawWidget(QPainter(self))
File "/home/user/git/vs-preview/vspreview/main/timeline.py", line 102, in drawWidget
setup_key = (self.rect_f, self.main.current_output.index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'index'
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?
QPaintDevice: Cannot destroy paint device that is being painted
Traceback (most recent call last):
File "/home/user/git/vs-preview/vspreview/main/timeline.py", line 99, in paintEvent
self.drawWidget(QPainter(self))
File "/home/user/git/vs-preview/vspreview/main/timeline.py", line 102, in drawWidget
setup_key = (self.rect_f, self.main.current_output.index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'index'
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?
QPaintDevice: Cannot destroy paint device that is being painted
zsh: segmentation fault python -m vspreview repro.py
maybe this is a clean fix enough dunno
diff --git a/vspreview/main/window.py b/vspreview/main/window.py
index 39f13de..6c16095 100644
--- a/vspreview/main/window.py
+++ b/vspreview/main/window.py
@@ -399,7 +399,7 @@ class MainWindow(AbstractQItem, QMainWindow, QAbstractYAMLObjectSingleton):
if self.storage_not_found or reload_from_error:
self.load_storage()
- if not reloading:
+ if not reloading or (self.outputs is None):
self.toolbars.main.rescan_outputs()
self.toolbars.playback.rescan_outputs()
Really annoying you write a script, open it in vspreview, you misstyped lwlibavsource, vspreview crashes and you need to restart.
maybe this is a clean fix enough dunno