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

Dart VM hangs if script use class with parameters in it constructor inside Isolate #3151

Closed
DartBot opened this issue May 20, 2012 · 6 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. closed-cannot-reproduce Closed as we were unable to reproduce the reported issue

Comments

@DartBot
Copy link

DartBot commented May 20, 2012

This issue was originally filed by VadimTs...@gmail.com


What steps will reproduce the problem?

  1. Paste code below into new dart script - test_isolate.dart:

import("dart:isolate");

class TestClass{
  String strField;
  TestClass(this.strField);
}

Future<String> someFunction(msg) {
  print('someFunction called with param $msg');
  Completer completer = new Completer();
  // Next line caused dart vm hangup.
  TestClass test = new TestClass('asdfadsf');
  
  completer.complete("some dummy data");
  return completer.future;
}

new_isolate() {
  port.receive((msg, reply) {
    Future f = someFunction(msg);
    f.then((r)=>reply.send(r));
  });
}

main() {
  spawnFunction(new_isolate).call("testMessage").then((s)=>print("result = $s"));
}

  1. Invoke dart on script test_isolate.dart

What is the expected output?
>> someFunction called with param testMessage
>> result = some dummy data

What do you see instead?
 -- Dart process hangs up.

Another twist: Script works successfully with line
 -- TestClass test = new TestClass('asdfadsf');
modified to
 -- var test = new TestClass('asdfadsf');

What version of the product are you using? On what operating system?
Dart-sdk revision 7552
Windows 7 32bit.

@DartBot
Copy link
Author

DartBot commented May 20, 2012

This comment was originally written by VadimTsushko...@gmail.com


On dart-sdk revision 7696 same results

@DartBot
Copy link
Author

DartBot commented May 20, 2012

This comment was originally written by @financecoding


On the Mac SDK
$ cat ~/Documents/DartEditor/dart/dart-sdk/revision
7708
This code executes without failing when test is var or TestCase. The code here https://gist.github.com/2740632 does fail.

@iposva-google
Copy link
Contributor

Added Area-VM, Triaged labels.

@iposva-google
Copy link
Contributor

There were a couple of fixes to isolate handling recently. Is this still an issue?

@DartBot
Copy link
Author

DartBot commented Jun 2, 2012

This comment was originally written by VadimTs...@gmail.com


For me on dart-sdk revision 8121 (windows 7 32 bit) it works correctly now.

@turnidge
Copy link
Contributor

turnidge commented Jun 6, 2012

It sounds like the recent isolate fixes corrected the problem. Closing the bug. Please reopen if the bug shows up again.


Set owner to @turnidge.
Added CannotReproduce label.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. closed-cannot-reproduce Closed as we were unable to reproduce the reported issue labels Jun 6, 2012
copybara-service bot pushed a commit that referenced this issue Sep 28, 2021
Changes:
```
> git log --format="%C(auto) %h %s" 15a46117da29cc572fba620241c83a2117cdae09..a817863ee93241ff36fce6856c6d12fd8fde0907
 a817863e Use pool for file reading (#3156)
 59237e29 Don't ask packageLister for availabe versions (#3151)
 f2f86c01 Fix analyze errors (#3148)
 39c9779c Environment credentials support (#3115)
 f0020823 Improved handling for authentication errors (#3120)
 1bb9f923 Migrate ignore.dart to null-safety (#3142)

```

Change-Id: I01d6637e3de8e523596394383393f5eda1a728c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214804
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
copybara-service bot pushed a commit that referenced this issue Sep 13, 2022
…8 revisions)

https://dart.googlesource.com/dartdoc/+log/c64f800bd6a7..b0b0d6ace017

2022-09-13 srawlins@google.com Use toList(growable:false) more (#3151)
2022-09-13 srawlins@google.com Make Warnable.package non-nullable (#3155)
2022-09-13 parlough@gmail.com Update scorecard action to v2.0.3 (#3162)
2022-09-13 srawlins@google.com Bump to 6.1.1 (#3161)
2022-09-12 srawlins@google.com Allow analyzer 5.0.0 (#3160)
2022-09-12 srawlins@google.com Make Extension.typeParameters late final (#3150)
2022-09-12 srawlins@google.com Fix HTML of features (#3147)
2022-09-12 srawlins@google.com Improve assert of function typedef (#3158)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I96e0843c13d07f35e1bab57cacaddd747f54e00b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259081
Commit-Queue: DEPS Autoroller <dart-autoroll@skia-public.iam.gserviceaccount.com>
Reviewed-by: Devon Carew <devoncarew@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
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. closed-cannot-reproduce Closed as we were unable to reproduce the reported issue
Projects
None yet
Development

No branches or pull requests

3 participants