-
-
Notifications
You must be signed in to change notification settings - Fork 78
IndexError when track wasn't added because length too long #279
Comments
Hi. I can't reproduce this problem. But somehow the order of the log is unexpectedly messed up. |
Wait for the bot to connect. The playlist is empty, mode is
Crash. Notice, that the track is longer than the maximum time allowed. This also happens when the request ends in HTTP 429 from YouTugbe.
|
This is the exact procedure I have followed. However, no crash happened. Would you add
right before L267 of |
|
Okay. It's clear to me that this is another example of racing condition. I added a mutex to avoid conflicts when accessing the playlist in my newest PR. Would you like to have a look? Meanwhile, I assume this bug is quite platform-dependent (or based on your report, your platform is somehow rather prone to have such kinds of threading problems). You are welcomed to submit new bug reports should you encounter another bug of this kind in the future since the platforms @azlux and I have don't usually expose them. |
This is an x86_64-linux VM (1 Core, 2 GB RAM) on Hetzner Cloud. I'm not sure why it would be particular prone to races. Hetzner CX11 |
Yup, that fixes it for me. |
Thanks for letting me know. |
Describe the bug
We have an empty playlist and try to add a youtube url that is above our configured limit of 180 minutes, the bot subsequently crashes with an
IndexError
.This only happens when the playlist is empty.
Affected version
33a9e75
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Use for each loops instead of using explicit iterators.
Additional context
The text was updated successfully, but these errors were encountered: