Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send a closure to an isolate fails silently (dartC) #222

Closed
DartBot opened this issue Oct 24, 2011 · 4 comments
Closed

Send a closure to an isolate fails silently (dartC) #222

DartBot opened this issue Oct 24, 2011 · 4 comments
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue

Comments

@DartBot
Copy link

DartBot commented Oct 24, 2011

This issue was originally filed by mikk...@gl26.dk


What steps will reproduce the problem?
Run this code in try.dartlang.org:

class MyIsolate extends Isolate {
  void main() {
    this.port.receive((message, replyTo) {
      print("Message with received: ${message}");
    });
  }
}

void main() {
  var iso = new MyIsolate();
  var f = (a) { print(a); };
  
  iso.spawn().then((port) {
     port.send(f);
  });
}
Link: http://try.dartlang.org/s/krkd

What is the expected output? What do you see instead?
I was expecting an error/exception or the message Message with received: Object printed in the output section.

When running nothing visible happens. Changing the line
   port.send(f);
to
   port.send("Hello");
results in the message: Message with received: Hello in the out put section
link: http://try.dartlang.org/s/WcEd

What version of the product are you using? On what operating system?
trydart.

Please provide any additional information below.

@DartBot
Copy link
Author

DartBot commented Oct 24, 2011

This comment was originally written by mikk...@gl26.dk


Actually, even sending custom objects through the send method fails silently:

http://try.dartlang.org/s/OoMd

Kind regards,
Mikkel

@DartBot
Copy link
Author

DartBot commented Oct 25, 2011

This comment was originally written by ngeoffray@google.com


Set owner to @floitschG.
Added Area-Library, Triaged labels.

@floitschG
Copy link
Contributor

This is a bug in Dartboard. There is an exception thrown, but it is not intercepted by Dartboard.
When the program starts up the event-loop is wrapped into a try/catch. However the isolate code uses window.setTimeout for future iterations (to keep the UI responsive), and the second (and all future) iterations of the event-loop are not executed in Dartboard's try/catch anymore.

Example:
class Printer extends Isolate {
  main() {
    port.receive((message, replyTo) {
      else replyTo.send(message, null);
    });
  }
}

main() {
  new Printer().spawn().then((port) {
    port.call("bar").receive((msg, ignored) {
      throw "foo"; // <========== Is not caught by Dartboard.
    });
  });
}


Removed the owner.
Removed Area-Library label.
Added Area-Dartboard label.

@dgrove
Copy link
Contributor

dgrove commented Jan 11, 2013

At some point, we would like to create a next-generation Dartboard. In the meantime, dartboard has been deprecated.


Added WontFix label.

