Skip to content
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

webview导致UI卡顿 #86

Closed
deboLing opened this issue Dec 14, 2020 · 5 comments
Closed

webview导致UI卡顿 #86

deboLing opened this issue Dec 14, 2020 · 5 comments

Comments

@deboLing
Copy link

在iOS上,打开网页关闭后,其他页面会卡顿。

日志如下:

Main Thread Checker: UI API called on a background thread: -[UIView removeFromSuperview]
PID: 3117, TID: 628092, Thread name: io.flutter.1.raster, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4 Flutter 0x0000000100b855d0 _ZN7flutter30FlutterPlatformViewsController11SubmitFrameEP15GrDirectContextNSt3__110shared_ptrINS_10IOSContextEEENS3_10unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS8_EEEE + 4932
5 Flutter 0x0000000100b9ea60 _ZN7flutter10IOSSurface11SubmitFrameEP15GrDirectContextNSt3__110unique_ptrINS_12SurfaceFrameENS3_14default_deleteIS5_EEEE + 160
6 Flutter 0x0000000100e750c4 _ZN7flutter10Rasterizer13DrawToSurfaceERNS_9LayerTreeE + 604
7 Flutter 0x0000000100e75c00 _ZNSt3__110__function6__funcIZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEEE3$1NS_9allocatorISA_EEFvNS_10unique_ptrIS7_NS_14default_deleteIS7_EEEEEEclEOSG + 116
8 Flutter 0x0000000100e753c4 _ZN7flutter10Rasterizer4DrawEN3fml6RefPtrINS_8PipelineINS_9LayerTreeEEEEE + 408
9 Flutter 0x0000000100e7bc10 _ZNSt3__110__function6__funcIZN7flutter5Shell14OnAnimatorDrawEN3fml6RefPtrINS2_8PipelineINS2_9LayerTreeEEEEENS4_9TimePointEE4$_30NS_9allocatorISB_EEFvvEEclEv + 100
10 Flutter 0x0000000100ba9948 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 1472
11 Flutter 0x0000000100bac074 ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0 + 32
12 CoreFoundation 0x0000000196b98134 E2D6A76B-6879-31A3-8168-DF49F94E17CD + 692532
13 CoreFoundation 0x0000000196b97e50 E2D6A76B-6879-31A3-8168-DF49F94E17CD + 691792
14 CoreFoundation 0x0000000196b9752c E2D6A76B-6879-31A3-8168-DF49F94E17CD + 689452
15 CoreFoundation 0x0000000196b9253c E2D6A76B-6879-31A3-8168-DF49F94E17CD + 668988
16 CoreFoundation 0x0000000196b91ba8 CFRunLoopRunSpecific + 424
17 Flutter 0x0000000100babf50 _ZN3fml17MessageLoopDarwin3RunEv + 88
18 Flutter 0x0000000100bab12c _ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN3fml6ThreadC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEE3$0EEEEEPvSJ + 196
19 libsystem_pthread.dylib 0x000000019692fd98 _pthread_start + 156
20 libsystem_pthread.dylib 0x000000019693374c thread_start + 8

@hisaichi5518
Copy link
Owner

Can you give me the code to reproduce this problem?

@deboLing
Copy link
Author

Can you give me the code to reproduce this problem?

WebView(
initialData: WebViewData(Platform.isIOS
? "$userRule"
: "$userRule"),
)

@deboLing
Copy link
Author

开发测试环境会卡顿、上架后不会卡顿

@hisaichi5518
Copy link
Owner

@deboLing
Can you provide actual working code?
Also, what kind of value does the userRule contain?

@hisaichi5518
Copy link
Owner

This issue can be resolved by using Flutter 1.24.0-6.0.pre. Thanks!

flutter/flutter#69449
flutter/flutter#68490
flutter/flutter#69170
flutter/engine#22372

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants