alexeieleusis/greencat

Greencat crashes the dart compiler

sturmf opened this issue · 5 comments

Hi, it seems I can no longer use greencat, the compiler crashes when I use it. Right now I am not sure if it is the compiler at fault or if it trips on some problematic code.

My dart SDK version is Dart VM version: 1.21.1.

The compiler crashed when compiling this element.
Store.createStore(Reducer<S, A> reducer, {S initialState, Function enhancer})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The compiler is broken.

When compiling the above element, the compiler crashed. It is not
possible to tell if this is caused by a problem in your program or
not. Regardless, the compiler should not crash.

The Dart team would greatly appreciate if you would take a moment to
report this problem at http://dartbug.com/new.

Please include the following information:

  • the name and version of your operating system,

  • the Dart SDK build number (build number could not be determined), and

  • the entire message you see here (including the full stack trace
    below as well as the source location above).

Build error:
Transform Dart2JS on frontend|test/event_list_test.dart.browser_test.dart threw error: RangeError (index): Invalid value: Not in range 0..2, inclusive: 3
dart:core List.[]
package:compiler_unsupported/src/ssa/codegen.dart 2995 SsaCodeGenerator.visitTypeInfoExpression.
package:compiler_unsupported/src/js_backend/runtime_types.dart 801 TypeRepresentationGenerator.visitTypeVariableType
package:compiler_unsupported/src/dart_types.dart 233 TypeVariableType.accept
package:compiler_unsupported/src/js_backend/runtime_types.dart 798 TypeRepresentationGenerator.visit
package:compiler_unsupported/src/js_backend/runtime_types.dart 819 TypeRepresentationGenerator.visitList
package:compiler_unsupported/src/js_backend/runtime_types.dart 810 TypeRepresentationGenerator.visitInterfaceType
package:compiler_unsupported/src/dart_types.dart 552 InterfaceType.accept
package:compiler_unsupported/src/js_backend/runtime_types.dart 798 TypeRepresentationGenerator.visit
package:compiler_unsupported/src/js_backend/runtime_types.dart 819 TypeRepresentationGenerator.visitList
package:compiler_unsupported/src/js_backend/runtime_types.dart 861 TypeRepresentationGenerator.visitFunctionType
package:compiler_unsupported/src/dart_types.dart 730 FunctionType.accept
package:compiler_unsupported/src/js_backend/runtime_types.dart 798 TypeRepresentationGenerator.visit
package:compiler_unsupported/src/js_backend/runtime_types.dart 787 TypeRepresentationGenerator.getTypeRepresentation
package:compiler_unsupported/src/js_backend/runtime_types.dart 612 _RuntimeTypesEncoder.getTypeRepresentation
package:compiler_unsupported/src/ssa/codegen.dart 2994 SsaCodeGenerator.visitTypeInfoExpression
package:compiler_unsupported/src/ssa/nodes.dart 3365 HTypeInfoExpression.accept
package:compiler_unsupported/src/ssa/codegen.dart 661 SsaCodeGenerator.visit
package:compiler_unsupported/src/ssa/codegen.dart 667 SsaCodeGenerator.visitExpression
package:compiler_unsupported/src/ssa/codegen.dart 648 SsaCodeGenerator.use
package:compiler_unsupported/src/ssa/codegen.dart 2987 SsaCodeGenerator.visitTypeInfoExpression
package:compiler_unsupported/src/ssa/nodes.dart 3365 HTypeInfoExpression.accept
package:compiler_unsupported/src/ssa/codegen.dart 661 SsaCodeGenerator.visit
package:compiler_unsupported/src/ssa/codegen.dart 667 SsaCodeGenerator.visitExpression
package:compiler_unsupported/src/ssa/codegen.dart 648 SsaCodeGenerator.use
package:compiler_unsupported/src/ssa/codegen.dart 538 SsaCodeGenerator.visitArguments
package:compiler_unsupported/src/ssa/codegen.dart 1827 SsaCodeGenerator.visitInvokeStatic
package:compiler_unsupported/src/ssa/nodes.dart 1667 HInvokeStatic.accept
package:compiler_unsupported/src/ssa/codegen.dart 661 SsaCodeGenerator.visit
package:compiler_unsupported/src/ssa/codegen.dart 667 SsaCodeGenerator.visitExpression
package:compiler_unsupported/src/ssa/codegen.dart 633 SsaCodeGenerator.define
package:compiler_unsupported/src/ssa/codegen.dart 1287 SsaCodeGenerator.iterateBasicBlock
package:compiler_unsupported/src/ssa/codegen.dart 1177 SsaCodeGenerator.visitBasicBlock
package:compiler_unsupported/src/ssa/codegen.dart 1434 SsaCodeGenerator.visitGoto
package:compiler_unsupported/src/ssa/nodes.dart 2181 HGoto.accept
package:compiler_unsupported/src/ssa/codegen.dart 661 SsaCodeGenerator.visit
package:compiler_unsupported/src/ssa/codegen.dart 1292 SsaCodeGenerator.iterateBasicBlock
package:compiler_unsupported/src/ssa/codegen.dart 1177 SsaCodeGenerator.visitBasicBlock
package:compiler_unsupported/src/ssa/codegen.dart 375 SsaCodeGenerator.visitGraph
package:compiler_unsupported/src/ssa/codegen.dart 90 SsaCodeGeneratorTask.generateMethod.
package:compiler_unsupported/src/common/tasks.dart 63 CompilerTask.measure
package:compiler_unsupported/src/ssa/codegen.dart 84 SsaCodeGeneratorTask.generateMethod
package:compiler_unsupported/src/ssa/codegen.dart 66 SsaCodeGeneratorTask.generateCode
package:compiler_unsupported/src/ssa/ssa.dart 43 SsaFunctionCompiler.compile
package:compiler_unsupported/src/js_backend/backend.dart 1548 JavaScriptBackend.codegen
package:compiler_unsupported/src/common/codegen.dart 243 CodegenWorkItem.run
package:compiler_unsupported/src/compiler.dart 866 Compiler.emptyQueue.....
package:compiler_unsupported/src/common/tasks.dart 176 CompilerTask.measureSubtask
package:compiler_unsupported/src/compiler.dart 866 Compiler.emptyQueue....
package:compiler_unsupported/src/common/tasks.dart 176 CompilerTask.measureSubtask
package:compiler_unsupported/src/compiler.dart 864 Compiler.emptyQueue...
package:compiler_unsupported/src/compiler.dart 1623 CompilerDiagnosticReporter.withCurrentElement
package:compiler_unsupported/src/compiler.dart 862 Compiler.emptyQueue..
package:compiler_unsupported/src/enqueue.dart 749 EnqueuerStrategy.processWorkItem
package:compiler_unsupported/src/js_backend/enqueuer.dart 452 CodegenEnqueuer.forEach
package:compiler_unsupported/src/compiler.dart 858 Compiler.emptyQueue.
package:compiler_unsupported/src/common/tasks.dart 176 CompilerTask.measureSubtask
package:compiler_unsupported/src/compiler.dart 857 Compiler.emptyQueue
package:compiler_unsupported/src/compiler.dart 886 Compiler.processQueue.
package:compiler_unsupported/src/common/tasks.dart 176 CompilerTask.measureSubtask
package:compiler_unsupported/src/compiler.dart 875 Compiler.processQueue
package:compiler_unsupported/src/compiler.dart 757 Compiler.compileLoadedLibraries.
package:compiler_unsupported/src/common/tasks.dart 176 CompilerTask.measureSubtask
package:compiler_unsupported/src/compiler.dart 646 Compiler.compileLoadedLibraries
package:compiler_unsupported/src/compiler.dart 554 Compiler.runInternal.

Build completed with 2 errors.

Thanks for your report, did you report this also to the https://github.com/dart-lang/sdk team?

I don't know how to reproduce this bug, can you please provide more info? I guess there will be a problem with one of greencat dependencies not being strong mode.

Can you try upgrading greencat to 0.0.2? Which upgrades dependency on tuple to a strong mode compliant version

Hi, sorry for the delay. I now ported everything to the latest package versions. Unfortunately that meant to get rid of the dson package which took me a while.
Now everything is up to date again, but I still get the crash. It also still tells me it is using the unsupported compiler. But I have no idea why. I did not select it n purpose.
The code is here: https://github.com/sturmf/regatta-angular2/tree/REG-51-switch-to-redux-arc
Maybe my pubspec.yam is wrong?

To get the crash you need to change into the frontend directory and in one console do a make run and in the other a make tests. I am rrunning this on Ubuntu 16.04.
Sorry that I don't have a smaller sample.

This looks like a problem with the compiler itself.