-
Notifications
You must be signed in to change notification settings - Fork 331
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
Exception capturing CPU profile ("type 'NativeFunction' is not a subtype of type 'FuncRef?' in type cast") #8567
Comments
I tried again and reproduced the same issue. Switching to Flutter stable the issue went away, so this could be a regression (FYI @kenzieschmoll). |
Are you able to get a stack trace that is not minified? What version of DevTools is this using? |
I should've probably done that first 🙃 Running from latest code (e1ead3d) I see the error below, which I presume is the same. The top of the stack is in vm_service so I don't know if this might actually be an issue there? (@bkonyi)
|
May be been introduced by dart-lang/sdk@d60221e? I think maybe this code assumes |
Yeah, that change is the culprit. The type of I think this should only be an issue when VM Developer Mode is enabled. |
Fix up for review here. This is going to require a breaking change to |
The function property of a Code object can contain either a Function or a NativeFunction. This change updates the protocol specification to properly document existing behavior and regenerates package:vm_service to update `CodeRef.function` to have a `dynamic` type. This is a breaking change to `package:vm_service`, so this will be released as 15.0.0. Related to flutter/devtools#8567 TEST=N/A Change-Id: Ie89723cdba8176be0d84a57a878fbedbca57f9c0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/398260 Commit-Queue: Ben Konyi <[email protected]> Reviewed-by: Derek Xu <[email protected]> Auto-Submit: Ben Konyi <[email protected]>
Ah, this does seem to be the case. I don't know when/why I enabled it, but disabling it seems to prevent the issue. |
This is because we don't typically request the @kenzieschmoll do we think we'll want to CP this? It might be a pain to CP |
…enabled Works around flutter#8567 until `package:vm_service` 15.0.0 is rolled through to Flutter.
Uploaded #8578 to disable this functionality for now while the |
If the breakage only occurs when VM developer mode is enabled, then I don't think we need to CP your workaround. Am I understanding this correctly that this only happens in VM developer mode? |
This does seem to be the case in my testing (which also matches up with what Ben said above) - after disabling it, I was able to profile without errors. |
I hit this error while trying to do some CPU profiling of the analysis server. I don't know if I'll be able to repro, but I thought I should record it here before I lose it.
The steps I followed:
Add
"dart.analyzerVmServicePort": 8855
(port number is not important but you'll need it further down) and SaveA toast notification should appear in the bottom right warning you that the analysis servers VM Service is enabled
http://localhost:8855/
(using the port number from above) and click ConnectChrome dev tools console has this:
Flutter SDK: 3.27.0-0.1.pre
Dart version: 3.6.0-334.3.beta
The text was updated successfully, but these errors were encountered: