react-native-skia icon indicating copy to clipboard operation
react-native-skia copied to clipboard

Segfault on Android - sk_sp<T>::reset

Open matinzd opened this issue 1 year ago • 5 comments

Description

Link to Sentry stacktrace: https://lendo.sentry.io/share/issue/4a599f0628974be0b209803563b36916/

Segfault - sk_sp<T>::reset

Version

1.2.3

Steps to reproduce

I could not reproduce this but it seems like it's happening on low-end devices.

Snack, code example, screenshot, or link to a repository

Image

matinzd avatar Sep 05 '24 11:09 matinzd

Adding it here just in case upgrading does not solve it.

matinzd avatar Sep 05 '24 11:09 matinzd

@wcandillon Can this be related to https://github.com/Shopify/react-native-skia/pull/2505?

matinzd avatar Sep 05 '24 12:09 matinzd

Documenting just in case someone is getting segfault on Android. Tried adding cancelAnimation on shared values and upgraded to the latest version of RN Skia. Seems the fix is working as of now.

Before: Image

After: Image

matinzd avatar Sep 06 '24 21:09 matinzd

@matinzd my apologies for only following up on this now. Anything there we should do on our side?

wcandillon avatar Oct 02 '24 13:10 wcandillon

It's still happening after updating skia again.

Here is the link to sentry report:

https://lendo.sentry.io/share/issue/c2d3c8bf1a30495a8b841002b2778825/

matinzd avatar Oct 10 '24 12:10 matinzd

@matinzd We've fixed many bugs in our Android integration, can you upgrade to 1.6.0 and let us know how it looks? We have other users that confirmed to us that it cleared all the crashes they had on Android. Let me know.

wcandillon avatar Dec 04 '24 12:12 wcandillon

There is another issue coming up when I released the app with 1.6.0:

https://lendo.sentry.io/share/issue/e7bdfb6e78d1475da59e68d851ef470a/

OS Version: Android 14 (UP1A.231005.007.S926BXXU5AXK4)
Report Version: 104

Exception Type: Unknown (SIGSEGV)

Application Specific Information:
Segfault

Thread 0 Crashed:
0   split_config.arm64_v8a.apk      0x79604df254        gl::Context::makeCurrent
1   split_config.arm64_v8a.apk      0x79605cccc4        RNSkia::OpenGLWindowContext::getSurface
2   split_config.arm64_v8a.apk      0x79604e1d18        RNSkia::RNSkOpenGLCanvasProvider::renderToCanvas
3   split_config.arm64_v8a.apk      0x79605c38c4        RNSkia::RNSkDomRenderer::renderImmediate
4   split_config.arm64_v8a.apk      0x79604d7db8        RNSkia::RNSkAndroidView<T>::surfaceAvailable
5   split_config.arm64_v8a.apk      0x79604d8b9c        facebook::jni::detail::MethodWrapper<T>::dispatch
6   split_config.arm64_v8a.apk      0x79604d8ab4        facebook::jni::detail::FunctionWrapper<T>::call
7   base.odex                       0x7a1469c420        <unknown> + 524328485920

matinzd avatar Dec 10 '24 15:12 matinzd

We also observe SIGSEGV in makeCurrent on both 1.6 and 1.7. Quite consistent on Samsung S22 5G Android 12 with React Native 76 E.: device details

antonandreyev avatar Dec 10 '24 15:12 antonandreyev

@antonandreyev #2801 is a fix for Samsung S22 (any device that is vulkan + angle) however the stack trace feels inconsistent with the actually issue we are fixing there. It would be interesting to see if 1.7.2 fixes the issue.

wcandillon avatar Dec 11 '24 11:12 wcandillon

@matinzd Is this issue still happening?

wcandillon avatar Dec 18 '24 12:12 wcandillon

Not anymore. Let's close it.

matinzd avatar Dec 18 '24 13:12 matinzd