Question

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");
    }
}
Was it helpful?

Solution

The error you're getting is that Xcode is trying to locate your source file id3V1Tag.m in order to show it during debugging. No code you write will affect this.

If you don't have the id3V1Tag.m source file in your framework distro, there's nothing you can do about this, and there's little to do but ignore it (other than seeing if you can avoid causing it to be requested, like not setting a breakpoint in it, not stepping into it, and not crashing in it).

If you do have it, and are building it, then perhaps you're not building with the right debug information, so you'll have to tell us more about your build setup.

OTHER TIPS

So the problem you're having is that your program is crashing when you attempt to compile id3V1Tag.m or while running the program. I'm a bit confused on that.

If its crashing while running maybe this is an issues with a code file missing from a library? How are you reading the ID3 tag information exactly? Is it through your own code or through a 3rd party library/class.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top