-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash on GearVR with Unity #10
Comments
Some additional info - this bug seems to be a known bug with JsonCPP on Android, probably due to some incompatibility with the Android NDK's C++ library implementation. Here is a mention of this crash in Json::Reader destructor Basically the reporter suggests to use char * instead of std::string and/or use a single global instance of the Json::Reader() so that it is never destructed, thus avoiding the bug. Here is a similar report where it was happening on PC, but with an old GCC version: There is also this report of another crash problem from 2013 that was only fixed this year and it also mentions some sort of issue with the free() implementation on Android in the comment: Updating JSON to the latest version 1.6.2 vs. 1.2.1 doesn't fix the original crash, but it is probably a good idea anyway because of the fix from March this year. |
OK, we have managed to get rid of this crash by:
I have tested the code with both GCC 4.9 and Clang 3.5 and it works with either, so I suspect it was a corner case caused by the gnustl_static linking. |
Hello, I guess we could close this issue, couldn't we? Best, |
@araujobsd I am not against, but please verify jsoncpp was updated since this. I know it has been in the mainstream OSVR, but not sure the fixes were merged to the Android repo as well. I am not working on Android right now. |
OK, I will double check it. Thanks for the prompt reply janoc :) |
Welcome. |
I am getting this crash with Unity. The same code works OK when called from a Java app via JNI. Memory management problem? The same code works OK on PC/Windows.
This was tested against an external server with Razer Hydra (default empty config file) running on a PC, with both the localhost rewriting and the yet unmerged remote server API patches.
The text was updated successfully, but these errors were encountered: