New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intermittent fatal error due to currentExampleGroup being nil #506
Comments
Interesting - I was looking suspiciously at that line whilst trying to work out what was going on :). I can't share the full tests unfortunately, but what I've done is extracted the structure of the tests, as I'm guessing it's that which is triggering this. I tried pulling it out into a separate test project but couldn't reproduce the error. After delving in a bit more (printing
|
@earltedly Do you think you would be able to share the backtrace you see at the time that the crash occurs? |
I also get the same problem intermittently, here is my stack trace: In Xcode, these stacktrace frames correspond to: `thread #1: tid = 0x141827, 0x00000001160001a8 libswiftCore.dylib'function signature specialization <Arg[0] = Exploded, Arg[1] = Exploded, Arg[2] = Dead, Arg[3] = Dead> of Swift._fatalErrorMessage (Swift.StaticString, Swift.StaticString, Swift.StaticString, Swift.UInt) -> () + 40, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
|
Ah, I didn't really intend to have GitHub automatically close this when I merged #517. However I do hope that it is fixed now on master! @earltedly @mstritt-ka could you check if you're still seeing this with Quick's master branch? |
While 0.9.2 continues to have the same problem, pulling directly from Github does seem to fix it (I haven't seen the problem since I pulled directly). Thank you, |
@briancroom We are using CocoaPods to pull in 0.9.2 of Quick and are receiving this error in our tests. Is a fix still in the works? |
For those of you still experiencing this crash, could I trouble you to post some additional information? Our test suite doesn't seem to be catching this particular error, so any information you could provide to help us track it down would be great. For example:
|
The test that fails uses Quick, Nimble and sometimes Dobby:
Running on Xcode Version 7.3 (7D175). No I put a breakpoint in each beforeEach() call in each test and on line 58 of World+DSL.swift which is crashing. It would crash in random tests. Each time I ran, a different test class caused the issue. In fact, once, I was able to get through the whole suite of tests without crashing as I slowly clicked through each breakpoint. But then I deactivated the breakpoints and the next run, the test crashed. For the most part, our tests look something like the following. Slight variations. Many use Dobby to mock classes:
|
Note that if I move back to Quick (0.6.0), this error does not occur and tests run even in Xcode 7.3. |
Has there been any progress on this issue since June? |
The most impactful contribution to be made here at the moment is producing a reliable reproduction of the issue. If someone could upload an example project to GitHub that reliably crashes when run, I'm confident we can fix this quickly. |
I've been thinking about this a bit over the past few weeks. I'm going to try to write an example project and try as best I can to reproduce. Would appreciate it if others tried to as well. |
The fix was released in v0.9.3 so trying with v0.9.2 didn't make sense. Closing this old issue due to inactivity ( and should be fixed by #517). |
I'm intermittently getting a
fatal error: unexpectedly found nil while unwrapping an Optional value
in World+DSL.swift:58 whilst running my unit tests. The value which is nil iscurrentExampleGroup
.It's only one one spec, so I'm wondering if I'm doing something wrong there. The fact it's intermittent makes it feel a bit odd though.
I was wondering if anyone has seen this before?
The text was updated successfully, but these errors were encountered: