Sdk: compiler message: Type parameter #lib1::Store::StateBuilder is not indexed

Created on 1 Aug 2018  Â·  16Comments  Â·  Source: dart-lang/sdk

In IntelliJ the debugger stopped at an exception and after about 20 sec the app crashed with

compiler message: Unhandled exception:
compiler message: Type parameter #lib1::Store::StateBuilder is not indexed
compiler message: #0      TypeParameterIndexer.[] (package:kernel/binary/ast_to_binary.dart:2073:28)
compiler message: #1      BinaryPrinter.visitTypeParameterType (package:kernel/binary/ast_to_binary.dart:1703:38)
compiler message: #2      TypeParameterType.accept (package:kernel/ast.dart:5035:34)
compiler message: #3      BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
compiler message: #4      BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:238:7)
compiler message: #5      BinaryPrinter.visitInterfaceType (package:kernel/binary/ast_to_binary.dart:1652:7)
compiler message: #6      InterfaceType.accept (package:kernel/ast.dart:4738:34)
compiler message: #7      BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
compiler message: #8      BinaryPrinter.visitTypeParameter (package:kernel/binary/ast_to_binary.dart:1724:5)
compiler message: #9      TypeParameter.accept (package:kernel/ast.dart:5108:30)
compiler message: #10     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
compiler message: #11     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:238:7)
compiler message: #12     BinaryPrinter.visitClass (package:kernel/binary/ast_to_binary.dart:752:5)
compiler message: #13     Class.accept (package:kernel/ast.dart:905:30)
compiler message: #14     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
compiler message: #15     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:238:7)
compiler message: #16     BinaryPrinter.visitLibrary (package:kernel/binary/ast_to_binary.dart:616:5)
compiler message: #17     Library.accept (package:kernel/ast.dart:409:30)
compiler message: #18     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
compiler message: #19     List.forEach (dart:core/runtime/libgrowable_array.dart:274:8)
compiler message: #20     BinaryPrinter.writeLibraries (package:kernel/binary/ast_to_binary.dart:441:25)
compiler message: #21     BinaryPrinter.writeComponentFile (package:kernel/binary/ast_to_binary.dart:324:5)
compiler message: #22     serializeComponent (package:front_end/src/fasta/kernel/utils.dart:60:11)
compiler message: #23     serializeProcedure (package:front_end/src/fasta/kernel/utils.dart:96:10)
compiler message: #24     FrontendCompiler.compileExpression (package:vm/frontend_server.dart:452:16)
compiler message: <asynchronous suspension>
compiler message: #25     _FlutterFrontendCompiler.compileExpression (package:frontend_server/server.dart:55:22)
compiler message: #26     listenAndCompile.<anonymous closure> (package:vm/frontend_server.dart:650:20)
compiler message: <asynchronous suspension>
compiler message: #27     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
compiler message: #28     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
compiler message: #29     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
compiler message: #30     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
compiler message: #31     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
compiler message: #32     _StringAdapterSink.add (dart:convert/string_conversion.dart:268:11)
compiler message: #33     _LineSplitterSink._addLines (dart:convert/line_splitter.dart:154:13)
compiler message: #34     _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:129:5)
compiler message: #35     StringConversionSinkMixin.add (dart:convert/string_conversion.dart:189:5)
compiler message: #36     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
compiler message: #37     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
compiler message: #38     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
compiler message: #39     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
compiler message: #40     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
compiler message: #41     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
compiler message: #42     _StringAdapterSink.add (dart:convert/string_conversion.dart:268:11)
compiler message: #43     _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:273:7)
compiler message: #44     _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:348:20)
compiler message: #45     _Utf8ConversionSink.add (dart:convert/string_conversion.dart:341:5)
compiler message: #46     _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:86:18)
compiler message: #47     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
compiler message: #48     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
compiler message: #49     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
compiler message: #50     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
compiler message: #51     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
compiler message: #52     _StreamController._add (dart:async/stream_controller.dart:639:7)
compiler message: #53     _StreamController.add (dart:async/stream_controller.dart:585:5)
compiler message: #54     _Socket._onData (dart:io/runtime/binsocket_patch.dart:1714:41)
compiler message: #55     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
compiler message: #56     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
compiler message: #57     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
compiler message: #58     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
compiler message: #59     _StreamController._add (dart:async/stream_controller.dart:639:7)
compiler message: #60     _StreamController.add (dart:async/stream_controller.dart:585:5)
compiler message: #61     new _RawSocket.<anonymous closure> (dart:io/runtime/binsocket_patch.dart:1276:33)
compiler message: #62     _NativeSocket.issueReadEvent.issue (dart:io/runtime/binsocket_patch.dart:819:14)
compiler message: #63     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
compiler message: #64     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
compiler message: #65     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:113:13)
compiler message: #66     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:166:5)
Unhandled exception:
SocketException: Write failed (OS Error: Broken pipe, errno = 32), port = 0
#0      _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:1112:29)
#1      _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#2      _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#3      _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:113:13)
#4      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:166:5)

[✓] Flutter (Channel master, v0.5.8-pre.187, on Mac OS X 10.13.6 17G65, locale en-AT)
• Flutter version 0.5.8-pre.187 at /Users/zoechi/flutter/flutter
• Framework revision 12eff1d5da (32 hours ago), 2018-07-31 08:05:24 +0100
• Engine revision af855e063a
• Dart version 2.0.0-dev.69.4.flutter-08f59e5de3

area-vm crash

All 16 comments

How easy is to reproduce this crash, @zoechi ?

Haven't seen this in a while.
I'll reopen if I encounter it again.

compiler message: Unhandled exception:
compiler message: Type parameter #lib1::MiddlewareApi::StateBuilder is not indexed
compiler message: #0      TypeParameterIndexer.[] (package:kernel/binary/ast_to_binary.dart:2039:28)
compiler message: #1      BinaryPrinter.visitTypeParameterType (package:kernel/binary/ast_to_binary.dart:1674:38)
compiler message: #2      TypeParameterType.accept (package:kernel/ast.dart:4839:34)
compiler message: #3      BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
compiler message: #4      BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:238:7)
compiler message: #5      BinaryPrinter.visitInterfaceType (package:kernel/binary/ast_to_binary.dart:1625:7)
compiler message: #6      InterfaceType.accept (package:kernel/ast.dart:4578:34)
compiler message: #7      BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
compiler message: #8      BinaryPrinter.visitTypeParameter (package:kernel/binary/ast_to_binary.dart:1690:5)
compiler message: #9      TypeParameter.accept (package:kernel/ast.dart:4912:30)
compiler message: #10     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
compiler message: #11     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:238:7)
compiler message: #12     BinaryPrinter.visitClass (package:kernel/binary/ast_to_binary.dart:761:5)
compiler message: #13     Class.accept (package:kernel/ast.dart:921:30)
compiler message: #14     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
compiler message: #15     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:238:7)
compiler message: #16     BinaryPrinter.visitLibrary (package:kernel/binary/ast_to_binary.dart:616:5)
compiler message: #17     Library.accept (package:kernel/ast.dart:409:30)
compiler message: #18     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
compiler message: #19     List.forEach (dart:core/runtime/libgrowable_array.dart:275:8)
compiler message: #20     BinaryPrinter.writeLibraries (package:kernel/binary/ast_to_binary.dart:441:25)
compiler message: #21     BinaryPrinter.writeComponentFile (package:kernel/binary/ast_to_binary.dart:324:5)
compiler message: #22     serializeComponent (package:front_end/src/fasta/kernel/utils.dart:60:11)
compiler message: #23     serializeProcedure (package:front_end/src/fasta/kernel/utils.dart:97:10)
compiler message: #24     FrontendCompiler.compileExpression (package:vm/frontend_server.dart:473:16)
compiler message: <asynchronous suspension>
compiler message: #25     _FlutterFrontendCompiler.compileExpression (package:frontend_server/server.dart:55:22)
compiler message: #26     listenAndCompile.<anonymous closure> (package:vm/frontend_server.dart:671:20)
compiler message: <asynchronous suspension>
compiler message: #27     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
compiler message: #28     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
compiler message: #29     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
compiler message: #30     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
compiler message: #31     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
compiler message: #32     _StringAdapterSink.add (dart:convert/string_conversion.dart:268:11)
compiler message: #33     _LineSplitterSink._addLines (dart:convert/line_splitter.dart:154:13)
compiler message: #34     _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:129:5)
compiler message: #35     StringConversionSinkMixin.add (dart:convert/string_conversion.dart:189:5)
compiler message: #36     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
compiler message: #37     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
compiler message: #38     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
compiler message: #39     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
compiler message: #40     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
compiler message: #41     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
compiler message: #42     _StringAdapterSink.add (dart:convert/string_conversion.dart:268:11)
compiler message: #43     _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:273:7)
compiler message: #44     _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:348:20)
compiler message: #45     _Utf8ConversionSink.add (dart:convert/string_conversion.dart:341:5)
compiler message: #46     _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:86:18)
compiler message: #47     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
compiler message: #48     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
compiler message: #49     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
compiler message: #50     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
compiler message: #51     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
compiler message: #52     _StreamController._add (dart:async/stream_controller.dart:639:7)
compiler message: #53     _StreamController.add (dart:async/stream_controller.dart:585:5)
compiler message: #54     _Socket._onData (dart:io/runtime/binsocket_patch.dart:1714:41)
compiler message: #55     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)
compiler message: #56     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
compiler message: #57     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
compiler message: #58     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
compiler message: #59     _StreamController._add (dart:async/stream_controller.dart:639:7)
compiler message: #60     _StreamController.add (dart:async/stream_controller.dart:585:5)
compiler message: #61     new _RawSocket.<anonymous closure> (dart:io/runtime/binsocket_patch.dart:1276:33)
compiler message: #62     _NativeSocket.issueReadEvent.issue (dart:io/runtime/binsocket_patch.dart:819:14)
compiler message: #63     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
compiler message: #64     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
compiler message: #65     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
compiler message: #66     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)

