Closed MiKom closed 1 year ago
First frames of the backtrace show a this
null pointer:
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x40)
* frame #0: 0x0000000100044290 my_application`std::__1::vector<unsigned long, std::__1::allocator<unsigned long>>::begin[abi:v160006](this=0x0000000000000040 size=0) at vector:1423:30
frame #1: 0x0000000100044161 my_application`slint::Model<slint::SharedString>::track_row_data_changes(this=0x0000000000000000, row=0) const at slint.h:407:49
frame #2: 0x00000001000440c0 my_application`slint::Model<slint::SharedString>::row_data_tracked(this=0x0000000000000000, row=0) const at slint.h:418:9
frame #3: 0x0000000100043f58 my_application`auto slint::private_api::access_array_index<std::__1::shared_ptr<slint::Model<slint::SharedString>>>(model=nullptr, index=0) at slint.h:345:31
frame #4: 0x0000000100043f16 my_application`AppWindow::init(this=0x000060000029c330)::'lambda3'()::operator()() const at appwindow.h:1937:36
frame #5: 0x0000000100043e91 my_application`void slint::private_api::Property<slint::SharedString>::set_binding<AppWindow::init(this=0x00007ff7bfefcd88, user_data=0x000060000029c330, value=0x00007f8e4a80a8c8)::'lambda3'()>(AppWindow::init(AppWindow const*, vtable::VWeak<slint::cbindgen_private::ComponentVTable, vtable::Dyn>, unsigned long, unsigned long)::'lambda3'()) const::'lambda'(void*, void*)::operator()(void*, void*) const at slint_properties.h:97:53
Thanks a lot for the bug report!
Steps to reproduce:
ui/appwindow.slint
with:export global MySingleton { in property<[string]> my-model; } export component AppWindow inherits Window { in-out property counter: 42;
callback request-increase-value();
VerticalBox {
Text {
text: "Counter: {root.counter}";
}
ComboBox {
model: MySingleton.my-model;
}
Button {
text: "Increase value";
clicked => {
root.request-increase-value();
}
}
}
}