SRGSSR / srgmediaplayer-apple

An advanced media player library, simple and reliable
MIT License
158 stars 33 forks source link

EXC_BAD_INSTRUCTION when running tests with Xcode 8.3 #22

Closed defagos closed 6 years ago

defagos commented 7 years ago

When running tests with Xcode 8.3, seek tests consistently crash with an EXC_BAD_INSTRUCTION. This is probably an XCTest framework regression. Create a radar.

No issues were encountered with previous Xcode versions. Tests all successfully pass on Xcode 8.2.1.

defagos commented 7 years ago

I just submitted bug report 32670300 to Apple.

Having a careful look at Xcode 8.3 release notes, it is obvious that XCTest implementation changes have led to this new issue: https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW160.

defagos commented 6 years ago

I implemented alternative notification expectations which do not suffer from the same issues, see commit 725a747b6019d6dd4cd80ae8ab3ec2445e4392ce.

defagos commented 6 years ago

I could finally understand the regression introduced in Xcode 8.3. Notification test expectation handlers may be called again, even if the expectation has been already fulfilled. This can lead to failing tests at best (Xcode 9.3 beta 1) or crashes (EXC_BAD_INSTRUCTION, from Xcode 8.3 to Xcode 9.2).

I submitted a new bug report 36902658. I think Apple engineers should now have everything to nail the issue down.