在我们的测试中,只有间歇性地使用Chrome打开链接时才会发生这种情况。它似乎是某种内存泄漏导致我们的应用程序停止,我们如何防止这种情况。我们没有在iOS上看到它,也没有在Android或模拟器的任何其他测试手机上看到它。
02-12 07:54:55.429 15484-15484/myapp D/ViewRootImpl@ed30525[MainActivity]: mHardwareRenderer.destroy()#1
02-12 07:54:55.440 15484-15484/myapp D/ViewRootImpl@ed30525[MainActivity]: Relayout returned: oldFrame=[0,0][720,1280] newFrame=[0,0][720,1280] result=0x5 surface={isValid=false 0} surfaceGenerationChanged=true
02-12 07:54:55.440 15484-15484/myapp D/InputTransport: Input channel destroyed: fd=157
02-12 07:54:55.955 15484-15484/myapp D/ViewRootImpl@ed30525[MainActivity]: mHardwareRenderer.destroy()#1
02-12 07:54:55.956 15484-15860/myapp W/OpenGLRenderer: Texture is using 0.00B, count = 1
OffscreenBuffer is using 0.00B, count = 0
Layer is using 0.00B, count = 1
02-12 07:54:55.956 15484-15860/myapp W/OpenGLRenderer: GPU Memory Leak happened by Application!!(2 Objects)
02-12 07:54:55.956 15484-15860/myapp W/OpenGLRenderer: Below Textures or Layers was not cleared even though Application being closed.(It should be fixed by Application side)
02-12 07:54:55.956 15484-15860/myapp W/OpenGLRenderer: [Leak]Texture size is 0, 720 x 908
02-12 07:54:55.957 15484-15860/myapp W/OpenGLRenderer: [Leak]Layer size is 0, 720 x 908
02-12 07:54:55.957 15484-15860/myapp A/OpenGLRenderer: Leaked 2 GPU objects!
02-12 07:54:56.221 15484-15860/myapp W/google-breakpad: ### ### ### ### ### ### ### ### ### ### ### ### ###
02-12 07:54:56.221 15484-15860/myapp W/google-breakpad: Chrome build fingerprint:
02-12 07:54:56.221 15484-15860/myapp W/google-breakpad: 1.0.0
02-12 07:54:56.221 15484-15860/myapp W/google-breakpad: 42
02-12 07:54:56.221 15484-15860/myapp W/google-breakpad: ### ### ### ### ### ### ### ### ### ### ### ### ###
02-12 07:54:56.223 15484-15860/myapp A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 15860 (RenderThread)
[ 02-12 07:54:56.224 2134: 2134 W/ ]
debuggerd: handling request: pid=15484 uid=10268 gid=10268 tid=15860
视图的代码使视图呈现如下:
class Support extends React.Component<Props> {
handleCall = () => {
Linking.openURL('tel:+00000000');
};
handleLink = () => {
Linking.openURL('http://www.test.com').catch((err) =>
debug('An error occured when opening Link', err),
);
};
render() {
return (
<MainContainer>
<View>
<Header {...this.props} title={_('Support')} />
<View style={styles.mainContainer}>
<Support size={60} />
</View>
<ListSectionHeader
text={_('Your support contact')}
hasTopBorder={false}
/>
<ListRows>
<ListRow
text={_('Contact')}
rightText="Test"
hasTopBorder={false}
/>
<ListRow
text={_p('Web', 'internet')}
rightText="test.com"
onPress={this.handleLink}
rightIconName="ios-globe"
/>
<ListRow
text={_('Phone number')}
rightText="+00000000"
onPress={this.handleCall}
rightIconName="ios-call"
/>
</ListRows>
</View>
</MainContainer>
);
}
}
Support.displayName = 'tabViews/Support';
export default getWithErrorHandling(Support);