Illegal instruction: 4 , when wrapping Db in an isolate.

Adam S avatarAdam S created an issue

I noticed a bug with "new Db('blah');" when wrapped in an isolate. I think this actually maybe a bug with the Dart VM. Either way do you want to do a little digging around? If not I will file a bug on dartbug.com on behalf of this issue. Here is the code: https://gist.github.com/2740632

Comments (5)

  1. vadimtsushko

    Hi, Adam. I narrowed it down somewhat. It definitely looks as bug in Dart VM for me. On my Windows 7 32bit machine code below hangs up dart script process.

    #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"));
    }
    
    
  2. Adam S

    Very interesting, I wasn't sure why that would of caused that, so I didn't even try breaking it out, Great job! Did you file it on dartbug?

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.