Seg fault: WorkerScript.onMessage called after destructor

  • I've started seeing a segmentation fault after adding a WorkerScript to load my ListModel.

    Component.onDestruction: console.log('onDestruction')

    ListModel { id: listModel; }
    WorkerScript {
        id: worker;
        source: "worker.js";


    WorkerScript.onMessage = function(msg)
    if (msg.action == 'clear') {

    I can see WorkerScript.onMessage is being called after Component.onDestruction.

    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.

  • Filed a bug:

    Loader and WorkerScript don't work well together.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.