realm-swift: Error with RealmSwift on Xcode 7.3

Goals

What do you want to achieve? Run Realm on Xcode with an BAD Access on this line:

malloc_ptr classes(objc_copyClassList(&numClasses), &free);

This line is 228 on RLMSchema.mm.

Expected Results

What did you expected to happen? Run Realm on 7.3 xCode.

Actual Results

What did happened instead?
e.g. the stack trace of a crash Not works more my app, I am receiving this crash error: Thread 1: EXC_BAD_ACCESS

Steps to Reproduce

What are steps we can follow to reproduce this issue?

I just try to run my same project on Xcode 7.3.

Code Sample

Provide a code sample or test case that highlights the issue. If relevant, include your model definitions. For larger code samples, links to external gists/repositories are preferred. Alternatively share confidentially via mail to help@realm.io. Full Xcode projects that we can compile ourselves are ideal!

Version of Realm and Tooling

In the CONTRIBUTING guidelines, you will find a script, which will help determining these versions.

Realm version: 0.98.5

Xcode version: 7.3

iOS/OSX version: 10.11.4

Dependency manager + version: ?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 23 (8 by maintainers)

Most upvoted comments

Thanks 👍 It’s worked…

Thanks for sending that over, @RafaelPlantard.

This is a Swift compiler bug. Caesar Wirth has written up a blog post about the issue, including a workaround you can apply in your application. He also links to the Swift compiler bug report that is being used to track the compiler fix.

@pavlem I also had to return to XCode 7.2.1, but I have managed to be able to build onto my iOS 9.3 device. Go into the contents folder of your XCode7.3(in Finder/Applications/XCode)/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport and copy the folder called “9.3 (13E230)” into the corresponding location of your XCode 7.2.1 installation, and that should make you able to use your device for testing.

Realm Guys! Are you working on this problem? This is a serious issue (considering that XC7.3 with Swift 2.2 compiler has been available for quite some time…). Also I would really appreciate, if you guys could notify us the next time, when updating to the next Swift/XCode version breaks the compilation of our Realm projects.

PS.: Using newest Realm-Swift as prebuilt dynamic framework.

There was another ticket about this. They closed it after explaining that Apple does not guarantee binary compatibility. But they did not make a release.