Quick crashes after upgrading XCode 10.2

Created on 10 Apr 2019  路  7Comments  路  Source: Quick/Quick

  • [X] I have read CONTRIBUTING and have done my best to follow them.

What did you do?

I have updated to latest version of XCode 10.2
When i switch back to previous version of XCode it just works.

What did you expect to happen?

Tests still executing

What actually happened instead?

UITests thrown an exception when running them.

Screenshot 2019-04-10 at 08 37 46

Screenshot 2019-04-10 at 08 37 57

Environment

List the software versions you're using:

  • Quick: 2.0.0
  • Nimble: 8.0.1
  • Xcode Version: 10.2 (10E125) (Open Xcode; In menubar: Xcode > About Xcode)
  • Swift Version: XCode Default (Open Xcode Preferences; Components > Toolchains. If none, use Xcode Default.)

Please also mention which package manager you used and its version. Delete the
other package managers in this list:

  • Cocoapods: 1.5.3 (Use pod --version in Terminal)
bug

All 7 comments

I have been able to replicate the issue in a small project: https://github.com/gzafra/QuickCrashTest

It does happen when subclassing QuickSpec and, weirdly enough, only if using some specific types (in this case a Date within a struct)...

Using a class instead of a struct gets rid of the issue. Also does commenting out the Date.

On a side note logs show: SingletonMetadataCache(0x6000019982a0): cyclic metadata dependency detected, aborting

I also faced with this issue. Any thoughts why it might happen only on Xcode 10.2 (rather iOS SDK 12.2)?

Faced same problem on Xcode 10.2

Checked on Xcode 10.2.1 - same problem here

Temporary solution. Like @gzafra said: "It does happen when subclassing QuickSpec". In my case it happened, when declaring Date types outside of override func spec().

For example:

class SomeSpec: BaseSpec {
    let date = Date()

    override func spec() {
      ...
    }
}

Changed into:

class SomeSpec: BaseSpec {
    override func spec() {
        let date = Date()
        ...
    }
}

The bug appeared, when date was declared outside of func spec().

Crash confirmed. Thanks for the sample project @gzafra! This is certainly a weird case, but I'll look into it.

I submitted a fix for this: https://github.com/Quick/Quick/pull/873

Was this page helpful?
0 / 5 - 0 ratings