Forum » Last.fm Player Support

Fading without Segfaults

 
    • [Deleted user] said...
    • User
    • 27 Aug 2005, 09:22

    Some comments for the devs

    First of all, this should fix imagefader segmentation faults:
    http://uberbrain.info/last.fm.diff

    I guess not everybody's having them, else there would be lots of complaining, but under ArchLinux, the imagefade would cause a segfault everytime. This fixes it. Its also quite a bit cleaner if you ask me, a lot more obvious what's going on exactly.

    Second;
    You need to call m_transport->close() after m_transport->get(), otherwise coverimage downloads will fail unless the previous image was downloaded from the same host. I didn't bother with a patch this time, because its only one additional line.

    Additionally, I noticed that you emit CoverLoader::requestFinished() after recieving a done() signal. The done signal is emitted when all tasks scheduled for the HTTP object are done. Theoretically, setHost() can be added and completed before get() is scheduled, causing the done() signal to be emitted, and calling the coverLoaded() function before it actually is. In practice, this hasn't happened to me once, but it's still something to think about. It's a very easy fix. You just need to add one member variable that tracks the taskID of the setHost() call and check for it inside slotRequestFinished().

    Enjoy.

    Edited by a deleted user on 28 Aug 2005, 01:00
    • [Deleted user] said...
    • User
    • 28 Aug 2005, 16:28
    Some sort of acknowledgement of my work would be quite nice.

  • Hmm, very interesting. Do you mind if I incorperate this into the Gentoo ebuild?
    I'll be sure to give credit!

    If it's not on fire, it's a software problem.
    • Russ said...
    • Alumni
    • 8 Sep 2005, 22:30
    I've added this patch to subversion so hopefully it'll be in the next version of the player. Please be aware that we're really busy (plus, lots of people are on holiday at the moment), and so sometimes these things slip through the gaps. Maybe you're better off e-mailing patches in to chris at last dot fm.

    • devas said...
    • User
    • 22 Sep 2005, 18:58

    same problem...

    for Linux 2.6.10/Debian sarge
    devas

    "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
    -- Charles Babbage (1791-1871)
    • Russ said...
    • Alumni
    • 22 Sep 2005, 23:33
    See above.

Anonymous users may not post messages. Please log in or create an account to post in the forums.