Playground 7b2 fail on “stub executable”

When I open a project in Xcode 7.0b2, playgrounds execute intermittently at best. Xcode regularly puts up an alert sheet, containing the same thing as the following from Console.app:


6/24/15 11:09:39.924 AM Xcode[54310]: [MT] IDEPlaygroundDocument: Error encountered running playground: Error Domain=IDEPlaygroundErrorDomain Code=1 "Unable to create target for stub executable. unable to find executable for
'/var/folders/2n/k51s3_gd2177vkrmy04p2s000000gn/T/com.apple.dt.Xcode.pg/\
applications/modeling-54310-7.app/Contents/MacOS/modeling'"
UserInfo=0x7fda4a4a3aa0 {NSLocalizedDescription=Unable to create target for stub executable.
unable to find executable for '/var/folders/2n/k51s3_gd2177vkrmy04p2s000000gn/T/com.apple.dt.Xcode.pg/\
applications/modeling-54310-7.app/Contents/MacOS/modeling'}

(Broken by hand because the forum’s new code editor seems to freak out at long lines.)


Results in the sidebar, if any, gray-out. Editor > Execute Playground may or may not execute, but always results in the alert. Show Rendered/Raw Markup seems to work, but again the alert drops down.


The “modeling” app in the …/applications directory is modeling-54310-8.app, so yes, the path is missing. The directory also contains MyPlayground-45499-4.app. In this case, the playground had two pages, “modeling” and “generation.” Note that generation had no modeling app package, and that page apparently never was evaluated. It did not matter which was displayed. Throwing that playground out and adding a new one, with one page, had no effect.


Creating a new project in 7.0b2 and adding a new one-page playground had no effect. xcode-select of Xcode-Beta.app has no effect. It’s the same in OS X 10.10.3 and 10.11b2. Target 10.11, double-checked that the playgrounds were for OS X, I didn’t touch the initial import Cocoa.


I don’t see anyone else complaining. Any suggestions on how to get it working?

I get a similar error: "Unable to create target for stub executable. unable to find executable for '/var/folders/cc/3342cs752d7bwln6pnd2rrc80000gn/T/com.apple.dt.Xcode.pg/applications/MyPlayground-42173-19.app/MyPlayground'"


But I get the error if I open an existing Playground and if I start a new project and new playground. sometimes it will show the hello playground but most of the time even adding a line break will cause the erro to be shown.

More details:


I restarted the 10.10.3 system. The bug remained. I deleted the playground from the project, quit Xcode, reopened Xcode, and added a playground to it. “Hello playground” executed. I then typed

fnc

which is what the profession calls a “typo.” The console displayed the syntax error, and the alert complaining about the missing target executable returned. It recurred every minute or so for as long as the playground was visible. Correcting the typo and filling out the one-line function did not relieve the issue.


Also, the insertion point would periodically jump to the first character in the editor, and whatever I’d typed in the previous 10 seconds or so disappeared. Maybe that’s another manifestation of the same bug, maybe not.


Sounds like bug-report time, and no live experimentation with Swift 2.0 for another 2 weeks (the probable date for beta 3).

rdar:///21555545, including video, configuration, defaults read com.apple.dt.xcode, sample project, console output, the works.


Don’t tell me I never give you nice things.

Accepted Answer

Solved:


The crash happens when the Project Format (select the project in the navigator, then examine the File inspector) is less than Xcode 6.3-compatible.


I got this by experimentation. Xcode 7 should have warned me, so it’s still a bug. rdar:///21555545 was closed as a duplicate of 21358571.

Even changing the Xcode project format hasn't fixed that for me. Hoping dp3 fixes this. It's a real setback.

I'm still getting this error in beta 4. Frustrating. My playground seemed to work until I checked the "Render Documentation" checkbox. Then it could never recover. I have projects in my workspace along with the playground, but they're 6.3 compatible.


Rob

Thanks!! This helped med 🙂

Same thing here, I'm on Beta 5. It worked before i checked an unchecked that box. Even `git reset--hard` or restarting the system does not help, there has to be something in Xcode that changed. Waiting for Beta 6 and if it's still there I'll file a radar.

Yup, same here on beta 5. I filed a bug with Apple about it. They had "closed as duplicate" the one I filed for beta 2, but on this one they asked for an example project, which suggests to me maybe they thought it was fixed - I don't know.

Playground 7b2 fail on “stub executable”
 
 
Q