otsaloma / gaupol

Editor for text-based subtitle files
https://otsaloma.io/gaupol/
GNU General Public License v3.0
247 stars 35 forks source link

Crash when seeking to start of previous subtitle from the end of media. #185

Closed calbav closed 3 years ago

calbav commented 3 years ago

What I was doing:

I went to the final of the video I was writing subtitles for (a good twenty minutes after my last subtitle) and then tried to seek back to the start of the previous subtitle. The application then crashed.

How to replicate:

I could not replicate the crash afterwards but I did save the error data originally thrown:

Traceback

File: /usr/share/gaupol/gaupol/agents/video.py
Line: 278
In: _on_seek_previous_activate

    subtitles = list(filter(lambda x: x[1] < pos - 0.001, self._cache))

File: /usr/share/gaupol/gaupol/agents/video.py
Line: 278
In: <lambda>

    subtitles = list(filter(lambda x: x[1] < pos - 0.001, self._cache))

TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'

Environment

Platform: Linux-4.9.0-15-amd64-x86_64-with-debian-9.13
Locale: en_GB.utf_8

Versions

aeidon: 1.0
chardet: 2.3.0
enchant: 1.6.7
gaupol: 1.0
gstreamer: 1.10.4.0
gtk+: 3.22.11
pygobject: 3.22.0
python: 3.5.3
otsaloma commented 3 years ago

This seems to have been fixed already three years ago, it's #78 (which had a bit different symptom of the same problem).