You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MonoObject* pointers must be stored by value, not by reference to pointer.
I think this is easy to reproduce using any method that takes Object by pointer value:
let object:Object = /*...*/;let method:Method<(Object,)> = /*...*/;// This works fineletmut params = [object.get_ptr()];
wrapped_mono::binds::mono_runtime_invoke(method.get_ptr(),0as_, params.as_mut_ptr()as_,0as_);// This crashes
method.invoke(None,(object,));
The text was updated successfully, but these errors were encountered:
The issue is a bit more complicated, and looking back at the source code, there are some other glaring problems that need fixing(C-style layout of tuples is assumed, when it should not be).
I will try to fix this soon, but I can't guarantee any timelines.
Method::invoke
Implementation works fine only with value types like integers. UsingObject
in method signature breaks it and causing crashes.wrapped_mono/src/method.rs
Lines 207 to 215 in fac74e2
Actual problem is in
get_ptrs
methodwrapped_mono/src/method.rs
Lines 213 to 215 in fac74e2
args
is the tuple of pointers and values.But
get_ptrs
implementations treat allargs
members like values, creating pointers to each:wrapped_mono/src/tupleutilis.rs
Lines 32 to 40 in fac74e2
MonoObject*
pointers must be stored by value, not by reference to pointer.I think this is easy to reproduce using any method that takes
Object
by pointer value:The text was updated successfully, but these errors were encountered: