gap-dev-discuss
[Top][All Lists]
Advanced

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

Re: [Gap-dev-discuss] Cynthiune: open files


From: Riccardo Mottola
Subject: Re: [Gap-dev-discuss] Cynthiune: open files
Date: Mon, 04 Feb 2013 01:09:42 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15.1

Hi,

Sebastian Reitenbach wrote:
I found one leaked filedescriptor in Bundles/VorbisTags/VorbisTags.m, which
I just fixed, but that did not helped with the main issue :(
no, it is not. I can reproduce the leakage on Mac and there I just build audiofile and MP3 support!
What I noticed is that:
When you add a song, and Cynthiune is playing, then only one FD is leaked,
when it is not playing, then two two seem to be leaked.

I found when I comment out the line:
[self _updatePlayerSong: notifiedFirstSong];

in PlaylistController.m
- (void) _oPanelDidEnd: (NSOpenPanel *) oPanel
             returnCode: (int) result
            contextInfo: (void *) contextInfo

then its always only one leak left. So far, I haven't seen any problem
with that, but may have overlooked something.
Maybe this helps someone to get onto the right track.
During tests I drag-dropped files to the playlist, to have a determinate trace path. I think I have a "relief" if I skip "update player song" line 948 in tableFilenamesDropped. At first I thought it was the solution, but it is not. In any case it appears to be useless... if I add something I do not want to start it or anything.

I tried closing the stream in _updatePlayerSong, line 460, since it is the only unmated open. BUt by doing that, no files are played anymore: evidently the program expects that update leaves the stream open... perhaps a bit dumb and it could be changed, but perhaps not so easily.

Generally it is extremely strange, I put a breakpoint in fopen() but the file descriptor seems to be open very early, not even passin through fopen! ALl files are tested (streamTestOpen), then an MP3 file gets read its info and then "updatePlayerSong" opens the stream a third time.

To help narrowing down the problem I tried to make +[MP3 streamTestOpen] return YES always (and then of coruse test only with MP3 files. It did not really help though, does it for you? It would be absurd.

I can't reproduce the "leak for non-music file" problem I had on my ol' mac.

Riccardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]