flutter / devtools

Performance tools for Flutter
https://flutter.dev/docs/development/tools/devtools/
BSD 3-Clause "New" or "Revised" License
1.57k stars 324 forks source link

Inspector tree is broken with wasm #8354

Closed elliette closed 6 hours ago

elliette commented 6 hours ago

Steps to repro:

For me, the inspector tree scrolled for a bit, then froze, then I was able to scroll a little more but it got into a very weird state (hover card didn't disappear, half the inspector tree is invisible).

tree_broken_wasm

I see a lot of errors in the console, not sure which are relevant:



flutter_bootstrap.js:51 Error fetching experiment.wasm preference value: SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at getDevToolsWasmPreference (flutter_bootstrap.js:48:30)
    at async shouldUseSkwasm (flutter_bootstrap.js:62:45)
    at async bootstrapAppFor3P (flutter_bootstrap.js:82:21)
flutter_bootstrap.js:89 Attempting to load DevTools with skwasm renderer.
flutter_bootstrap.js:3 Loading from existing service worker.
flutter_bootstrap.js:3 Service worker already active.
main.dart.mjs:744 Version: 2.40.0-dev.2, Renderer: skwasm
main.dart.mjs:744 Successfully connected to DTD at: ws://127.0.0.1:63326/SBjLQoanC5BM21LD
4
main.dart.mjs:745 HttpRequest api/getPreferenceValue failed status = 204
main.dart.mjs:745 DevTools log level changed to INFO
9
main.dart.mjs:745 HttpRequest api/getPreferenceValue failed status = 204
main.dart.mjs:745 package_config.json not found at: "file:///Users/elliottbrooks/dev/gallery/.dart_tool/flutter_gen/.dart_tool/package_config.json"
main.dart.mjs:744 Attempted to call extension 'ext.flutter.inspector.structuredErrors', but no service with that name exists
main.dart.mjs:745 HttpRequest api/getPreferenceValue failed status = 204
main.dart.mjs:745 HttpRequest api/setPreferenceValue failed status = 204
main.dart.mjs:745 HttpRequest api/getPreferenceValue failed status = 204
main.dart.mjs:745 readyToResume: (106) Isolate must be paused
main.dart.mjs:745 package_config.json not found at: "file:///Users/elliottbrooks/dev/gallery/.dart_tool/flutter_gen/.dart_tool/package_config.json"
main.dart.mjs:745 HttpRequest api/setActiveSurvey failed status = 200, responseText = false
:9104/api/getSurveyShownCount:1 
 Failed to load resource: the server responded with a status of 400 (Bad Request)
main.dart.mjs:745 HttpRequest api/getSurveyShownCount failed status = 400, responseText = ERROR: setActiveSurvey not called. - api/getSurveyShownCount
:9104/api/getSurveyActionTaken:1 
 Failed to load resource: the server responded with a status of 400 (Bad Request)
main.dart.mjs:745 HttpRequest api/getSurveyActionTaken failed status = 400, responseText = ERROR: setActiveSurvey not called. - api/getSurveyActionTaken
main.dart.mjs:745 package_config.json not found at: "file:///Users/elliottbrooks/dev/gallery/.dart_tool/flutter_gen/.dart_tool/package_config.json"
main.dart.mjs:745 HttpRequest api/getPreferenceValue failed status = 204
36
main.dart.wasm:0x1ce3c4 Uncaught RuntimeError: table index is out of bounds
    at module0.ListBase.isEmpty (main.dart.wasm:0x1ce3c4)
    at module0.ListBase.isNotEmpty (main.dart.wasm:0x1ce06b)
    at module0.LayerBuilder.flushSlices (main.dart.wasm:0x395d60)
    at module0.LayerBuilder.build (main.dart.wasm:0x395b4e)
    at module0.EngineSceneBuilder.pop (main.dart.wasm:0x395b0f)
    at module0.OpacityLayer.addToScene (main.dart.wasm:0x397997)
    at module0.ContainerLayer.addChildrenToScene (main.dart.wasm:0x396939)
    at module0.OffsetLayer.addToScene (main.dart.wasm:0x397d34)
    at module0.ContainerLayer.addChildrenToScene (main.dart.wasm:0x396939)
    at module0.ClipRectLayer.addToScene (main.dart.wasm:0x39c0a9)
main.dart.mjs:746 [zoneGuarded]: Null check operator used on a null value
main.dart.mjs:53 Null check operator used on a null value
main.dart.mjs:53     at module0.Overlay.of (http://127.0.0.1:9104/main.dart.wasm:wasm-function[7738]:0x25fb1d)
    at module0.new HoverCard (constructor body) (http://127.0.0.1:9104/main.dart.wasm:wasm-function[17218]:0x33972f)
    at module0.HoverCard.fromHoverEvent (http://127.0.0.1:9104/main.dart.wasm:wasm-function[17212]:0x339436)
    at module0._HoverCardTooltipState._showAsyncHoverCard inner (http://127.0.0.1:9104/main.dart.wasm:wasm-function[17229]:0x339ba3)
    at module0._HoverCardTooltipState._onHover closure at file:///Users/elliottbrooks/dev/devtools/packages/devtools_app/lib/src/shared/ui/hover.dart:385:54 (http://127.0.0.1:9104/main.dart.wasm:wasm-function[17208]:0x3391c6)
    at module0.closure wrapper at file:///Users/elliottbrooks/dev/devtools/packages/devtools_app/lib/src/shared/ui/hover.dart:385:54 trampoline (http://127.0.0.1:9104/main.dart.wasm:wasm-function[17210]:0x3391eb)
    at module0._rootRun (http://127.0.0.1:9104/main.dart.wasm:wasm-function[1534]:0x1cb24a)
    at module0._rootRun tear-off trampoline (http://127.0.0.1:9104/main.dart.wasm:wasm-function[34820]:0x4e45a8)
inspector:1 Uncaught 
Exception
51
main.dart.wasm:0x1ce3c4 Uncaught RuntimeError: table index is out of bounds
    at module0.ListBase.isEmpty (main.dart.wasm:0x1ce3c4)
    at module0.ListBase.isNotEmpty (main.dart.wasm:0x1ce06b)
    at module0.LayerBuilder.flushSlices (main.dart.wasm:0x395d60)
    at module0.LayerBuilder.build (main.dart.wasm:0x395b4e)
    at module0.EngineSceneBuilder.pop (main.dart.wasm:0x395b0f)
    at module0.OpacityLayer.addToScene (main.dart.wasm:0x397997)
    at module0.ContainerLayer.addChildrenToScene (main.dart.wasm:0x396939)
    at module0.OffsetLayer.addToScene (main.dart.wasm:0x397d34)
    at module0.ContainerLayer.addChildrenToScene (main.dart.wasm:0x396939)
    at module0.ClipRectLayer.addToScene (main.dart.wasm:0x39c0a9)
skwasm.wasm:0x30a30 Uncaught RuntimeError: memory access out of bounds
    at skwasm.wasm:0x30a30
    at module0.RenderBox.constraints (main.dart.wasm:0x2b5df2)
    at module0.RenderParagraph.paint (main.dart.wasm:0x398c8e)
    at module0.RenderObject._paintWithContext (main.dart.wasm:0x397dba)
    at module0.PaintingContext.paintChild (main.dart.wasm:0x39bbb7)
    at module0.RenderShiftedBox.paint (main.dart.wasm:0x39a521)
    at module0.RenderObject._paintWithContext (main.dart.wasm:0x397dba)
    at module0.PaintingContext.paintChild (main.dart.wasm:0x39bbb7)
    at module0._RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint (main.dart.wasm:0x39973f)
    at module0.RenderObject._paintWithContext (main.dart.wasm:0x397dba)
2
main.dart.wasm:0x1ce3c4 Uncaught RuntimeError: table index is out of bounds
    at module0.ListBase.isEmpty (main.dart.wasm:0x1ce3c4)
    at module0.ListBase.isNotEmpty (main.dart.wasm:0x1ce06b)
    at module0.LayerBuilder.flushSlices (main.dart.wasm:0x395d60)
    at module0.LayerBuilder.build (main.dart.wasm:0x395b4e)
    at module0.EngineSceneBuilder.pop (main.dart.wasm:0x395b0f)
    at module0.OpacityLayer.addToScene (main.dart.wasm:0x397997)
    at module0.ContainerLayer.addChildrenToScene (main.dart.wasm:0x396939)
    at module0.OffsetLayer.addToScene (main.dart.wasm:0x397d34)
    at module0.ContainerLayer.addChildrenToScene (main.dart.wasm:0x396939)
    at module0.ClipRectLayer.addToScene (main.dart.wasm:0x39c0a9)
skwasm.wasm:0x30a30 Uncaught RuntimeError: memory access out of bounds
    at skwasm.wasm:0x30a30
    at module0.RenderBox.constraints (main.dart.wasm:0x2b5df2)
    at module0.RenderParagraph.paint (main.dart.wasm:0x398c8e)
    at module0.RenderObject._paintWithContext (main.dart.wasm:0x397dba)
    at module0.PaintingContext.paintChild (main.dart.wasm:0x39bbb7)
    at module0._RenderFlex&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint (main.dart.wasm:0x3a5d5f)
    at module0.RenderFlex.paint (main.dart.wasm:0x39871b)
    at module0.RenderObject._paintWithContext (main.dart.wasm:0x397dba)
    at module0.PaintingContext.paintChild (main.dart.wasm:0x39bbb7)
    at module0._RenderFlex&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint (main.dart.wasm:0x3a5d5f)
45
main.dart.wasm:0x1ce3c4 Uncaught RuntimeError: table index is out of bounds
    at module0.ListBase.isEmpty (main.dart.wasm:0x1ce3c4)
    at module0.ListBase.isNotEmpty (main.dart.wasm:0x1ce06b)
    at module0.LayerBuilder.flushSlices (main.dart.wasm:0x395d60)
    at module0.LayerBuilder.build (main.dart.wasm:0x395b4e)
    at module0.EngineSceneBuilder.pop (main.dart.wasm:0x395b0f)
    at module0.OpacityLayer.addToScene (main.dart.wasm:0x397997)
    at module0.ContainerLayer.addChildrenToScene (main.dart.wasm:0x396939)
    at module0.OffsetLayer.addToScene (main.dart.wasm:0x397d34)
    at module0.ContainerLayer.addChildrenToScene (main.dart.wasm:0x396939)
    at module0.ClipRectLayer.addToScene (main.dart.wasm:0x39c0a9)
skwasm.wasm:0x30a30 Uncaught RuntimeError: memory access out of bounds
    at skwasm.wasm:0x30a30
    at module0.RenderBox.constraints (main.dart.wasm:0x2b5df2)
    at module0.RenderParagraph.paint (main.dart.wasm:0x398c8e)
    at module0.RenderObject._paintWithContext (main.dart.wasm:0x397dba)
    at module0.PaintingContext.paintChild (main.dart.wasm:0x39bbb7)
    at module0._RenderFlex&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint (main.dart.wasm:0x3a5d5f)
    at module0.RenderFlex.paint (main.dart.wasm:0x39871b)
    at module0.RenderObject._paintWithContext (main.dart.wasm:0x397dba)
    at module0.PaintingContext.paintChild (main.dart.wasm:0x39bbb7)
    at module0._RenderFlex&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint (main.dart.wasm:0x3a5d5f)
48
main.dart.wasm:0x1ce3c4 Uncaught RuntimeError: table index is out of bounds
    at module0.ListBase.isEmpty (main.dart.wasm:0x1ce3c4)
    at module0.ListBase.isNotEmpty (main.dart.wasm:0x1ce06b)
    at module0.LayerBuilder.flushSlices (main.dart.wasm:0x395d60)
    at module0.LayerBuilder.build (main.dart.wasm:0x395b4e)
    at module0.EngineSceneBuilder.pop (main.dart.wasm:0x395b0f)
    at module0.OpacityLayer.addToScene (main.dart.wasm:0x397997)
    at module0.ContainerLayer.addChildrenToScene (main.dart.wasm:0x396939)
    at module0.OffsetLayer.addToScene (main.dart.wasm:0x397d34)
    at module0.ContainerLayer.addChildrenToScene (main.dart.wasm:0x396939)
    at module0.ClipRectLayer.addToScene (main.dart.wasm:0x39c0a9)
main.dart.mjs:746 [FlutterError]: Null check operator used on a null value
main.dart.mjs:53 Null check operator used on a null value
main.dart.mjs:53 at module0.RenderObject.getTransformTo (http://127.0.0.1:9104/main.dart.wasm:wasm-function[8042]:0x264dee)
main.dart.mjs:53     at module0._SelectableFragment.dispatchSelectionEvent (http://127.0.0.1:9104/main.dart.wasm:wasm-function[11538]:0x2bb754)
main.dart.mjs:53     at module0.MultiSelectableSelectionContainerDelegate.dispatchSelectionEventToChild (http://127.0.0.1:9104/main.dart.wasm:wasm-function[11537]:0x2bb5b9)
main.dart.mjs:53     at module0._SelectableTextContainerDelegate.dispatchSelectionEventToChild (http://127.0.0.1:9104/main.dart.wasm:wasm-function[11527]:0x2bb2ea)
main.dart.mjs:53     at module0.MultiSelectableSelectionContainerDelegate._initSelection (http://127.0.0.1:9104/main.dart.wasm:wasm-function[11524]:0x2bad30)
main.dart.mjs:53     at module0.MultiSelectableSelectionContainerDelegate.handleSelectionEdgeUpdate (http://127.0.0.1:9104/main.dart.wasm:wasm-function[11523]:0x2baccc)
main.dart.mjs:53     at module0._SelectableTextContainerDelegate.handleSelectionEdgeUpdate (http://127.0.0.1:9104/main.dart.wasm:wasm-function[11493]:0x2b972f)
main.dart.mjs:53     at module0.MultiSelectableSelectionContainerDelegate.dispatchSelectionEvent (http://127.0.0.1:9104/main.dart.wasm:wasm-function[11540]:0x2bd51e)
skwasm.wasm:0x30a30 Uncaught RuntimeError: memory access out of bounds
    at skwasm.wasm:0x30a30
    at module0.RenderBox.constraints (main.dart.wasm:0x2b5df2)
    at module0.RenderParagraph.paint (main.dart.wasm:0x398c8e)
    at module0.RenderObject._paintWithContext (main.dart.wasm:0x397dba)
    at module0.PaintingContext.paintChild (main.dart.wasm:0x39bbb7)
    at module0._RenderFlex&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint (main.dart.wasm:0x3a5d5f)
    at module0.RenderFlex.paint (main.dart.wasm:0x39871b)
    at module0.RenderObject._paintWithContext (main.dart.wasm:0x397dba)
    at module0.PaintingContext.paintChild (main.dart.wasm:0x39bbb7)
    at module0._RenderFlex&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint (main.dart.wasm:0x3a5d5f)
main.dart.wasm:0x1ce3c4 Uncaught RuntimeError: table index is out of bounds
    at module0.ListBase.isEmpty (main.dart.wasm:0x1ce3c4)
    at module0.ListBase.isNotEmpty (main.dart.wasm:0x1ce06b)
    at module0.LayerBuilder.flushSlices (main.dart.wasm:0x395d60)
    at module0.LayerBuilder.build (main.dart.wasm:0x395b4e)
    at module0.EngineSceneBuilder.pop (main.dart.wasm:0x395b0f)
    at module0.OpacityLayer.addToScene (main.dart.wasm:0x397997)
    at module0.ContainerLayer.addChildrenToScene (main.dart.wasm:0x396939)
    at module0.OffsetLayer.addToScene (main.dart.wasm:0x397d34)
    at module0.ContainerLayer.addChildrenToScene (main.dart.wasm:0x396939)
    at module0.ClipRectLayer.addToScene (main.dart.wasm:0x39c0a9)
main.dart.mjs:746 [FlutterError]: Null check operator used on a null value
main.dart.mjs:53 Another exception was thrown: Instance of 'minified:Class2251<void>'
55
main.dart.mjs:229 Failed to inject Platform View Id: 1. Render seems to be happening before a `flutter/platform_views:create` platform message!
5
[Violation] 'requestAnimationFrame' handler took <N>ms
724
main.dart.mjs:229 Failed to inject Platform View Id: 1. Render seems to be happening before a `flutter/platform_views:create` platform message!
elliette commented 6 hours ago

Closing, this is because I was serving devtools with an old version of the Dart SDK.