The emulator is meant to be a build environment and not for running code, this is likely the source of the issue, does your code encounter this problem when running on a voxl?