QML crash QObjectWrapper::wrap / getProperty
-
This is the stack trace: http://pastebin.com/6wuUh12x
It doesn't really help me other than tell me that it might have to do with property bindings; I don't think that posting the code will help since it's not that simple and wouldn't want to flood you guys with code!
Where have you seen this kind of error before? Thanks for the help!
EDIT: I found out that it crashes in this timer I have
Timer { running: true; interval: 100; repeat: true; onTriggered: { if (delegateState && delegateState.machine && stateListModel) { if (!delegateState.machine.state) { stateListModel.setProperty(index, "delegateIsMachineCurrentState", false); } else { stateListModel.setProperty(index, "delegateIsMachineCurrentState", (delegateState.name === delegateState.machine.state.name) ? true : false); if (delegateIsMachineCurrentState) stateListModel.setProperty(index, "delegateIsCurrentStatePlaying", delegateState.machine.currentStatePlaying()); } if (!delegateIsMachineCurrentState) stateListModel.setProperty(index, "delegateIsCurrentStatePlaying", false); } } }
EDIT 2: I just found out that it crashes when I call delegateState.machine, which is a q_property that returns a pointer (constant, no notify)... I find it strange since I check just want to check if it's null or not!
-
@Pheelbert Have you registered the
machine
class ? Ofcourse if it weren't console would have showed the error. AFAIK checkingnull
in that way should work. -
Are you certain that you're not running into https://bugreports.qt.io/browse/QTBUG-40448 by any chance?
-
@chrisadams I think so, I ended up reacting to a signal (from the collection of 'machines') instead of using a timer and I don't have an issue anymore!