Refactoring Problem XCode 4.0.1

不想你离开。 提交于 2019-12-12 13:37:41

问题


So i was trying to refactor the name of a class in XCode following the steps in my text book. I'm sure I'm doing everything right and I downloaded XCode off the App Store. Basically, whenever I right-click -> refactor -> name -> preview, xcode crashes. Here's the error:

ASSERTION FAILURE in /SourceCache/DVTFoundation/DVTFoundation-227/Framework/Classes/Utilities/DVTTask.m:208

Details: The launch path must be set before launching.

Object:

Method: -launchRunningTerminationHandlerOnQueue:error:terminationHandler:

Thread: {name = (null), num = 15}

Hints: None

Any Ideas?

Thanks

P.S., sorry, i dont know how to using the quotes

EDIT: Fixed. I reinstalled with the package in side resources under "Show Package Contents" -> Resources -> XCODE and IOS SDK


回答1:


If Xcode itself crashes, that's a bug in Xcode and you should report it. Using the Refactor command to rename a class definitely works at least some of the time -- I just tried it twice with Xcode 4.0.1 and the preview comes up with no problem.

I'd suggest creating a new project and trying the Refactor command there. If it works and doesn't crash, then your existing project may have something to do with the problem. If it doesn't work, that might suggest that the problem is related to your Xcode installation or machine configuration. This is just an attempt to help you find a way to work around the issue, though... Again, if Xcode is crashing, then there's a problem in Xcode.




回答2:


Workaround:
Quit and restart Xcode before every attempt to use 'Refactor'.

For me on Lion running Xcode 4.4.1, a Refactor causes a crash every time if I've been doing any work. Even the simplest 'Rename' operation results in a crash.

If I restart Xcode, and make my first operation a 'Refactor', it works every time.

Further tip: It's a good time to make a backup, while quit before running a Refactor.



来源:https://stackoverflow.com/questions/5527484/refactoring-problem-xcode-4-0-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!