@kevmoo kevmoo added closed-not-planned Closed as we don't intend to take action on the reported issue and removed resolution-wont_fix labels Mar 1, 2016
copybara-service bot pushed a commit that referenced this issue Oct 21, 2022
args (https://github.com/dart-lang/args/compare/80d4abb..aaf671c):
  aaf671c  2022-10-20  Kevin Moore  Require Dart 2.18, update lints, update CI, add dependabot (#222)

async (https://github.com/dart-lang/async/compare/f3ed5f6..18a780e):
  18a780e  2022-10-20  Kevin Moore  Nit: fix analysis_options (#224)
  b6e7885  2022-10-20  Kevin Moore  Require Dart 2.18, latest lints, latest CI bits (#223)

lints (https://github.com/dart-lang/lints/compare/8294e56..16bdefe):
  16bdefe  2022-10-20  dependabot[bot]  Bump actions/checkout from 3.0.2 to 3.1.0 (#89)
  0fae4ee  2022-10-20  Devon Carew  update lint files docs (#88)

usage (https://github.com/dart-lang/usage/compare/9a98c89..fee1d9d):
  fee1d9d  2022-10-20  dependabot[bot]  Bump actions/checkout from 3.0.2 to 3.1.0 (#184)

webdev (https://github.com/dart-lang/webdev/compare/a02f073..81c5384):
  81c5384  2022-10-20  Nate Bosch  Migrate webdev tests to null safety (#1761)

Change-Id: I238d46cb5b24d64788862f06dc903a2cd2312725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265140
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
copybara-service bot pushed a commit that referenced this issue May 22, 2023
…wn, mockito, native, pool, pub_semver, shelf, sse, stack_trace, stream_channel, string_scanner, term_glyph, test, test_reflective_loader, tools

Revisions updated by `dart tools/rev_sdk_deps.dart`.

clock (https://github.com/dart-lang/clock/compare/fe85908..21caac1):
  21caac1  2023-05-21  Kevin Moore  Update formatting (#52)

collection (https://github.com/dart-lang/collection/compare/db2da48..f949b09):
  f949b09  2023-05-18  Graciliano Monteiro Passos  `CanonicalizedMap`: new `copy`, `toMap` and `toMapOfCanonicalKeys` methods (#261)

file (https://github.com/google/file.dart/compare/f05f5db..5d9a602):
  5d9a602  2023-05-19  Jacob MacDonald  remove no longer necessary override (#223)
  e4eebba  2023-05-19  Jacob MacDonald  release version 7.0.0 (#222)

glob (https://github.com/dart-lang/glob/compare/30f6aba..109121d):
  109121d  2023-05-19  Jacob MacDonald  allow latest file, update to latest dart_flutter_team_lints (#78)

json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/800843e..b2ed6bd):
  b2ed6bd  2023-05-22  Devon Carew  blast_repo fixes (#97)

logging (https://github.com/dart-lang/logging/compare/fa2486d..7ba155a):
  7ba155a  2023-05-22  Devon Carew  blast_repo fixes (#141)

markdown (https://github.com/dart-lang/markdown/compare/b951454..bd6ae8d):
  bd6ae8d  2023-05-22  Zhiguang Chen  Table should be able to interrupt other blocks (#545)
  0bc9d0e  2023-05-21  Devon Carew  blast_repo fixes (#544)

mockito (https://github.com/dart-lang/mockito/compare/28f174f..7c6d309):
  7c6d309  2023-05-18  Devon Carew  blast_repo fixes
  2c1b429  2023-05-19  Ilya Yanok  Extend using run-time dummy values to Futures

native (https://github.com/dart-lang/native/compare/3d89166..00832c9):
  00832c9  2023-05-22  Daco Harkes  [c_compiler] Increase test timeout on Windows (#47)
  06408e7  2023-05-22  Daco Harkes  [native_assets_cli] Fix example repostory url (#42)
  c614277  2023-05-19  dependabot[bot]  Bump nttld/setup-ndk (#45)
  67a2d20  2023-05-19  dependabot[bot]  Bump actions/labeler from 4.0.2 to 4.0.3 (#44)
  270700e  2023-05-18  Devon Carew  blast_repo fixes (#43)

pool (https://github.com/dart-lang/pool/compare/86b4f43..a10a0f9):
  a10a0f9  2023-05-22  Devon Carew  blast_repo fixes (#69)

pub_semver (https://github.com/dart-lang/pub_semver/compare/6dd1908..c034352):
  c034352  2023-05-22  Devon Carew  blast_repo fixes (#87)

shelf (https://github.com/dart-lang/shelf/compare/8793687..e7bab95):
  e7bab95  2023-05-19  Devon Carew  blast_repo fixes (#356)

sse (https://github.com/dart-lang/sse/compare/11ba89e..bfcbcd7):
  bfcbcd7  2023-05-19  Devon Carew  blast_repo fixes (#84)

stack_trace (https://github.com/dart-lang/stack_trace/compare/36fa0e1..86f7e30):
  86f7e30  2023-05-19  Devon Carew  blast_repo fixes (#132)

stream_channel (https://github.com/dart-lang/stream_channel/compare/a862e41..b1d3384):
  b1d3384  2023-05-19  Devon Carew  blast_repo fixes (#91)

string_scanner (https://github.com/dart-lang/string_scanner/compare/3bc6e54..6bb314f):
  6bb314f  2023-05-19  Devon Carew  blast_repo fixes (#58)

term_glyph (https://github.com/dart-lang/term_glyph/compare/3de5f1b..9d8956f):
  9d8956f  2023-05-19  Devon Carew  blast_repo fixes (#38)

test (https://github.com/dart-lang/test/compare/cdedf40..309596e):
  309596e4  2023-05-22  Devon Carew  blast_repo fixes (#2019)

test_reflective_loader (https://github.com/dart-lang/test_reflective_loader/compare/d1b763f..40d61b1):
  40d61b1  2023-05-19  Devon Carew  blast_repo fixes (#49)

tools (https://github.com/dart-lang/tools/compare/49da4ca..0eb4141):
  0eb4141  2023-05-18  Elias Yishak  Update usage guide for onboarding users (#90)

Change-Id: Id462318b1ea33bb1a6dea3c426d5306048a2cceb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304765
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
copybara-service bot pushed a commit that referenced this issue Jan 2, 2024
…watcher, yaml, yaml_edit

Revisions updated by `dart tools/rev_sdk_deps.dart`.

crypto (https://github.com/dart-lang/crypto/compare/63e9a90..f2efb98):
  f2efb98  2024-01-02  Kevin Moore  Require Dart 3.2, update and fix lints (#158)

logging (https://github.com/dart-lang/logging/compare/324a0b5..4d35a4e):
  4d35a4e  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#152)

mime (https://github.com/dart-lang/mime/compare/56359b0..ca9f059):
  ca9f059  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#111)

path (https://github.com/dart-lang/path/compare/115ea2a..57a049c):
  57a049c  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#157)
  5b6aac7  2023-12-20  Kevin Moore  blast_repo fixes (#156)

pool (https://github.com/dart-lang/pool/compare/3c1bd42..4c49000):
  4c49000  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#79)
  7e03d80  2023-12-20  Kevin Moore  blast_repo fixes (#78)

shelf (https://github.com/dart-lang/shelf/compare/b3adc7c..733588f):
  733588f  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#401)
  1eab426  2024-01-01  dependabot[bot]  Bump actions/labeler from 4.3.0 to 5.0.0 (#402)
  10cbffe  2023-12-14  Kevin Moore  Run web tests with wasm with dev Dart sdk (#398)

stack_trace (https://github.com/dart-lang/stack_trace/compare/4abff44..0f4710c):
  0f4710c  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#148)

tools (https://github.com/dart-lang/tools/compare/ed81684..2f59ab4):
  2f59ab4  2024-01-02  Daco Harkes  [graphs] Clean up lints for Dart 3.3 (#221)
  01fa883  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#223)
  9d4fe2f  2024-01-01  dependabot[bot]  Bump actions/labeler from 4.3.0 to 5.0.0 (#222)
  6d260b8  2023-12-14  Elias Yishak  Update USAGE_GUIDE to update the `flutterChannelCount` key in `LogFileStats` (#219)
  56a30ce  2023-12-11  Elias Yishak  Add `enabledFeatures` key to `Analytics` constructors (#217)

watcher (https://github.com/dart-lang/watcher/compare/dc45f19..66cd694):
  66cd694  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#161)
  679d308  2023-12-20  Kevin Moore  blast_repo fixes (#160)

yaml (https://github.com/dart-lang/yaml/compare/98a3aab..509fd72):
  509fd72  2023-12-11  Kevin Moore  update lints, require Dart 3.0 (#156)

yaml_edit (https://github.com/dart-lang/yaml_edit/compare/9b9d33c..47eb20e):
  47eb20e  2024-01-01  dependabot[bot]  Bump actions/stale from 8.0.0 to 9.0.0 (#63)
  a39ec39  2023-12-20  Kevin Moore  blast_repo fixes (#62)

Change-Id: I8009f4957a0eb751f36c2ec1be8aacbfc44ca586
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue
Projects
None yet
Development

No branches or pull requests

4 participants