[√] Flutter (Channel dev, v0.8.1, on Microsoft Windows [Version 10.0.17134.228], locale ru-RU)
• Flutter version 0.8.1 at C:flutter
• Framework revision 0235ec59d1 (2 days ago), 2018-09-06 20:23:13 -0700
• Engine revision 9b297b3b51
• Dart version 2.1.0-dev.3.1.flutter-760a9690c2

I am also seeing the exact error posted by @GRouslan . @GRouslan are you using built_redux? my errors are occurring in the built_redux middleware.

Yes

I'm using built_redux as well.

Thanks for the report. We'll try to reproduce this.

is there a way you can extract small repro for this @zoechi @GRouslan @jadengis ? I tried building small app with flutter_redux (0.5.2) and it seems to work fine and I am able to debug it as well.

It didn't happen for me anymore since a while, so I'll leave this to @GRouslan @jadengis

@aam This error is occuring for me with the built_redux v7.4.5 and flutter_built_redux v0.6.0, and I have experienced it in a couple projects when i put a breakpoint in one of the libraries Middleware closures.

I could try to put together a simpler reproduction case. Unfortunately, both of the projects where I have seen this issue are private.

I will post here this week as soon as I extract code essence.

Thank you folks in advance!

handshakes_strip.zip

  1. Put breakpoint
    step_1
  1. Start in debug mode
    step_2

  2. Press button
    step_3

It happens only after first click

Thank you @GRouslan !
Here is extracted repro t.dart:

abstract class Built<V extends Built<V, B>, B extends Builder<V, B>> {
}

abstract class Builder<V extends Built<V, B>, B extends Builder<V, B>> {
}

class MiddlewareApi<
    State extends Built<State, StateBuilder>,
    StateBuilder extends Builder<State, StateBuilder>> {
}

main() {
} 

run this via out/ReleaseX64/dart --observe --pause-isolates-on-start t.dart
Open observatory, set a breakpoint in main(), resume, once paused on breakpoint navigate to MiddlewareApi class and request evaluation of 'toString()' expression. This fails with

Unexpected exception:

ServerRpcException(Type parameter #lib1::MiddlewareApi::StateBuilder is not indexed
#0      TypeParameterIndexer.[] (package:kernel/binary/ast_to_binary.dart:2055:28)
#1      BinaryPrinter.visitTypeParameterType (package:kernel/binary/ast_to_binary.dart:1678:38)
#2      TypeParameterType.accept (package:kernel/ast.dart:4839:34)
#3      BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:250:10)
#4      BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:242:7)
#5      BinaryPrinter.visitInterfaceType (package:kernel/binary/ast_to_binary.dart:1629:7)
#6      InterfaceType.accept (package:kernel/ast.dart:4578:34)
#7      BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:250:10)
#8      BinaryPrinter.visitTypeParameter (package:kernel/binary/ast_to_binary.dart:1694:5)
#9      TypeParameter.accept (package:kernel/ast.dart:4912:30)
#10     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:250:10)
#11     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:242:7)
#12     BinaryPrinter.visitClass (package:kernel/binary/ast_to_binary.dart:765:5)
#13     Class.accept (package:kernel/ast.dart:921:30)
#14     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:250:10)
#15     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:242:7)
#16     BinaryPrinter.visitLibrary (package:kernel/binary/ast_to_binary.dart:620:5)
#17     Library.accept (package:kernel/ast.dart:409:30)
#18     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:250:10)
#19     List.forEach (dart:core/runtime/libgrowable_array.dart:278:8)
#20     BinaryPrinter.writeLibraries (package:kernel/binary/ast_to_binary.dart:445:25)
#21     BinaryPrinter.writeComponentFile (package:kernel/binary/ast_to_binary.dart:328:5)
#22     serializeComponent (package:front_end/src/fasta/kernel/utils.dart:60:11)
#23     serializeProcedure (package:front_end/src/fasta/kernel/utils.dart:97:10)
#24     _processExpressionCompilationRequest (file:///usr/local/google/home/aam/p/d/dart-sdk/sdk/pkg/vm/bin/kernel_service.dart:296:41)
<asynchronous suspension>
#25     _processLoadRequest (file:///usr/local/google/home/aam/p/d/dart-sdk/sdk/pkg/vm/bin/kernel_service.dart:367:11)
<asynchronous suspension>
#26     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
)

I looked at it further and have thoughts on how to fix it here: https://dart-review.googlesource.com/c/sdk/+/75241

cc @jensjoha @kmillikin

The fix landed in dart sdk as well as in Flutter (master branch).

Was this page helpful?
0 / 5 - 0 ratings