-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Periodic crashes with a cairo_surface_reference error message #577
Comments
I have seen this same crash, but very rarely, so it has not been possible to isolate the cause. The error is complaining that the cairo context (a blob of data used for drawing the window) is invalid, as suggested by this issue. Unfortunately, nothing in the Tartube code uses Cairo directly, so I don't know if it's an issue in my code or if it's a bug buried deep in the Gtk libraries. You could try these things, and report back to me if you notice any difference in behaviour:
Yes, it was an entirely different issue (tl;dr Gtk is not thread-safe), which was fixed some time ago. |
After some more testing, I've been able to trigger the crash both idling on the Videos tab with no channel selected (so no thumbnails or anything) as well as idling on the Output tab. No luck in finding a consistent trigger so far, it is very inconsistent. Sometimes it'll crash twice in a few minutes, other times it'll idle for a day or more without issue. Will keep experimenting with it. |
If you like, you can try running v2.3.367, which was the last version to include extensive debug messages throughout the code. The debug messages must be turned on by editing one of the source code files, Line 116
...must be changed to this:
You should then run Tartube from inside a terminal window, so you can see the generated output. Run the application
|
Update: After dropping back to 2.3.367 and running it for a while, including downloading a few hundred videos, I didn't see any crashes. I then switched back to 2.4.386, started with a blank slate, and again didn't see any crashes over the course of a couple days. However, when I load up my fairly large (15K+ videos) real database, I see regular crashes. Seems unlikely to be a scaling issue causing a windowing crash since it never tries to render the entire set of videos. Perhaps one or more of the resources is broken? Something like a corrupted thumbnail that causes cairo to throw errors, perhaps? |
I let v2.3.367 run for about six days without interruptions, and didn't see any crashes. It might be the case that we need a large database. I have one of those, so I'll try running v2.3.367 again and we'll see what happens. |
I'm also having the same problem with the cairo_surface_reference error. Any updates on this bug? |
Sorry, I have not been able to make any progress. |
I just tired the latest v2.4.429 tartube. Unfortunately the same crash occurs after a while checking for new videos (not downloading) in various channels.
|
I have an idea about this, perhaps you could try v2.4.433 (uploaded only to Github and Pypi). |
Sorry for the late reply, I've only just had a chance to try again. I installed v2.4.433 using a fresh python venv to reduce the risk of something interfering. Unfortunately it has the same problem:
|
I think I have found the cause of these crashes, and I have uploaded a fix as v2.4.438. The new code is only uploaded here to github (not to PyPI, as usual). If any of you have the time to test it, over the next few days, then I would be happy to hear about the results. I have also added some detailed deub messages. If you run Tartube from a terminal window, you can see them. If Tartube crashes, please show me the last 50 or so lines from your terminal. |
Fixed in v2.5.0. |
Hi @axcore I downloaded and installed the v2.5.0 deb package and let Tartube check all channels (not download) and got the same error again.
Is there a way to turn on debugging? Or will I need to compile from source? Thanks again for your efforts. |
Long answer: in the file In the files Short answer: download and run code from the |
Thanks @axcore, Because the logs become huge quickly, 100MB's within 10 minutes or so. So I compressed the logs as follows [1], in case anyone else needs to do the same:
There are a bunch of warnings at the start:
Then the crash happens without any other warnings/errors about 1 hour later whilst tartube checks the channels (not downloading):
|
I would guess that the initial
Save this as a file called
|
Tartube's debug output shows the name of each function, as it is called. But a Gtk crash will not happen immediately. Usually I have to go back a hundred lines or so to find the piece of code that's causing the problem. If you can, please show the last 200-300 lines of output before the crash. |
Please find attached the last 400 lines. |
Sorry, I still cannot reproduce this, and the debug log you provided does not provide any clues. If you can tell me exactly which Linux distribution you're running, and exactly which desktop them you have selected for it, then I will test that directly. |
Sorry missed your
I'm using Devuan, which is based on Debian.
And here is the Xfce details. Xfce Version: 4.18 |
I installed Devuan (Daedalus), XFCE, and I ran Tartube v2.5.0 for about 24 hours, downloading videos continuously. I didn't experience any crashes. I did see the same "Theme parsing error" warnings both from Tartube, and from the test python script I described above. Sorry, I don't know what else to suggest. |
Thank you so much for going to the trouble of installing Devuan and testing. There must be something wrong with my setup. I'll see if can work out why and report back if I succeed. |
Try running the test script (or just run Tartube) with a different desktop theme. If they all produce the same warnings, then we will know that it's not a problem with the themes themselves. |
I've been getting this crash too for quite some time on multiple 2.4 updates (currently on 2.4.429), and finally bothering now to look in to it. System info: The behavior I have seen is that tartube will run fine for a while, sometimes for over a month straight, either continuously or restarts, then suddenly will have this crash and will keep doing so every 5-90 minutes regardless of what it is doing of visibility status (window in foreground, background, minimize, or closed to tray). This behavior will remain constant till reboot where there is a chance it will restart this cycle and run fine for at least a week or two. Only looking in to the issue now cause its happened 3 times in 5 minutes (though the 4 run kept going for 30+ minutes while doing this research and this report). Just updated to 2.5.0, will report back later how that goes and if it crashes again, will switch to debug branch while its still repoing this issue. |
The crashing continued on 2.5.0 and I was unable to get the debug version to run. |
What operating system are you using?
Linux (pop_os, 22.04)
What version of Tartube are you using?
2.4.386 (.deb version)
I'm periodically encountering a crash
when downloading or checking channelswhilst the application is running. The terminal output when it crashes looks like this:Whilst cairo_surface seems to suggest a graphical root cause, it is oddly consistent when it comes to channels. Either a particular channel crashes repeatedly, or there's never a crash with it. An example of one that I see frequent crashes with:https://www.youtube.com/channel/UCuppnYXlAo7r7IhVigrVAfQ
Edit: I've also seen it crash with the same cairo message whilst sitting idly, not downloading or checking anything.
I've seen references to an option for assuming GTK is broken in the settings when searching for this issue, but I can't find that option in my version of tartube. Has it been removed?
The text was updated successfully, but these errors were encountered: