Fixed segfault by moving constants from heap to stack in DLL, not sure why that is better yet.