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

issue inside JAR #16

Open
zziz opened this issue Dec 2, 2015 · 2 comments
Open

issue inside JAR #16

zziz opened this issue Dec 2, 2015 · 2 comments

Comments

@zziz
Copy link

zziz commented Dec 2, 2015

There is a error when I try to start server in Android version, inside a project which has been packed into JAR. Error is related to access try to null point. More specifically,
Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid.

The same project works well, if it hasn't been packed into JAR. This issue is not related to assets, required files for OSVR Server, as required files are pushed into app directory manually.

@JeroMiya
Copy link
Contributor

JeroMiya commented Dec 9, 2015

Could you describe what you mean by packing a project into the JAR? The current sample has the plugin and config files in the project's assets directory, which gets built into the application package as installed onto the device. At runtime, it then copies files from the package into the app's private data directory. If you are packaging up the plugins and config files in a different way (a separate JAR file, perhaps?), then you'll need to make sure you copy them into the data folder and set the CWD to that directory, as the sample does.

See https://github.com/OSVR/OSVR-Android-Samples/blob/master/OSVROpenGL/app/src/main/java/com/osvr/android/utils/OSVRFileExtractor.java for the code that copies the files from assets into the data directory.

See also https://github.com/OSVR/OSVR-Android-Samples/blob/master/OSVROpenGL/app/src/main/jni/main.cpp#L245 which sets the CWD to the app's data path, so that the server can find plugins.

@zziz
Copy link
Author

zziz commented Dec 11, 2015

As I explained in email, implemented server-client uses JointClientKit and that functionality is a part of library. Sample applications that has dependency on library (in Android studio), works well, but once library exported as JAR file (library.jar) and applications are implemented using this .jar file gives error. Its a weird issue that I can't figure out.

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

No branches or pull requests

2 participants