Get corrupt self
in service methods
#83
Chaoses-Ib
started this conversation in
General
Replies: 3 comments 3 replies
-
Some things to check:
|
Beta Was this translation helpful? Give feedback.
2 replies
-
Oh, the problem is the #[derive(Default)]
#[ffi_type(opaque)]
pub struct SearchResultDetail {
pub a: String,
pub b: bool
} and attempt to return it by value. There are two issues here:
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Yes, I agree. Created an issue #84, we should emit an error. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm sorry for another question, but this one has really been bothering me for a long time.
My Rust interface is:
And the C# binding generated by C# backend:
This looks good, but when I run it, I get a memory access exception:
When I change
index
to 3, the address will change at the same time:This means that the second argument
index
is used asself
, which is very strange.I have expanded the macro to see what was going on, but everything looks fine:
Do you have any idea?
Beta Was this translation helpful? Give feedback.
All reactions