我如何解决“Xcode无法找到源文件” [英] How can I work around "Xcode could not locate source file"

查看:137
本文介绍了我如何解决“Xcode无法找到源文件”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Xcode中的ID3框架(它已经消失在网络的表面 - 包括google缓存!)。

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

导出mp3功能,允许他们在导入时编辑标签。其中一个测试用例是没有正确的id3标题的损坏或无效的mp3。我遇到的问题是,当更新无效mp3( updateFile:)的标签时,ID3框架尝试使用 id3V1Tag.m (我认为它会回到这,如果它找不到v2标签)这是我得到Xcode错误(运行程序,而不是建立):

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找不到源文件:id3V1Tag.m(line:299)

我尝试过一个try / catch块,但它不是被视为异常,因此不会被捕获。加载文件的标签数据的函数返回一个BOOL,但它似乎只有在给定文件不存在时才返回false,所以这也没有帮助。

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.

当前代码:

[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");
    }
}


推荐答案

错误你得到的是Xcode试图找到您的源文件id3V1Tag.m为了在调试过程中显示它。你写的代码不会影响这个。

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.

如果您的框架发行版中没有id3V1Tag.m源文件,那么您无法做到这一点,而且可以忽略它(其他比看看是否可以避免导致它被请求,如不在其中设置断点,不进入它,而不是崩溃)。

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.

这篇关于我如何解决“Xcode无法找到源文件”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