Giphy / giphy-android-sdk

Home of the GIPHY SDK Android example app, along with Android SDK documentation, issue tracking, & release notes.
https://developers.giphy.com/
Mozilla Public License 2.0
94 stars 37 forks source link

JNI Crash if project uses CMake version 3.22.1 #188

Open perracodex opened 2 years ago

perracodex commented 2 years ago

🐛 Bug Report

For projects with NDK code that use the latest CMake version 3.22.1, Giphy's search dialog crashes after a couple of seconds once opened. Giphy's dialog opens and shows empty-colored placeholders, but no actual media is displayed on them, then crashes after a couple seconds.

The stacktrace (see attachment) seems to point to a JNI issue in fresco's library.

No issues with the previous CMake version 3.18.1, reverting to it makes the problem disappear.

Note that the usage of NDK and CMake in the project is completely unrelated to Giphy. The NDK is used exclusively for unrelated specific project features. The crash happens only when using the latest CMake version 3.22.1. Cleaning, rebuilding, etc., doesn't solve the issue. Only reverting to a previous CMake solves it.

Your Environment

Stacktrace

Stacktrace.txt

ALexanderLonsky commented 2 years ago

Hey @perracolabs, thanks for reporting this and comprehensive description of the problem. Though I don't know what I can do about it now; so, I'll keep it open until further notice.

P.S. I see that the latest CMake version is 3.23.3, is it possible to try that version?

perracodex commented 2 years ago

The newest CMake version that Android Studio gives me is 3.22.1. I update it via the SDK Manager \ SDK tools tab. 3.23.3 doesn't appear in my list of supported versions. I'm using Android Studio Chipmunk 2021.2.1 Patch 1.

Maybe the only solution is to make Facebook aware of the issue with Fresco. I assume Giphy already uses the latest Fresco version.

ALexanderLonsky commented 2 years ago

I see. Yes, we are using the latest version: 2.6.0.