1

I just updated to El Capitan. Now I get an EXC_BAD_ACCESS error instantly when declaring a variable in a Playground. Any clues?

I have restarted the computer and tried again. No help. Are there any old log files or some other crap that can be purged to solve this?

Vanilla Playground with a string declaration (same happens if the double is declared first) which fails with an EXC_BAD_ACCESS error

Edit: Adding import Foundation

Using Import Foundation

jollyCocoa
  • 691
  • 7
  • 20
  • comment `import UIKit` and changed = `import Foundation` and please let me know your result. – Long Pham Oct 02 '15 at 08:09
  • Ok, still an error. See original post. Added the error log for Foundation. – jollyCocoa Oct 02 '15 at 08:14
  • This code is correct. Quit `Xcode` and Try to clear in folder `.../Library/Developer/Xcode/DerivedData ` – Long Pham Oct 02 '15 at 08:21
  • Please forgive if this is a noobish question. But what should be cleared in '.../Library/Developer/Xcode/DerivedData'? There is no folder for the playground. Only project folders for the apps I'm working on. – jollyCocoa Oct 02 '15 at 08:27
  • I get some research for your issue. Someone has same problem. http://stackoverflow.com/questions/31799715/xcode-7-playground-execution-exc-bad-access . Can you try install latest Xcode. – Long Pham Oct 02 '15 at 08:34
  • Thank you very much! Deleting all copies of XCode, deleting the Developer folder worked. However, after reinstalling XCode I got the Error related to no device found (http://stackoverflow.com/questions/27939210/error-running-playground-unable-to-find-suitable-target-device-ios-swift). Following the instructions in the link above (deleting all simulator devices, adding a new and restarting the computer) fixed the last issue. Post an answer and I'll give you credit for it. – jollyCocoa Oct 02 '15 at 09:17
  • Thanks. Happy to solved your problem together. You can update your question with right solution. Cheer! – Long Pham Oct 02 '15 at 09:21

1 Answers1

1

Credit to @longpham. Deleting all versions of XCode and deleting /Library/Developer folder and reinstalling XCode solved the problem. See comments on original question regarding error related to missing devices.

jollyCocoa
  • 691
  • 7
  • 20