'React Native IllegalViewOperationException: StackOverflowException Android
CONFIGURATION
I have this setup:
RootNavigation
import React from "react";
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import EventScreen from "../screens/EventScreen";
import BottomTab from "./BottomTab";
const Stack = createNativeStackNavigator();
export default function RootNavigator() {
return (
<Stack.Navigator
initialRouteName="BottomTab"
screenOptions={{
headerShown: false
}}
>
<Stack.Screen name="Event" >
{(props) => <EventScreen {...props} />}
</Stack.Screen>
<Stack.Screen name="BottomTab" >
{(props) => <BottomTab {...props} />}
</Stack.Screen>
</Stack.Navigator>
)
}
BottomTab
export const BottomTabContext = createContext();
export default function BottomTab({ navigation }) {
const rootNavigation = navigation;
return (
<BottomTabContext.Provider value={{ rootNavigation }}>
<Tab.Navigator >
<Tab.Screen
name="HomeNavigator"
options={{
tabBarIcon: ({ focused }) => {
if (focused)
return (
<View
style={{
backgroundColor: Colors.primary,
borderRadius: 20,
width: "80%",
height: "60%",
alignItems: "center",
justifyContent: "center",
}}
>
<Ant name="home" color={"white"} size={28} />
</View>
);
return <Ant name="home" color={Colors.primary} size={28} />;
},
}}
>
{(props) => <HomeScreen {...props} />}
</Tab.Screen>
....Other screens...
</Tab.Navigator>
</BottomTabContext.Provider>
);
EVENT SCREEN
import React, { useContext } from "react";
import { SafeAreaView, View, Text, TouchableOpacity, Dimensions, Image, ScrollView, ImageBackground, StyleSheet, Linking } from "react-native"
import "@react-native-firebase/functions"
import QRCode from '../components/QrCode';
import { WebView } from 'react-native-webview';
import LinearGradient from "react-native-linear-gradient";
import { AuthContext } from "../App";
import Ant from "react-native-vector-icons/AntDesign";
import Fea from "react-native-vector-icons/Feather";
import Awe from "react-native-vector-icons/FontAwesome";
import GradientText from "../components/GradientText";
import CustomModal from '../components/CustomModal';
import Colors from "../utils/Colors";
import truncate from "../utils/Utils";
const { width, height } = Dimensions.get("screen");
import { addSavedEvents, removeSavedEvents, getSavedEvents, buyTicket, getEventSubscriptions } from "../api/api";
export default App = (props) => {
const [isAlreadySold, setSold] = React.useState(false);
const [isSaved, setIsSaved] = React.useState(false);
const [qrValue, setQrValue] = React.useState("0");
const [modalVisible, setModalVisible] = React.useState(false);
const [buySource, setBuySource] = React.useState("");
const [loading, setLoading] = React.useState(true);
const navigation = props.navigation;
const event = props.route.params.event;
const { token, user } = useContext(AuthContext);
React.useEffect(() => {
const unsubscribe = async () => {
getSavedEvents(token).then(response => {
if (response.data.success == "1") {
response.data.message.saved_events.forEach(savedEvent => {
if (savedEvent.event_id == event.event_id) setIsSaved(true);
});
}
else setIsSaved(false)
})
getEventSubscriptions(token, event.event_id).then(response => {
if (response.data.success == "1") {
let subscription = response.data.message.subscribed.subscription.slice().reverse()
subscription.forEach(sub => {
if (sub.sub_user == user.id && sub.sub_event == event.event_id && !isAlreadySold) {
setSold(true);
setQrValue(sub.sub_keypass + "&" + event.event_id)
}
})
}
setLoading(false);
})
};
unsubscribe();
}, []);
const toogleSaved = async () => {
if (!isSaved) {
addSavedEvents(token, event.event_id).then(() => {
setIsSaved(true);
})
//functions.httpsCallable("addSavedEvent")({"eventId": eventId, "userId": auth().currentUser.uid});
}
else {
removeSavedEvents(token, event.event_id).then(() => {
setIsSaved(false);
})
//functions.httpsCallable("deleteSavedEvent")({"eventId": eventId, "userId": auth().currentUser.uid});
}
}
const buy = async () => {
buyTicket(token, event.event_id).then((response) => {
if (response.data.success == "1") {
//Linking.openURL(response.data.message.payment_link);
if (response.data.message.need_payment == 1) {
setBuySource(response.data.message.payment_link);
setModalVisible(true)
}
else {
getEventSubscriptions(token, event.event_id).then(response => {
if (response.data.success == "1") {
let subscription = response.data.message.subscribed.subscription.slice().reverse()
subscription.forEach(sub => {
if (sub.sub_user == user.id && sub.sub_event == event.event_id && !isAlreadySold) {
setSold(true);
setQrValue(sub.sub_keypass + "&" + event.event_id)
}
})
}
})
}
}
})
}
if (loading) return (<View></View>)
return (
<SafeAreaView style={{ backgroundColor: "white", flex: 1, alignItems: "center" }}>
<View style={{
width: width,
paddingLeft: 15
}}
>
<TouchableOpacity onPress={() => { if (navigation.canGoBack()) { navigation.goBack() } }}>
<Ant name="arrowleft" size={27} color={Colors.primary} />
</TouchableOpacity>
</View>
{isAlreadySold &&
<View style={styles.qrContainer}>
<QRCode
value={qrValue}
size={150}
enableLinearGradient
linearGradient={[Colors.primary, "black"]}
/>
</View>
}
<ScrollView
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}
style={{
width: "100%",
height: "100%",
}}
contentContainerStyle={{
alignItems: "center",
height: "100%"
}}
automaticallyAdjustContentInsets
>
<View
style={{
borderRadius: 20,
width: width * 0.7,
height: width * 0.7,
}}
>
<ImageBackground source={{ uri: event.event_cover_src }} style={{ width: "100%", height: "100%", overflow: "hidden", borderRadius: 20 }} resizeMode="stretch" >
<View style={{ flexDirection: "column-reverse", flex: 1, alignItems: "flex-end" }}>
<LinearGradient
colors={["rgba(255, 255, 255, 0.1)", "#7ca8ff", Colors.primary]}
start={{ x: 0, y: 0 }}
end={{ x: 0, y: 1 }}
style={{ width: "100%", height: "30%" }}
>
<View style={{ flexDirection: "row", justifyContent: "space-between", alignItems: "flex-end", width: "100%", height: "100%", padding: 15 }}>
<Text style={{ color: "white", fontFamily: "college", fontWeight: "bold", fontSize: (100) / (Math.sqrt(event.event_name.length)) }}>{truncate(event.event_name)}</Text>
<TouchableOpacity onPress={() => toogleSaved(1)}>
<Awe name={isSaved ? "bookmark" : "bookmark-o"} size={25} color="white" />
</TouchableOpacity>
</View>
</LinearGradient>
</View>
</ImageBackground>
</View>
<View>
<View style={{ flexDirection: "row", width: width, alignItems: "center", justifyContent: "flex-start", paddingLeft: 20, marginTop: 5, padding: 2 }}>
<Fea name="map-pin" size={22} color={Colors.primary} />
<Text style={{ marginLeft: 10 }}>{event.event_address}</Text>
</View>
<View style={{ flexDirection: "row", width: width, alignItems: "center", justifyContent: "flex-start", paddingLeft: 20, marginTop: 5, padding: 2 }}>
<Ant name="calendar" size={22} color={Colors.primary} />
<Text style={{ marginLeft: 10 }}>{event.event_date}</Text>
</View>
<View style={{ flexDirection: "row", width: width, alignItems: "center", justifyContent: "flex-start", paddingLeft: 20, marginTop: 5, padding: 2 }}>
<Ant name="infocirlceo" size={22} color={Colors.primary} />
<Text style={{ marginLeft: 10 }}>Solo {event.event_price}€ {event.need_payment == "0" ? "Pagamento il loco" : ""}</Text>
</View>
</View>
<View style={{ width, padding: 5, paddingLeft: 15, paddingTop: 20 }}>
<GradientText style={{ fontWeight: "bold", fontSize: 21, marginBottom: 5, fontFamily: "college" }}>INFORMAZIONI</GradientText>
<Text style={{ fontSize: 17 }}>{event.event_description}</Text>
</View>
</ScrollView>
{!isAlreadySold &&
<View
style={styles.bookContainer}>
<TouchableOpacity style={{ backgroundColor: "white", borderRadius: 15, padding: 10 }} onPress={buy}>
<Text style={{ color: Colors.primary, fontWeight: "600", fontSize: 25, fontFamily: "college" }}>PRENOTA</Text>
</TouchableOpacity>
</View>
}
<CustomModal
isVisible={modalVisible}
message=""
>
<View style={{ flexDirection: "row", justifyContent: "flex-end", width: "100%" }}>
<TouchableOpacity style={{ backgroundColor: "white", borderRadius: 20, padding: 5, width: 40, height: 40, justifyContent: "center", alignItems: "center" }} onPress={() => setModalVisible(false)}>
<Text style={{ color: Colors.primary, fontWeight: "900", fontSize: 22 }}>X</Text>
</TouchableOpacity>
</View>
{buySource.length > 1 && <WebView
source={{ uri: buySource }}
style={{
marginTop: 20,
maxHeight: height,
width: 320,
flex: 1
}}
/>}
</CustomModal>
</SafeAreaView>
);
}
Expected Behaviour When I go back from Event Screen I end up to Home Screen
Problem On IOS there's no problems, it works fine.
On Android when I go Back it crashes. The error is:
com.facebook.react.uimanager.IllegalViewOperationException: StackOverflowException
Debug Logs
I/m.unifraternit: Background concurrent copying GC freed 61530(2508KB) AllocSpace objects, 1(20KB) LOS objects, 49% free, 5972KB/11MB, paused 627us total 149.136ms
V/FA: Inactivity, disconnecting from the service
I/m.unifraternit: NativeAlloc concurrent copying GC freed 36271(1282KB) AllocSpace objects, 4(80KB) LOS objects, 49% free, 6327KB/12MB, paused 1.667ms total 125.046ms
E/unknown:ReactNative: Unable to handle Exception - catalystInstanceVariableExists: true - isCatalystInstanceAlive: false - hasExceptionHandler: false
com.facebook.react.uimanager.IllegalViewOperationException: StackOverflowException
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:754)
at android.view.View.updateDisplayListIfDirty(View.java:21217)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4301)
at android.view.View.draw(View.java:22353)
at android.widget.ScrollView.draw(ScrollView.java:1833)
at com.facebook.react.views.scroll.ReactScrollView.draw(ReactScrollView.java:530)
at android.view.View.updateDisplayListIfDirty(View.java:21226)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:772)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4301)
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:744)
at android.view.View.draw(View.java:22353)
at android.view.View.updateDisplayListIfDirty(View.java:21226)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:772)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4301)
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:744)
at android.view.View.draw(View.java:22353)
at android.view.View.updateDisplayListIfDirty(View.java:21226)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4301)
at android.view.View.updateDisplayListIfDirty(View.java:21217)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1277)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at android.view.View.updateDisplayListIfDirty(View.java:21217)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at com.swmansion.rnscreens.ScreenStack.performDraw(ScreenStack.kt:304)
at com.swmansion.rnscreens.ScreenStack.access$performDraw(ScreenStack.kt:14)
at com.swmansion.rnscreens.ScreenStack$DrawingOp.draw(ScreenStack.kt:325)
at com.swmansion.rnscreens.ScreenStack.drawAndRelease(ScreenStack.kt:278)
at com.swmansion.rnscreens.ScreenStack.dispatchDraw(ScreenStack.kt:295)
at android.view.View.updateDisplayListIfDirty(View.java:21217)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:772)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:744)
at android.view.View.updateDisplayListIfDirty(View.java:21217)
E/unknown:ReactNative: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:559)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:565)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:642)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:4101)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3828)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3099)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1952)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8171)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
at android.view.Choreographer.doCallbacks(Choreographer.java:796)
at android.view.Choreographer.doFrame(Choreographer.java:731)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setVisibility(int)' on a null object reference
at org.reactnative.maskedview.RNCMaskedView.updateBitmapMask(RNCMaskedView.java:58)
at org.reactnative.maskedview.RNCMaskedView.dispatchDraw(RNCMaskedView.java:33)
at android.view.View.buildDrawingCacheImpl(View.java:21617)
at android.view.View.buildDrawingCache(View.java:21483)
at android.view.View.draw(View.java:22073)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:772)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4301)
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:744)
... 94 more
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.unifraternity, PID: 25559
java.lang.IllegalStateException: com.facebook.react.uimanager.IllegalViewOperationException: StackOverflowException
at com.facebook.react.bridge.ReactContext.handleException(ReactContext.java:426)
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:754)
at android.view.View.updateDisplayListIfDirty(View.java:21217)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4301)
at android.view.View.draw(View.java:22353)
at android.widget.ScrollView.draw(ScrollView.java:1833)
at com.facebook.react.views.scroll.ReactScrollView.draw(ReactScrollView.java:530)
at android.view.View.updateDisplayListIfDirty(View.java:21226)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:772)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4301)
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:744)
at android.view.View.draw(View.java:22353)
at android.view.View.updateDisplayListIfDirty(View.java:21226)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:772)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4301)
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:744)
at android.view.View.draw(View.java:22353)
at android.view.View.updateDisplayListIfDirty(View.java:21226)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4301)
at android.view.View.updateDisplayListIfDirty(View.java:21217)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1277)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at android.view.View.updateDisplayListIfDirty(View.java:21217)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at com.swmansion.rnscreens.ScreenStack.performDraw(ScreenStack.kt:304)
at com.swmansion.rnscreens.ScreenStack.access$performDraw(ScreenStack.kt:14)
at com.swmansion.rnscreens.ScreenStack$DrawingOp.draw(ScreenStack.kt:325)
at com.swmansion.rnscreens.ScreenStack.drawAndRelease(ScreenStack.kt:278)
at com.swmansion.rnscreens.ScreenStack.dispatchDraw(ScreenStack.kt:295)
at android.view.View.updateDisplayListIfDirty(View.java:21217)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.View.draw(View.java:22081)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:772)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4277)
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:744)
E/AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:21217)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4500)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4473)
at android.view.View.updateDisplayListIfDirty(View.java:21186)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:559)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:565)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:642)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:4101)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3828)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3099)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1952)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8171)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
at android.view.Choreographer.doCallbacks(Choreographer.java:796)
at android.view.Choreographer.doFrame(Choreographer.java:731)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: com.facebook.react.uimanager.IllegalViewOperationException: StackOverflowException
... 95 more
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setVisibility(int)' on a null object reference
at org.reactnative.maskedview.RNCMaskedView.updateBitmapMask(RNCMaskedView.java:58)
at org.reactnative.maskedview.RNCMaskedView.dispatchDraw(RNCMaskedView.java:33)
at android.view.View.buildDrawingCacheImpl(View.java:21617)
at android.view.View.buildDrawingCache(View.java:21483)
at android.view.View.draw(View.java:22073)
at android.view.ViewGroup.drawChild(ViewGroup.java:4516)
at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:772)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4301)
at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:744)
... 94 more
ANY SOLUTION?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|