calling toString on function proxies returned from .NET causes an exception #33

Open
tjanczuk opened this Issue Mar 29, 2013 · 1 comment

Comments

Projects
None yet
1 participant
Owner

tjanczuk commented Mar 29, 2013

var func = edge.func(function () {/*
    async (input) => 
    {
        return (Func<object,Task<object>>)(async (i) => { return "Hello"; });            
    }
*/});

func(null, function (error, result) {
    console.log(result);
});

throws

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indi
cation that other memory is corrupt.
   at v8.Function.Call(Function* , Local<v8::Value>* , Handle<v8::Object> , Int32 , Handle<v8::Value>* )
   at ClrFuncInvokeContext.CompleteOnV8Thread(Handle<v8::Value>* , Boolean completedSynchronously) in c:\projects\edge\s
rc\clrfuncinvokecontext.cpp:line 121
   at ClrFunc.Call(Handle<v8::Value>* , Handle<v8::Value> payload, Handle<v8::Value> callback) in c:\projects\edge\src\c
lrfunc.cpp:line 370
   at clrFuncProxy(Handle<v8::Value>* , Arguments* args) in c:\projects\edge\src\clrfunc.cpp:line 9
Owner

tjanczuk commented Mar 29, 2013

It appears to be due to the External property hanging off of the function instance in JavaScript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment