Re: [Banshee-List] [PATCH] TrackInfoDisplay pixbuf crash



Alex,

Thanks for tracking this down! It's been on my list of things to investigate for probably a month now. The patch is committed. Great explanation as well. I'm looking forward to more contributions! :)

Best,
Aaron


>>> Alex Hixon <hixon alexander mediati org> 01/25/08 1:42 AM >>>
Hi all,

Attached is a fix for the issue in trunk where TrackInfoDisplay would  
end up causing a SIGSEGV, terminating Banshee. It's only a one-liner. ;)

After the TrackInfoDisplay has finished transitioning from one song to  
the next, the code would dispose the current album pixbuf. What would  
happen is, sometimes, the incoming pixbuf would missing_pixbuf (the  
icon for songs without cover art). After the next transition, we'd end  
up disposing missing_pixbuf, so that next time we used missing_pixbuf,  
we'd crash, because we were using an empty image. Null checks are  
useless because what you'd end up with is the pixbuf object, but with  
-1x-1 (empty) image data.

The patch just checks to see if the pixbuf is also missing_pixbuf, and  
doesn't dispose it if it is.

You can reproduce the crash by playing a song that has no album art,  
then one that does, and finally if you click on another song without  
album art, you should crash. You should generally wait for the  
transition to finish before clicking on the next song.

Cheers,
Alex Hixon



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]