Erratic behaviour when raising exception from foreign code

3 posts were split to a new topic: A safer C API