How can I work around "Xcode could not locate source file"

Posted by Septih on Stack Overflow See other posts from Stack Overflow or by Septih
Published on 2010-03-12T09:11:41Z Indexed on 2010/03/13 0:47 UTC
Read the original article Hit count: 412

Filed under:
|
|
|

Hello,

I'm working with the ID3 framework in Xcode (which has since disappeared off the face of the web - including google cache!).

I'm testing out an import mp3 feature which allows them to edit the tags as they import them. One of the test cases is a corrupt or invalid mp3 with no proper id3 header. The problem I'm having is that when updating the tags of the invalid mp3 (updateFile:), the ID3 framework attempts to use id3V1Tag.m (I assume it falls back to this if it can't find the v2 tag) and this is where I get the Xcode error (whilst running the program, not building):

Xcode could not locate source file: id3V1Tag.m (line: 299)

Even in a release build this crashes the program, so it's not something I can really ignore.

I've tried putting a try/catch block around it but it's not treated as an exception so doesn't get caught. The function to load the tag data for the file returns a BOOL but it appears this only returns false if the given file doesn't exist, so this doesn't help either.

Current code:

[tagData release];
tagData = [[TagAPI alloc] initWithGenreList:nil];
tagsLoaded = [tagData examineFile:exportPath];
if(tagsLoaded) {
    [tagData setTitle:title];
    [tagData setArtist:artist];
    [tagData setComments:comments];
    @try {
        [tagData updateFile];
    }
    @catch (id e){
        NSLog(@"h");
    }
}

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about objective-c