A unit test that runs normally without problems, crashed now with error EXC_BAD_ACCESS (code=EXC_I386_GPFLT). Here is the relevant stack trace:
Obviously an element of an array could not be encoded, maybe because access of a dictionary using its hash value failed. Since this happened in an SQLQueue thread, I suspect that another thread did modify the dictionary during encoding.
The question is how to catch such a problem?
EDIT: I cannot enable the Thread Sanitizer in the scheme, since I have a Watch Extension, and this prevents it.