Skip to content
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

Exceptions in runZonedExperimental's onDone are handled weirdly #12195

Closed
alxhub opened this issue Aug 1, 2013 · 3 comments
Closed

Exceptions in runZonedExperimental's onDone are handled weirdly #12195

alxhub opened this issue Aug 1, 2013 · 3 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-duplicate Closed in favor of an existing report library-async

Comments

@alxhub
Copy link

alxhub commented Aug 1, 2013

I expect the following Dart program to crash with an unhandled "Exceptional" Exception.

import "dart:async";

main() {
  runZonedExperimental(() {}, onDone: () {
    throw new Exception("Exceptional");
  });
}

Instead, it crashes on an assertion failure in async/zone.dart:
                                                                                                                                                                                                                                                                                                                                        
Unhandled exception:
'dart:async/zone.dart': Failed assertion: line 115 pos 12: '! _children.isEmpty' is not true.

­0 _ZoneBase._removeChild (dart:async/zone.dart:115:12)

­1 _ZoneBase._dispose (dart:async/zone.dart:48:31)

­2 _WaitForCompletionZone._dispose (dart:async/zone.dart:169:19)

­3 _ZoneBase._checkIfDone (dart:async/zone.dart:53:15)

­4 _ZoneBase._runInZone (dart:async/zone.dart:95:19)

­5 _ZoneBase._runUnguarded (dart:async/zone.dart:102:22)

­6 _WaitForCompletionZone.runWaitForCompletion (dart:async/zone.dart:166:30)

­7 runZonedExperimental (dart:async/zone.dart:262:37)

­8 main (test.dart:4:23)

It seems like onDone is not handling exceptions properly.

@justinfagnani
Copy link
Contributor

cc @floitschG.
Added Area-Library, Library-Async, C1, Triaged labels.

@floitschG
Copy link
Contributor

This looks suspiciously like issue #11969 which is a bug in the VM: issue #11972.
Marking as duplicate.


Added Duplicate label.
Marked as being merged into #11972.

@floitschG
Copy link
Contributor

Marked as being merged into #11969.

@alxhub alxhub added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-async closed-duplicate Closed in favor of an existing report labels Aug 2, 2013
This issue was closed.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-duplicate Closed in favor of an existing report library-async
Projects
None yet
Development

No branches or pull requests

4 participants