Open bvv218 opened 6 years ago
Can you try run app from Xcode?
I can try to reproduce it, but can you please provide at least basic scheme of code with FlatList and versions of react-native-web-image, RN, ios and Xcode?
@vovkasm I tried running app from Xcode and app crashed again (Lost connection to iPhone error), but simulator still works as expected. iOS: 10.3.3, react-native-web-image: 0.0.6, react: 16, react-native: 0.51.0, Xcode: 9.
Sample code (inside React.PureComponent):
<FlatList
removeClippedSubviews={true}
data={this.state.data}
renderItem={({item}) => {
return (
<View style={styles.container}>
<WebImage
resizeMode={'cover'}
style={styles.image }
source={{
uri: item.image
}}
/>
</View>
);
}}
keyExtractor={(item, index) => index}
/>
Thanks!
Very strange crash, before I will chance to look at this in details, can you test with develop
branch, it uses newer version of SDWebImage?
@vovkasm I tried to install develop version, but I receive this error: Showing Recent Issues clang: error: linker command failed with exit code 1 (use -v to see invocation) ... was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build file
Oops... sorry, I tried to hide SDWebImage symbols, by linker black magic, seems this caused bitcode issues... ( Will revert this commits soon
@bvv218 just reverted it, sorry again (
@vovkasm Thanks, I will try it again right now. Can the crash be possibly caused by the memory usage? I noticed that when I use
@vovkasm The app crashes with develop version install as well.
@bvv218 Well, I will try to replicate the crash with FlatList and see what happens. Yes, it is probably a memory issue, but usually this does not happen silently. System logs (can be seen in Console.app
on latest macos versions) usually contain some info.
One question: How big are the images which your app loads?
@vovkasm I don't see any logs after the crash. Images are on average 3MB each.
Can confirm crash (ios, real device). Yes it is memory issue. Thank you for finding this!
I added two samples using flat list, they can be seen in samples/SampleApp
on develop
branch.
First loads NASA image set, it not crashes (images sizes about 200Kb)...
Second loads generated images 7MB each, it renders FlatList with 200 items. It crashes on real device. ((
Will try to investigate deeper, but it needs some time... :-/
Random facts:
Anyway I will glad to any help with any ideas/resources/code that can help with this problem.
I am using web image for FlatList Items, and when I have many items (10+), ios app on physical device just crashes without any errors in the console. It works great on iOS simulator and android physical devices, but crashes on iOS physical devices. I tried replacing web image with image tag and it works as expected without crash.