Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

seg fault: WorkerScript.onMessage called after destructor

$
0
0
I’ve started seeing a segmentation fault after adding a WorkerScript to load my ListModel. Rectangle {     Component.onDestruction: console.log('onDestruction')       ListModel { id: listModel; }       WorkerScript {         id: worker;         source: "worker.js";     } }   WorkerScript.onMessage = function(msg) {     console.log('onMessage++')     if (msg.action == 'clear') {         msg.model.clear();         msg.model.sync();     }     console.log('onMessage--') } I can see `WorkerScript.onMessage` is being called after `Component.onDestruction`. onDestruction onMessage++ Segmentation fault (core dumped) I presume this can happen if my WorkerScript is doing something time consuming when the destructor is called too. I don’t see any way for a WorkerScript to communicate back to the Component to say it’s busy or a way for the Component to stop a WorkerScript. I’ve tried Qt 4.8.4 and Qt 4.8.5. Edit: Problem still exists in Qt 4.8.6.

Viewing all articles
Browse latest Browse all 4972

Latest Images

Trending Articles



Latest Images