Skip to content
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

loadValue(std::string&) Android #234

Closed
ClemensHa opened this issue Sep 23, 2015 · 2 comments
Closed

loadValue(std::string&) Android #234

ClemensHa opened this issue Sep 23, 2015 · 2 comments
Labels

Comments

@ClemensHa
Copy link

I have an issue with the json functionalities of Cereal.
I compiled openMVG (https://github.com/openMVG/openMVG) for Android and cereal is a dependency of it. I included "android.h" in the openMVG files, whenever cereal.hpp is used. I had to do this, because otherwise I wouldn''t be able to compile openMVG for Android due to C++11 issues.

Now I use the openMVG library in an Android app. The app crashes when the function cereal::JSONInputArchive::loadValue(std::string&) https://github.com/USCiLab/cereal/blob/master/include/cereal/archives/json.hpp#L614 is called. I get a segmentation fault error.

Can you help me with that?

https://gist.github.com/ClemensHa/f760b68d0a8807079e0d
Attached to gist: android.h, the raw logcat messages in the attached file log.txt and the analyzed (ndk-stack.exe) logcat messages in log_ndk_stack.txt.

@ClemensHa
Copy link
Author

The problem is this line: https://github.com/USCiLab/cereal/blob/master/include/cereal/archives/json.hpp#L614
First it loads "sfm_data_version" and gets "0.1", but when it tries to load("val = itsIteratorStack.back().value().GetString()) "root path", the program crashes. Do you know why?
I added my "sfm_data.json" file in https://gist.github.com/ClemensHa/f760b68d0a8807079e0d.

@AzothAmmo
Copy link
Contributor

We don't officially support Android but there has been some good discussion on the mailing list about resolving various issues with it, I suggest you take a look there or ask your question there as well. Usually most of the issues seem to revolve around a C++11 incompatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants