macoscope / CodePilot

Code Pilot is an Xcode plugin which lets you woosh through your code and save a lot (and we mean a *lot*) of your time.
http://codepilot.cc
Apache License 2.0
1.33k stars 205 forks source link

Codepilot leads to xcodebuild corruption #23

Closed csujedihy closed 9 years ago

csujedihy commented 9 years ago

I found my make command does not work and printed

sh: line 1:  609 Abort trap: 6           /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk / -find make 2> /dev/null
git: error: unable to find utility "make", not a developer tool or in PATH

Then, I checked xcodebuild and it printed

2015-03-03 12:36:42.233 xcodebuild[1300:1007] CPCodePilotPlugin.m:23 +[CPCodePilotPlugin load]; CODE PILOT: CURRENT_XCODE_VERSION: 0 CURRENT_XCODE_REVISION: 0
** INTERNAL ERROR: Uncaught exception **
Exception: Error (1000) creating CGSWindow

Finally, I removed CodePilot and then everything is fine.

wangyhzzz commented 9 years ago

+1

mskobe commented 9 years ago

+1, after install codepilot, I cannot install other plugins through Alcatraz. My Xcode version is 6.2 and Alcatraz version is 1.1.1

esttorhe commented 9 years ago

not only that; my homebrew is notnow fucked up; can't run any brew commands…

Ideas as to how to circumvent this? Even removing CodePilot from the Plug-ins folder doesn't fix this…

esttorhe commented 9 years ago

NVM; Alcatraz issue was related to something else

jklausa commented 9 years ago

I'm kinda bored atm so I took a look at it.

The 'correct' solution would be to make sure the plugin is only initialised when running "real" Xcode, not when xcodebuild is called, but I'm not actually sure if that's possible.

If it's not, the crash is caused because in CPCodePilotPlugin.m#L39, the CPCodePilotWindowDelegate is instantiated, which in L31 creates a new window, which obviously crashes.

My guess is that lazy-instantiating the WindowDelgate would make the problem make away, but I'm that bored to actually go ahead and try it.

esttorhe commented 9 years ago

yeah; on #18 I offered to help with the project because it seems kind of "forgotten" and this leads me to believe that the contributors (not complaining about your job here guys) maybe don't have the time to work as much as this project requires.

I'll try to dig into this later today and will try to send a PR with hopefully a solution for this; in the meantime I had to remove CodePilot from my Plug-ins folder and from here:

~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/
JasonCaoHQ commented 9 years ago

@esttorhe nice

imkerberos commented 9 years ago

+1

com314159 commented 9 years ago

+1

raho commented 9 years ago

+1

bubski commented 9 years ago

Hey guys, this problem should no longer appear ( as of #46 ). Let us know if you still have the issue.