Qt World Summit: Submit your Presentation

pthread send an error (qtloader.js)

  • Hey,

    currently I'm porting my PyQT based project (Pythonic) to Qt WASM.

    It general it works pretty well but I got stuck when I wanted to use multi-threading due to drag & drop support. I followed the instructions on the related wiki page:

    • Cloned the Qt Git-repository (git://code.qt.io/qt/qt5.git)
    • Checkout 5.15.1 branch
    • Init repository
    • Configured and build with emsdk 1.39.8

    To provide the webdata I run the eventlet WSGI server: I also set the header:

    alt text

    When I open http://localhost:7000/ on Firefox 81.0.1, I only see the Qt logo but it gets stuck during loading. The console output in Firefox says:

    pthread sent an error! qtloader.js:382:25

    The mentioned line in qtloader.js is only the Module.prinerr method so I assume that not the root cause.

    What could went wrong here?
    How can I further debug this issue?
    Should I have used Qt v5.15 instead of 5.15.1?

    You can reproduce the behavoir with the following steps:

    Thank you in advance!

  • Lifetime Qt Champion

    @banana-joe said in pthread send an error (qtloader.js):

    multi-threading due to drag & drop support

    Why do you need multi-threading for drag&drop?!

  • @jsulm I get an exception message when the exec() method (QDrag) is called (toolmaster.h: mousePressEvent). I thought it wad due to the missing multithreading support.

    This is the error message when I compile it with the default 5.15.1 binaries (console output in Firefox):

    Uncaught Please compile your program with async support in order to use asynchronous operations like emscripten_sleep

Log in to reply