>>double *ptr;
>>spe_in_mbox_ write(thread_args.spe_context,(uint32_t*)&ptr,SPE_MBOX...)
What you are sending is a pointer to an uninitialized pointer. If the function attempts to write to it that may result in bus error because there was no memory allocated to it.
Maybe what it wants is this: Not that it is NOT a pointer to pointer.
double ptr = 0; // <<<<< change this line
spe_in_mbox_ write(thread_args[i].spe_context,(uint32_t*)&ptr,SPE_MBOX...)