Multithreading and QML
I started a qml-based Application. It does some expensive calculation inside a separate QThread and emits a signal to QML in order to update a ProgressBar.
However, setting the new ProgressBar value results in a segmentation fault and the debug info:
"Invalid parameter passed to C runtime function.
ASSERT: "engine->jsStackTop >= mark" in file ....\include\QtQml\5.2.0\QtQml/private/../../../../../src/qml/jsruntime/qv4scopedvalue_p.h, line 74"
I am pretty sure there is no mistake in my code. ;) So it just seems as if QML is not ready for this kind of multi-threading. Do you have any ideas or experience with multithreading and QML?
Make sure you emit that signal using a Qt::QueuedConnection.
check whether you are using QThread correctly.
Are you sure that signal is emitted inside another thread instead of main thread?
Vidar: How did you solved it? I came across the same problem...