-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Dart VM hangs if script use class with parameters in it constructor inside Isolate #3151
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
Comments
This comment was originally written by [email protected] On dart-sdk revision 7696 same results |
This comment was originally written by @financecoding On the Mac SDK |
There were a couple of fixes to isolate handling recently. Is this still an issue? |
This comment was originally written by [email protected] For me on dart-sdk revision 8121 (windows 7 32 bit) it works correctly now. |
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. |
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 <[email protected]> Commit-Queue: Jonas Jensen <[email protected]>
…8 revisions) https://dart.googlesource.com/dartdoc/+log/c64f800bd6a7..b0b0d6ace017 2022-09-13 [email protected] Use toList(growable:false) more (#3151) 2022-09-13 [email protected] Make Warnable.package non-nullable (#3155) 2022-09-13 [email protected] Update scorecard action to v2.0.3 (#3162) 2022-09-13 [email protected] Bump to 6.1.1 (#3161) 2022-09-12 [email protected] Allow analyzer 5.0.0 (#3160) 2022-09-12 [email protected] Make Extension.typeParameters late final (#3150) 2022-09-12 [email protected] Fix HTML of features (#3147) 2022-09-12 [email protected] 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 [email protected] 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: [email protected] Change-Id: I96e0843c13d07f35e1bab57cacaddd747f54e00b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259081 Commit-Queue: DEPS Autoroller <[email protected]> Reviewed-by: Devon Carew <[email protected]> Commit-Queue: Devon Carew <[email protected]>
This issue was originally filed by [email protected]
What steps will reproduce the problem?
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"));
}
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.
The text was updated successfully, but these errors were encountered: