<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;">Ha alguns meses atrás eu reportei um problema ao KDE,e desde então eu tenho recebido uma enxurrada de mensagens endereçadas ao KDE mais ,que por algum engano tem caido na minha conta.Eu informo a quem interessar possa que eu não faço parte da equipe do KDE,sou apenas um usuário comum como outro qualquer.Mais uma vez conto com a ajuda de vcs pra desfazer este engano.<br>Aqui vão os meus mais sinceros agradecimentos! <br></div><br><br><br><blockquote><hr id="EC_stopSpelling">Date: Sun, 2 Dec 2007 13:30:24 +0100<br>From: tbscope@gmail.com<br>To: amarok@kde.org<br>Subject: Assert in trying to acces an item in a QList "Index out of bounds" - Possible fix, but might not be correct.<br><br>[13:21] <tbscope> I have a bug fix, but I'm not sure if it's the correct fix. I'll explain:<br>[13:21] <tbscope> I want to open a shoutcast playlist (pls file) but Amarok crashes<br>[13:21] <tbscope> Assert in some QList "index out of bounds"
<br>[13:22] <tbscope> I searched for the problem and found that at some point, the list with added tracks becomes empty<br>[13:22] <tbscope> The culprit is PlaylistModel.cpp -> Model::insertOptioned<br>[13:22] <tbscope> In that function there's a check to see if the added track is a playlist
<br>[13:23] <tbscope> obviously it is<br>[13:23] <tbscope> so, the playlisthandler loads the playlist and takes (read: removes) the track from the list<br>[13:23] <tbscope> but the function continues<br>
[13:23] <tbscope> resulting in trying to add an empty list<br>[13:23] <tbscope> thus resulting in an out of bounds error somewhere later<br>[13:24] <hurra> tbscope: if noone responds here, write an email to the amarok mailinglist :)
<br>[13:24] <tbscope> Adding a check to see if the list becomes empty and returning from Model::insertOptioned seems to solve that problem<br>[13:24] <tbscope> hurra: thanks, I'll do that<br>[13:24] <nhnFreespirit> tbscope: we are talking Amarok2 here?
<br>[13:24] <tbscope> nhnFreespirit: yes, the version in trunk<br>[13:26] <nhnFreespirit> tbscope: hmmm... adding an empty list really should not cause a crash. If you send a patch to the mailing list I will have a look at it! :-)
<br><br>Patch:<br><br>Index: PlaylistModel.cpp<br>===================================================================<br>--- PlaylistModel.cpp (revision 743903)<br>+++ PlaylistModel.cpp (working copy)<br>@@ -509,6 +509,8 @@
<br> }<br> }<br><br>+ if (list.isEmpty())<br>+ return;<br><br> int firstItemAdded = -1;<br> if( options & Replace )<br><br><br>
</blockquote><br /><hr />Encontre o que você procura com mais eficiência! Instale já a Barra de Ferramentas com Windows Desktop Search! <a href='http://desktop.msn.com.br/' target='_new'>É GRÁTIS!</a></body>
</html>