flutter / flutter/devtools

NPE when profiling analyzer

Đang mở
#9,177 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
advanced-developer-mode exception P2
Ngôn ngữ chính
Dart
Star
1.7k
Fork
404
Merge trung bình
6 ngày 17 giờ
Pull request đã merge (30 ngày)
18

Mô tả

Run `dart --observe:5001 /Users/scheglov/Source/Dart/sdk.git/sdk/pkg/analyzer_cli/bin/analyzer.dart /Users/scheglov/Source/Dart/sdk.git/sdk/pkg/analyzer_cli/bin/analyzer.dart`

```
:5001/HBaRonn3Gdo=/devtools/?uri=ws://127.0.0.1:5001/HBaRonn3Gdo=/ws:1 Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
flutter_bootstrap.js:121 Attempting to load DevTools with canvaskit renderer.
js_util_patch.dart:81 Server HTTP API is available, using server for storage.
js_util_patch.dart:81 Version: 2.46.0-dev.0, Renderer: canvaskit
js_util_patch.dart:81 Successfully connected to DTD at: ws://127.0.0.1:52838/xcb9wNTNUXs=
js_util_patch.dart:81 DevTools log level changed to INFO
cK5 @ js_util_patch.dart:81
js_util_patch.dart:81 Attempted to call extension 'ext.flutter.inspector.structuredErrors', but no service with that name exists
js_util_patch.dart:81 readyToResume: (106) Isolate must be paused
cK5 @ js_util_patch.dart:81
js_util_patch.dart:81 Could not time async operation "cpuProfileProcessingTime" because an exception was thrown:
Null check operator used on a null value
TypeError: Cannot read properties of undefined (reading 'd')
at bQV.$2$current$parent (http://127.0.0.1:5001/HBaRonn3Gdo=/devtools/main.dart.js:92256:23)
at bQV.$2$current$parent (http://127.0.0.1:5001/HBaRonn3Gdo=/devtools/main.dart.js:92259:83)
at bQV.$2$current$parent (http://127.0.0.1:5001/HBaRonn3Gdo=/devtools/main.dart.js:92259:83)
at bQV.$2$current$parent (http://127.0.0.1:5001/HBaRonn3Gdo=/devtools/main.dart.js:92259:83)
at bQV.$2$current$parent (http://127.0.0.1:5001/HBaRonn3Gdo=/devtools/main.dart.js:92259:83)
at bQV.$2$current$parent (http://127.0.0.1:5001/HBaRonn3Gdo=/devtools/main.dart.js:92259:83)
at bQV.$2$current$parent (http://127.0.0.1:5001/HBaRonn3Gdo=/devtools/main.dart.js:92259:83)
at bQV.$2$current$parent (http://127.0.0.1:5001/HBaRonn3Gdo=/devtools/main.dart.js:92259:83)
at bQV.$2$current$parent (http://127.0.0.1:5001/HBaRonn3Gdo=/devtools/main.dart.js:92259:83)
at bQV.$2$current$parent (http://127.0.0.1:5001/HBaRonn3Gdo=/devtools/main.dart.js:92259:83)
cK5 @ js_util_patch.dart:81
core_patch.dart:296 Uncaught Error: Null check operator used on a null value
at bQV.$2$current$parent (cpu_profile_model.dart:1274:39)
at bQV.$2$current$parent (cpu_profile_model.dart:1385:9)
at bQV.$2$current$parent (cpu_profile_model.dart:1385:9)
at bQV.$2$current$parent (cpu_profile_model.dart:1385:9)
at bQV.$2$current$parent (cpu_profile_model.dart:1385:9)
at bQV.$2$current$parent (cpu_profile_model.dart:1385:9)
at bQV.$2$current$parent (cpu_profile_model.dart:1385:9)
at bQV.$2$current$parent (cpu_profile_model.dart:1385:9)
at bQV.$2$current$parent (cpu_profile_model.dart:1385:9)
at bQV.$2$current$parent (cpu_profile_model.dart:1385:9)
js_util_patch.dart:81 [zoneGuarded]: Null check operator used on a null value
../../../lib/src/screens/profiler/cpu_profile_model.dart 1274:39 _extension#0|generateStackFramesJson.processStackFrame
../../../lib/src/screens/profiler/cpu_profile_model.dart 1385:9 _extension#0|generateStackFramesJson.processStackFrame
../../../lib/src/screens/profiler/cpu_profile_model.dart 1385:9 _extension#0|generateStackFramesJson.processStackFrame
../../../lib/src/screens/profiler/cpu_profile_model.dart 1385:9 _extension#0|generateStackFramesJson.processStackFrame
../../../lib/src/screens/profiler/cpu_profile_model.dart 1385:9 _extension#0|generateStackFramesJson.processStackFrame
../../../lib/src/screens/profiler/cpu_profile_model.dart 1385:9 _extension#0|generateStackFramesJson.processStackFrame
../../../lib/src/screens/profiler/cpu_profile_model.dart 1385:9 _extension#0|generateStackFramesJson.processStackFrame
../../../lib/src/screens/profiler/cpu_profile_model.dart 1385:9 _extension#0|generateStackFramesJson.processStackFrame
../../../lib/src/screens/profiler/cpu_profile_model.dart 1385:9 _extension#0|generateStackFramesJson.processStackFrame
../../../lib/src/screens/profiler/cpu_profile_model.dart 1385:9 _extension#0|generateStackFramesJson.processStackFrame

cK5 @ js_util_patch.dart:81





Chrome is moving towards a new experience that allows users to choose to browse without third-party cookies.
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Tái hiện lỗi bằng lệnh profiling của analyzer trong issue, sau đó kiểm tra lib/src/screens/profiler/cpu_profile_model.dart tại các dòng 1274 và 1385, nơi stack trace đi vào generateStackFramesJson.processStackFrame. Theo dõi giá trị null trong quá trình xử lý CPU profile và xác minh rằng việc profiling lệnh này hoàn tất mà không có lỗi kiểm tra null.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
dart, devtools
Lĩnh vực
devtools, performance
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.