-
Notifications
You must be signed in to change notification settings - Fork 515
[Android] gl::Context::makeCurrent Segfault error #3156
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
Comments
yes please provide me with more information if possible. Is it possible/easy to reproduce? if it always/often happens on these specified devices, I could use BrowserStack to debug the issue. |
It is happening only on these 2 devices, by the logs I can see that this occurs on our dashboard tab route, we render there a bar charts with energy usage values, energy prices etc. for each hour at current day. After 2:00 PM we render also values for next day - client says that app crashes only after in the afternoon (and I confirm that by Sentry events too) - so that's probably somehow connected. There's no much difference between chart for only current day and current day & tomorrow, there's only more values to display(48 bars instead or 24). Here's the raw stack trace, it is always the same, only differences between each trace are memory addresses.
Also here's how we render our BarChart component: <>
<YAxis
chartHeight={
chartRef.current?.chartHeight ?? chartHeight + TOP_PADDING_DOMAIN
}
gridlinesData={gridlinesData}
unit={unit}
font={font}
/>
<ScrollView
ref={scrollViewRef}
horizontal
style={{ width: Dimensions.get('window').width }}
contentContainerStyle={{
height: chartHeight,
width: newChartWidth,
}}
showsHorizontalScrollIndicator={false}
onLayout={() => handleScroll(tooltipIndex ?? highlightIndex)}
bounces={false}
scrollEventThrottle={16}
>
<Pressable onPress={handleTouchStart} style={styles.pressContainer}>
<BarToolTip
sharedX={tooltipConfig.sharedX}
sharedY={tooltipConfig.sharedY}
tooltipText={tooltipConfig.description}
activeItem={tooltipConfig.activeItem}
negative={
tooltipConfig.indexValue <= 0 ? chartRef.current?.yScale(0) : null
}
defaultTooltip={defaultTooltip}
offset={labelOffset}
/>
<CartesianChart
data={data}
xKey='time'
yKeys={['value', 'xPos', 'referenceValue']}
padding={5}
domainPadding={{
left: CHART_PADDING_HORIZONTAL * (renderYAxis ? 2 : 4),
right: labelWidth,
bottom: 0,
top: renderYAxis ? 0 : TOP_PADDING_DOMAIN,
}}
domain={{
y: [
gridlines[0],
gridlines[gridlines.length - 1] * Y_SCALE_FACTOR,
],
}}
xAxis={{
font,
tickCount: data.length - 1,
lineWidth: 0,
labelPosition: 'outset',
labelColor: chartXAxisColor,
labelOffset: 6,
formatXLabel: (label) => (label ? label : ''),
}}
yAxis={[
{
yKeys: ['value', 'referenceValue', 'xPos'],
font,
tickValues: gridlines,
tickCount: gridlines.length,
axisSide: 'right',
labelPosition: 'outset',
labelColor: chartYAxisColor,
},
]}
chartPressState={state}
onChartBoundsChange={chartPropsHandle}
actionsRef={chartActionsRef}
customGestures={composed}
chartPressConfig={{
pan: { activateAfterLongPress: ACTIVATE_AFTER_LONG_PRESS },
}}
>
{({ points, chartBounds, yScale, xScale }) => {
chartRef.current = {
chartHeight: chartBounds.bottom - chartBounds.top,
yScale,
xScale,
}
return points.value.map((point, index) => {
const referenceValue = roundToDecimalPlaces(
points.referenceValue[index]?.yValue ?? 0,
2
)
const value = roundToDecimalPlaces(
points.value[index]?.yValue ?? 0,
2
)
const showDottedBar =
isBalance && referenceValue !== 0 && referenceValue !== value
return (
<React.Fragment key={index}>
{((activeItemTooltip?.index !== null &&
activeItemTooltip?.index === index) ||
index === highlightIndex) && (
<>
{/* highlight bar */}
{showHighlight && index === highlightIndex && (
<>
<Rect
x={point.x - getPxSize(17)}
y={yScale(gridlines[gridlines.length - 1])}
height={chartBounds.bottom - chartBounds.top}
width={getPxSize(34)}
key={'h' + index.toString()}
color={
isHighlightGreen ? barCheapHighlight : barColor
}
/>
</>
)}
</>
)}
{showDottedBar && (
<DottedBar
barWidth={17}
barHeight={
yScale(0) - Number(points.referenceValue[index].y)
}
xPoint={point.x - 8.5}
yPoint={Number(points.referenceValue[index].y)}
color={dottedBarColor}
/>
)}
{/* default bar */}
<Bar
chartBounds={chartBounds} // 👈 chartBounds is needed to know how to draw the bars
points={[point]} // 👈 points is an object with a property for each yKey
roundedCorners={{
topLeft: cornerRadius,
topRight: cornerRadius,
}}
barWidth={16}
color={getBarColor(index)}
/>
</React.Fragment>
)
})
}}
</CartesianChart>
</Pressable>
</ScrollView>
</> |
Description
Hello, two of our clients are encountering an issue, sometimes application just crash. This seems to be happening only on low end devices with Android 10 only. In our case:
React Native Skia Version
1.12.4
React Native Version
0.76.7
Using New Architecture
Steps to Reproduce
We're using Skia for many things but most-likely users are having a crash when app renders charts with
victory-native
(version^41.16.1
) on initial route. I can see by the logs that, most likely app crashes right after opening. Let me know if I can provide somehow more informations that might help resolving this issue.Snack, Code Example, Screenshot, or Link to Repository
The text was updated successfully, but these errors were encountered: