-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Dart2JS Compiler Crash Error #24057
Comments
Can you provide the dart file that cause the crash? |
It's the main file for an entire project. UIInteraction initializes a lot of different classes and objects for a web application. But here's the main.dart file contents itself: import 'UIInteraction.dart'; void main() { |
Is the project somewhere I can access? On Wed, Aug 12, 2015, 11:54 AM curtis-robert notifications@github.com
|
Alright, sorry about the delay. I couldn't figure out how to upload the file here, so it's at this link, named "problemFile.DART": I went through my project and found that this file was the point where the conversion failed. I've figured out that it is able to add a few of the <key, value> pairs to the Map, but at a certain point the Dart2JS conversion fails. I say certain point because it's not the same point every time. For example, the conversion works when I put a return statement at line 646, right before adding the key "Line31" to the the map, but then it doesn't if I remove the return statement (which makes it look like that key may be the problem). However, if I comment out the adding of keys "Line16", "Line19", "Line22", "Line25", and "Line28", and then put the return statement after "Line31" it works. |
You could try a couple of things:
class MapOverlayDictionary {
Map horizonCoordinates;
MapOverlayDictionary() {
initializeMap();
}
void initializeMap() {
horizonCoordinates = _data;
}
static var _data = {
"Bus1": [new LatLng(46.7545166, -122.865112),
new LatLng(46.7545204, -122.864334),
new LatLng(46.7536354, -122.864288),
new LatLng(46.7534904, -122.864418),
new LatLng(46.7534904, -122.864632),
new LatLng(46.7536507, -122.864784),
new LatLng(46.7541847, -122.864822),
new LatLng(46.7542534, -122.864868),
new LatLng(46.7544022, -122.865112),
new LatLng(46.7545166, -122.865112)],
"Bus2": [ ... ]
};
}
class MapOverlayDictionary {
Map horizonCoordinates;
MapOverlayDictionary() {
initializeMap();
}
void initializeMap() {
horizonCoordinates = new Map();
part1() {
horizonCoordinates["Bus1"] = [
new LatLng(46.7545166, -122.865112),
new LatLng(46.7545204, -122.864334),
new LatLng(46.7536354, -122.864288),
new LatLng(46.7534904, -122.864418),
new LatLng(46.7534904, -122.864632),
new LatLng(46.7536507, -122.864784),
new LatLng(46.7541847, -122.864822),
new LatLng(46.7542534, -122.864868),
new LatLng(46.7544022, -122.865112),
new LatLng(46.7545166, -122.865112)
];
}
part2() { ... }
...
part1();
part2();
...
} |
I'm moving this to #24635 since I have added a test for this problem. |
D:\projectFolder\web>dart2js --out=main.dart.js main.dart
main.dart:
Internal Error: The compiler crashed when compiling this element.
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:
below as well as the source location above).
The compiler crashed: Stack Overflow
#0 Compiler.run.<run_async_body> (file:///e:/b/build/slave/dart-sdk-windows
-stable/build/sdk/pkg/compiler/lib/src/apiimpl.dart)
#1 _asyncCatchHelper. (dart:core-patch/core_patch.dart:1
#2 _RootZone.runBinary (dart:async/zone.dart:1171)
#3 _Future._propagateToListeners.handleError (dart:async/future_impl.dart:5
#4 _Future._propagateToListeners (dart:async/future_impl.dart:580)
#5 _Future._completeWithValue (dart:async/future_impl.dart:368)
#6 _Future._asyncComplete. (dart:async/future_impl.dart:
#7 _microtaskLoop (dart:async/schedule_microtask.dart:43)
#8 _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)
#9 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#10 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dar
t:149)
#11 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dar
t:149)
#13 _Future._asyncComplete. (dart:async/future_impl.dart:
#14 _microtaskLoop (dart:async/schedule_microtask.dart:43)
#15 _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)
#16 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
#17 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dar
t:149)
The text was updated successfully, but these errors were encountered: