Possible integer overflow when opening videos
bug
### Steps to reproduce
1. Open Libretube
2. Open any video (length does not matter)
3. Fairly often, the described error will occur at this point.
### Expected behavior
On opening a video, a video stream the same length as the video should open and play.
### Actual behavior
A video stream lasting ±2562047788:00:`n` opens and plays. The screen is blank and black thoroughout (the target video doesn't load). Navigating on the timeline immediately brings up the replay screen/button. (This occurs even when a time well within the length of the video is selected as the destination time).
### LibreTube version
31.2 (68)
### Android version
Android 16
### Other details
I have been using (and loving) Libretube for the past few months. In that time, this bug has started to happen more and more. In fact, in the past few weeks, easily 50% of the videos which I open fall prey to this bug.
I've had quite few opportunities to study it, so here's what I've found:
1. It affects videos of any length. I can't say whether or not it affects shorts, as I don't watch those.
2. The length is always of the form ±2562047788:00:`n`, with `n` varying from video to video (I don't know whether or not `n` corresponds to the actual seconds section of the video length).
3. Playback time seems to cross over between the bugged version of the video and the real version (e.g. if you watch the bugged version to 1:25, when you close and reopen the video, the real version will pick up playback at 1:25).
4. The method of selecting/opening the video doesn't matter. The error occurs just as often when the video us autoplayed from the queue as when it us manually selected. It also occurs when the screen is off.
5. The error only occurs with online videos. Offline video playback does not seem to be affected.
6. I'm not the only person which this has happened to; I actually saw this exact bug in r/softwaregore.
7. Most of the time, the error can be resolved by closing and reopening the video. Sometimes this process needs to be repeated multiple times to have an effect. Restarting the Libretube app helps.
This seems like an integer overflow or something similar, but my limited knowledge prevents me from making a more educated guess. Another, similar, bug which may or may not be related to this is that the video will just occasionally never load (the video stream, comments, and reccomended videos never appear when the video is opened; instead, the loading screen never ends). This, however, is much more rare.
While this doesn't make the app totally unusable, it certainly degrades the experience, so I hope that this information helps fix the error soon!
Attached are examples of the error occurring:
<img width="2340" height="1080" alt="Image" src="https://github.com/user-attachments/assets/ed29a4b6-b6b8-4213-ad3d-8df92e85a9e1" />
<img width="2340" height="1080" alt="Image" src="https://github.com/user-attachments/assets/e3b3de71-2de2-4170-8384-6a63242b4c7d" />
<img width="2340" height="1080" alt="Image" src="https://github.com/user-attachments/assets/bdb86102-e836-4f21-a0b8-8a0fc57529d3" />
<img width="2340" height="1080" alt="Image" src="https://github.com/user-attachments/assets/352dfa20-bb10-460d-a2c3-cc2ff2a32d02" />
<img width="2340" height="1080" alt="Image" src="https://github.com/user-attachments/assets/9e5f91fb-dd26-47f7-9504-a964b217be5d" />
<img width="2340" height="1080" alt="Image" src="https://github.com/user-attachments/assets/3dcbc2b2-78e5-4ca9-8632-dd25a4225906" />
### Acknowledgements
- [x] I have searched the existing issues and this is a new ticket, **NOT** a duplicate or related to another open issue.
- [x] I have written a short but informative title.
- [x] I will fill out all of the requested information in this form.
2 条评论