qml-rust icon indicating copy to clipboard operation
qml-rust copied to clipboard

Memory corruption

Open vchekan opened this issue 7 years ago • 0 comments

My application started exiting with status code 1 and I think one time I've seen signal 11 too. Investigation narrowed it down to this line:

 let mut local = $wrapper{
    origin: Box::new(origin),
    ptr: ::std::mem::uninitialized(),

I've replaced uninitialized() with zeroed() and my app is working again: https://github.com/vchekan/qml-rust/commit/21f25e63fab0f5cde73f6d95a66a56c7150e53f7

I do not understand qml low level api and I am not sure what is going on with pointer manipulations in $wrapper::with_no_props() and QmlObject::new() so i do not consider it a proper fix, so if somebody has insight, please share.

vchekan avatar May 03 '17 02:05 vchekan