Re: [PATCH] Fixed some Crashes, a memory leak and some minor issues

On Saturday 07 June 2014 10:50:59 David King wrote:

Hi David.

On 2014-05-26 19:02, Andreas Winkelmann <ml awinkelmann de> wrote:
You're right, the patch was a collection of almost all things I did
while hunting for the crash ;-) Better to split these.
Now I have created three separate patches.

I have merged the third patch to master:


Thank you.

I have tidied up and pushed the first and second patches to a
wip/awinkelmann branch. I find it quite easy to trigger a warning when
toggling between browser modes (file list or album/artist list). If I
select a file in the file list, then switch mode and then switch back to
the file list, I can trigger the warning:

** (easytag:3333): CRITICAL **: Action_Select_Browser_Style: assertion
'ETCore->ETFileDisplayedList != NULL' failed

I do not have much time to look into the problem at the moment, but
hopefully a simple change will be enough to fix it.

Oh, damn ;-)

I think I have found the reason.

Happens if there is more than one album in the Browser List and you switch to 
Album/Artist List.

GList *ET_Displayed_File_List_By_Etfile (ET_File *ETFile)
    GList *etfilelist;

    for (etfilelist = ET_Displayed_File_List_First (); etfilelist != NULL;
         etfilelist = ET_Displayed_File_List_Next ())
        if (ETFile == (ET_File *)etfilelist->data)
    ETCore->ETFileDisplayedList = etfilelist; // To "save" the position like in 
ET_File_List_Next... (not very good - FIX ME)
    return etfilelist;

If the for-loop does not find the ETFile - given via argument - after the for-
loop etfilelist is NULL but set to ETCore->ETFileDisplayedList and trashes the 
already stored List. This seems to cause the trouble.

At the moment I am not sure why even this value has to be "saved". And the 
Text "(not very good - FIX ME)" looks also strange ;-)

A "if(etfilelist)..." fixes the bug.

But I will try to get a better understanding what happens to get a final 


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