-
Notifications
You must be signed in to change notification settings - Fork 1k
Sending message can occasionally max out CPU thread #5620
Comments
@anthonybilinski I think this might be the same bug I told you about |
I got this again, this time in the following environment:
The high CPU usage stopped when I changed the active chat and returned when I switched back to the problematic chat. |
This didn't happen for me since a while, maybe it got fixed on master? |
I've seen it as recently as yesterday on tip, with the same repro steps of half-covered date line. |
This happens to me on Windows 7 Build 7601, on qTox v1.16.3-514-ge8d48e8. Scrolling up in the chat any amount at all fixed the problem, scrolling back down re-caused the problem. |
I believe the cause of this bug comes from
If the top line is not today, but the second line is, we will flicker back and forth between showing the date and not showing the date. This is because when the date is shown it covers the message of the previous date. We then say "hey the first message is today, so we can hide the date line again" which causes the first line to not be today again. |
The previous implementation of hiding the date line would cause 100% cpu usage. When the date line was shown it would hide the top line, causing the date line to be hidden again due to a state change in which dates was visible. This is a minimal patch to work around the issue by pretending the line covered by the date line is the first visible line when the dateline is shown Fixes qTox#5620
The previous implementation of hiding the date line would cause 100% cpu usage. When the date line was shown it would hide the top line, causing the date line to be hidden again due to a state change in which dates was visible. This is a minimal patch to work around the issue by pretending the line covered by the date line is the first visible line when the dateline is shown Fixes qTox#5620
Fixed by #5875, which was merged to branch |
Brief Description
OS: Linux x64, Fedora 29 and 30 beta
qTox version: v1.16.3-384-gdf62463e, newest version from a few days ago
toxcore: 0.2.9
Qt: 5.11.3
…
Reproducible: happens to me multiple times a day with different people, but rarely and not every time a message is sent
Steps to reproduce
Observed Behavior
Here is a video I took when I got it to happen recently, I sent a message to my online friend which caused the CPU Usage to spike permanently, if you hover over it the mouse cursor gets all glitchy over the link (although I’ve had this happen on non link messages as well)
https://gfycat.com/MeagerIllinformedGrasshopper
I sent another message and the problem goes away, but I’m pretty sure it’s also happened when I’ve been sent a message by a different friend since I’ve seen the same problem when unlocking my computer in the morning where it was using 25% CPU for who knows how long
Let me know if there is anything I can do to help debug this. I had the same problem when testing the new Fedora 30, and there didn’t seem to be any errors or debug messages when running qTox from a terminal
The text was updated successfully, but these errors were encountered: