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

Attach the current thread to the JVM before calling jni routines. #7894

Closed
wants to merge 2 commits into from

Conversation

vauradkar
Copy link

No description provided.

@romainguy
Copy link
Contributor

Any code path using JNI should already be calling getEnvironment(). What issue are you trying to fix here?

The function can be used to setup headless impress instance.
@vauradkar
Copy link
Author

On android, I am using filament along with another Google internal library to build headless view. The view is not a part of android app. This causes a segv during "Setup" that looks something like

JavaBBinder::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+591)
android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+238)
android::os::BpHintManager::getHintSessionPreferredRate(long*)+471)
APerformanceHintManager::create(android::sp<android::os::IHintManager>)+269)
APerformanceHintManager::getInstance()+184)
utils::PerformanceHintManager::PerformanceHintManager()+29)
filament::backend::PlatformEGLAndroid::PlatformEGLAndroid()+60)
filament::backend::PlatformFactory::create(filament::backend::Backend*)+122)
filament::FEngine::loop()+27)

@romainguy
Copy link
Contributor

The proper fix is to have the performance manager get the environment to make sure the thread is properly setup.

@pixelflinger
Copy link
Collaborator

I'm closing this PR because it is replaced with #7896

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

Successfully merging this pull request may close these issues.

3 participants