Desfazendo um Engano

jocafi jcf.newcamp at hotmail.com
Sun Dec 2 13:49:18 UTC 2007


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.
Aqui vão os meus mais sinceros agradecimentos! 



Date: Sun, 2 Dec 2007 13:30:24 +0100
From: tbscope at gmail.com
To: amarok at kde.org
Subject: Assert in trying to acces an item in a QList "Index out of bounds" -	Possible fix, but might not be correct.

[13:21] <tbscope> I have a bug fix, but I'm not sure if it's the correct fix. I'll explain:
[13:21] <tbscope> I want to open a shoutcast playlist (pls file) but Amarok crashes
[13:21] <tbscope> Assert in some QList "index out of bounds"

[13:22] <tbscope> I searched for the problem and found that at some point, the list with added tracks becomes empty
[13:22] <tbscope> The culprit is PlaylistModel.cpp ->    Model::insertOptioned
[13:22] <tbscope> In that function there's a check to see if the added track is a playlist

[13:23] <tbscope> obviously it is
[13:23] <tbscope> so, the playlisthandler loads the playlist and takes (read: removes) the track from the list
[13:23] <tbscope> but the function continues

[13:23] <tbscope> resulting in trying to add an empty list
[13:23] <tbscope> thus resulting in an out of bounds error somewhere later
[13:24] <hurra> tbscope: if noone responds here, write an email to the amarok mailinglist :)

[13:24] <tbscope> Adding a check to see if the list becomes empty and returning from Model::insertOptioned seems to solve that problem
[13:24] <tbscope> hurra: thanks, I'll do that
[13:24] <nhnFreespirit> tbscope: we are talking Amarok2 here?

[13:24] <tbscope> nhnFreespirit: yes, the version in trunk
[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! :-)


Patch:

Index: PlaylistModel.cpp
===================================================================
--- PlaylistModel.cpp   (revision 743903)
+++ PlaylistModel.cpp   (working copy)
@@ -509,6 +509,8 @@

        }
    }

+   if (list.isEmpty())
+       return;

     int firstItemAdded = -1;
     if( options & Replace )




_________________________________________________________________
Encontre o que procura com mais eficiência! Instale já a Barra de Ferramentas com Windows Desktop Search GRÁTIS!
http://desktop.msn.com.br/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok/attachments/20071202/e8d8da75/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001
URL: <http://mail.kde.org/pipermail/amarok/attachments/20071202/e8d8da75/attachment.ksh>


More information about the Amarok mailing list