Closed balarayen closed 4 years ago
We've made a number of improvements related to JNI since 1.4.5. Here are all the commits with JNI related changes: https://github.com/search?l=&o=desc&q=jni+repo%3Agoogle%2Ffilament+committer-date%3A%3E2020-01-27&s=committer-date&type=Commits
Your particular issue is probably related to the fact that previous versions of the JNI bindings used multiple copies of Filament if you used gltfio
and filament
like Sceneform does. This would lead to issues with static intializers like sVirtualMachine
. The fix is here: https://github.com/google/filament/commit/d84d095c97905f9017bbec2d0e0cd96f78485045
Since it's the first commit after we branched 1.4.5 you should be able to compile from that commit directly.
Thanks @romainguy . It works after cherry picking few commits. I could play a video on a 3D object now. It works only with debug error but with release aar, getting the following error:
2020-05-25 20:47:42.170 26852-26852/com.example.ar A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xb0 in tid 26852 (com.example.ar), pid 26852 (com.example.ar)
It crashes when calling nLoadResources
in ResourceLoader
public ResourceLoader loadResources(@NonNull FilamentAsset asset) {
nLoadResources(this.mNativeObject, asset.getNativeObject());
return this;
}
Any pointers will help.
Cherrypicking #2332 helped fixing this issue as well. Thanks a lot @romainguy for all your quick responses.
Thanks @romainguy . It works after cherry picking few commits. I could play a video on a 3D object now. It works only with debug error but with release aar, getting the following error:
2020-05-25 20:47:42.170 26852-26852/com.example.ar A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xb0 in tid 26852 (com.example.ar), pid 26852 (com.example.ar)
It crashes when calling
nLoadResources
in ResourceLoaderpublic ResourceLoader loadResources(@NonNull FilamentAsset asset) { nLoadResources(this.mNativeObject, asset.getNativeObject()); return this; }
Any pointers will help.
Using sceneform sdk v1.16.0(uses filament-android 1.4.5) while trying to play a video on an object, streamsource creation crashes with the following error:
Looks like ::filament::VirtualMachineEnv::JNI_OnLoad(vm) is not getting invoked(but the same error is not happening when building Stream.Builder().stream(textureId) ).
Steps to reproduce the behavior: This error happens only when creating a streamsource from sceneformsdk below
Expected behavior It should not crash.
Smartphone:
Additional context But the crash is not happening when creating a CameraStream in sceneform sdk with the following stream creation:
Unfortunately I couldn't upgrade the filament version in sceneform sdk due to matc incompatibility. If there are any know bug fixes available which I can cherry pick is also great.