Empty EUnit iOS project crashes when Runner.RunTests

Create a new “EUnit Test Application (iOS)” project by template in a new solution without any test case, then build and run it on the emulator iOS 8.3. It will crash and print errors in the output window as below:

TestApplication1[881:15799] *** Terminating app due to uncaught exception ‘NullReferenceException’, reason: ‘Null Reference Exception’
(
*** First throw call stack:
0 CoreFoundation 0x0239d746 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x0013ca97 objc_exception_throw + 44
2 CoreFoundation 0x0239d66d +[NSException raise:format:] + 141
3 TestApplication1 0x00002fb0 array_create + 0
)
libc++abi.dylib: terminating with uncaught exception of type NSException
started
6
The program './Debug/iOS Simulator/TestApplication1.app/TestApplication1 ’ has exited with code 9 (0x9).

It seems a severe problem, so I’ve double checked it on both the lateast beta 8.1.84.1789 and official release 8.1.83.1761. Unfortunately they all have the same problem.

I’m wondering if other people can reproduce it. Here’s my project:
ElementTest.zip (123.7 KB)

We’ll check into that, thanx!

Thanks, logged as bugs://72385

Hm, i don’t see this:

Process started.
Test suite (0 tests) started
Test suite (0 tests) finished. State: Succeded.

0 succeeded, 0 failed, 0 skipped, 0 untested
Detached
Process TestApplication1 terminated with exit code 0

I quickly review my project to see if there’s anything special, then I realize the CrossBox emulator selection is possibly the cause again.
I switch between different emulator selection, and see different results:

iPhone Retina 3.5’’ FAILED
iPhone Retina 4’’ FAILED (which produce the probem initially)
iPhone Retina 4’’ 64-bit OK
iPad FAILED
iPad Retina FAILED
iPad Retina 64-bit OK

So it seems the 32-bit/64-bit difference is the key point. I’m not sure about that.

Fortunately I’ve found the 64-bit option for me to work around this problem temporarily, so it’s not so emergent.

Yep, got it. fails on 32bit. Thanx!

I believe the is fixed for the next release, by building EUNit with the latest compiler. Please let me know if the issue persists for you with the Gamma we’ll be publishing later tonight. Thanx!

bugs://72385 got closed with status fixed.

Sorry but the crash persists on 8.1.84.1793 Gamma.
Gamma change log doesn’t show this bugfix is included, should I wait for the next version?

Strange.

The log wouldn’t show hurts, because it was not an explicit fix for this test case, it’s just that when investigating the issue i found that it was fixed when EUnit was built with the latest compiler, due to previous fixes/changes to the compiler. It no longer shows for me — but i’ll retest on Monday JIC.

thanx,
marc

Hmm…This morning I occuasionally try to switch to 32-bit to compile and the problem is gone!
I guess maybe the server (Macbook Pro) need to be rebooted?

That’s even weirder, because i can still reproduce it here, as well. It’s odd, because it fails i use the version of EUnit we shipped in Friday’s beta, but it’s fine as soon as i build EUnit locally. But we did build Friday’s beta with the very latest compiler.

We’ll need to investigate more.

bugs://72385 got reopened.

We got it. actually a rather nasty compiler bug that’s also bitten me in a different project in the past; affects projects but with optimize=true only. We’ll fix for the upcoming release of course.

That’s great! I can reproduce it again today. Look forward to the upcoming release.

1 Like

bugs://72385 got closed with status fixed.