giphy-android-sdk icon indicating copy to clipboard operation
giphy-android-sdk copied to clipboard

JNI Crash if project uses CMake version 3.22.1

Open perracodex opened this issue 3 years ago • 3 comments

🐛 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

  • Giphy Android SDK version: 2.1.18, but also tested in 2.1.17
  • Device info (Emulator/Device? Android version? Debug/Release?): Xioami Redmi Note 10 Pro, Android 12 (API 31)

Stacktrace

Stacktrace.txt

perracodex avatar Aug 01 '22 13:08 perracodex

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?

ALexanderLonsky avatar Aug 01 '22 15:08 ALexanderLonsky

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.

perracodex avatar Aug 01 '22 15:08 perracodex

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

ALexanderLonsky avatar Aug 01 '22 16:08 ALexanderLonsky