Skip to content

Commit db7c681

Browse files
author
arch
committed
new workaround for memory error
1 parent 08450e9 commit db7c681

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

funscript_editor/api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ def generate_funscript(
5050
logger.info("Args: video_file=%s, start_time=%s, end_time=%s, output_file=%s", \
5151
str(video_file), str(start_time), str(end_time), str(output_file))
5252
app = QtWidgets.QApplication(sys.argv)
53-
_ = FunscriptGeneratorWindow(video_file, start_time, end_time, output_file, include_multiaxis_options)
53+
w = FunscriptGeneratorWindow(video_file, start_time, end_time, output_file, include_multiaxis_options)
54+
w.setFixedHeight(5)
55+
w.setFixedWidth(5)
56+
w.move(1,1)
57+
w.show()
5458
ret = app.exec_()
5559
logger.info("EXIT")
5660
sys.exit(ret)

funscript_editor/ui/opencvui.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,14 @@ def __del__(self):
170170
def close(self):
171171
"""Close all OpenCV GUIs"""
172172
try:
173-
self.set_background_image(np.full((1,1,1), 0, dtype=np.uint8))
174-
self.show()
175-
cv2.resizeWindow(self.window_name, 1, 1)
176-
self.show()
177-
# TODO the following break the application (core dump)
178-
# cv2.destroyWindow(self.window_name)
173+
if False:
174+
self.set_background_image(np.full((1,1,1), 0, dtype=np.uint8))
175+
self.show()
176+
cv2.resizeWindow(self.window_name, 1, 1)
177+
self.show()
178+
else:
179+
# TODO the following break the application (core dump)
180+
cv2.destroyWindow(self.window_name)
179181
except:
180182
pass
181183

0 commit comments

Comments
 (0)