Closed EdwardBetts closed 7 years ago
In what situation do you experience this?
Running corebird on a Debian laptop with high load average, switching wifi networks.
So the "amount" in
#4 0x0000557fe637a8b6 in cb_tweet_model_remove_last_n_visible (self=self@entry=0x557fea207800 [CbTweetModel], amount=4294967271) at CbTweetModel.c:687
Looks like an underflow with a uint possibly, unless you actually had 4294967271+25 tweets in your timeline.
The code in question checks for that case before though:
if (tweet_list.model.get_n_items () > DefaultTimeline.REST) {
tweet_remove_timeout = GLib.Timeout.add (500, () => {
if (!scrolled_up) {
tweet_remove_timeout = 0;
return GLib.Source.REMOVE;
}
tweet_list.model.remove_last_n_visible (tweet_list.model.get_n_items () - DefaultTimeline.REST);
tweet_remove_timeout = 0;
return GLib.Source.REMOVE;
});
}
But only before adding the timeout, so if the system is busy (and the timeout takes a bit longer to get executed than 500ms), there might be a case where we remove something from the model between the if statement before the GLib.Timeout.add
call and actually executing the callback. I'm not sure where or why that would happen but we can as well guard against that inside the callback again.
Backtrace from gdb. Version 1.5.1