fluttercommunity / fluttercommunity/flutter_webview_plugin
App Crashes after navigating to WebViewScaffold()
- Ngôn ngữ chính
- Java
- Star
- 1.5k
- Fork
- 938
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I have a simple application where when I click a button, a web view should open with the default URL. When I navigate to the web view and come back, if navigate again to the web view, web view opens and then crashes the whole application.
Here is my code
```
import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
class MethodsPage extends StatefulWidget {
@override
_MethodsPageState createState() => _MethodsPageState();
}
class _MethodsPageState extends State {
// final flutterWebViewPlugin = FlutterWebviewPlugin();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: true,
title: Text(
'Methods',
style: TextStyle(color: Colors.black),
)),
body: Center(child: RaisedButton(
child: Text('Open View'), onPressed: openWebView,)),
);
}
void openWebView() {
Navigator.push(
context, MaterialPageRoute(builder: (context) => WebUi()));
}
}
class WebUi extends StatelessWidget {
final flutterWebViewPlugin = FlutterWebviewPlugin();
@override
Widget build(BuildContext context) {
return WebviewScaffold(
appBar: AppBar(centerTitle: true,title: Text('Web UI'),),
url: 'https://www.google.com',
withZoom: true,
bottomNavigationBar: BottomAppBar(
child: Row(
children: [
IconButton(
icon: const Icon(Icons.arrow_back_ios),
onPressed: () {
flutterWebViewPlugin.goBack();
},
),
IconButton(
icon: const Icon(Icons.arrow_forward_ios),
onPressed: () {
flutterWebViewPlugin.goForward();
},
),
IconButton(
icon: const Icon(Icons.autorenew),
onPressed: () {
flutterWebViewPlugin.reload();
},
),
],
),
),
);
}
}
```
Error: Received
> F/google-breakpad(21220): -----BEGIN BREAKPAD MICRODUMP-----
> F/google-breakpad(21220): V AndroidWebView:69.0.3497.100
> F/google-breakpad(21220): O A x86 04 i686 google/sdk_gphone_x86_arm/generic_x86_arm:9/PSR1.180720.117/5875966:user/release-keys
> F/google-breakpad(21220): P browser
> F/google-breakpad(21220): R 0000000B SIGSEGV 00000000
> F/google-breakpad(21220): G
> F/google-breakpad(21220): H 12C00000 FFF03000 00DD 3D313000 763FC000 0C:28 0D:12 0E:0A 0F:0F 10:11 11:13 12:56 13:0A 16:02 1B:01 1C:02 1D:01
> F/google-breakpad(21220): S 0 D2087FCC D2087000 00008000
> F/google-breakpad(21220): S D2087000
> ...........
> F/google-breakpad(21220): -----END BREAKPAD MICRODUMP-----
> W/google-breakpad(20716): ### ### ### ### ### ### ### ### ### ### ### ### ###
> W/google-breakpad(20716): Chrome build fingerprint:
> W/google-breakpad(20716): 69.0.3497.100
> W/google-breakpad(20716): 349710017
> W/google-breakpad(20716): ### ### ### ### ### ### ### ### ### ### ### ### ###
> F/libc (20716): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 20808 (RenderThread), pid 20716 (resssdriverlite)
> *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:9/PSR1.180720.117/5875966:user/release-keys'
> Revision: '0'
> ABI: 'x86'
> pid: 20716, tid: 20808, name: RenderThread >>> com.myapp<<<
> signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
> Cause: null pointer dereference
> eax ec3bf900 ebx e2d85e2c ecx e2c5ba58 edx d2088030
> edi e2eae8f4 esi d2088010
> ebp c50f3000 esp d2087fcc eip 00000000
> backtrace:
> #00 pc 00000000
>
Any assistance would be really helpful.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lỗi crash trên trình giả lập Android được mô tả trong báo cáo, sử dụng các entry point MethodsPage và WebUi với WebviewScaffold. Đọc vòng đời và các phương thức điều hướng của FlutterWebviewPlugin, đặc biệt là trong các luồng mở rồi quay lại được lặp lại. Công việc được hoàn thành khi việc mở, rời khỏi và mở lại web view không còn làm ứng dụng bị crash.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- android, dart, flutter
- Lĩnh vực
- mobile-dev
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100