Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-101682

QtWebAssembly: Uncaught exception when using QWebSocket::sendBinaryMessage() with threaded application

    XMLWordPrintable

Details

    • WebAssembly
    • b7fc0d54b8 (qt/qtwebsockets/dev) b7fc0d54b8 (qt/tqtc-qtwebsockets/dev) b7fc0d54b8 (qt/qtwebsockets/6.4) b7fc0d54b8 (qt/tqtc-qtwebsockets/6.4) b7fc0d54b8 (qt/qtwebsockets/6.4.0) b7fc0d54b8 (qt/qtwebsockets/6.4.1)

    Description

      When sending data with QWebSocket::sendBinaryMessage(), following error is thwon immediately:

      qwidget-login-test.worker.js:165 worker.js onmessage() captured an uncaught exception: TypeError: caller is not a function
      onmessage @ qwidget-login-test.worker.js:165
      qwidget-login-test.worker.js:166 TypeError: caller is not a function
      at __emval_call_void_method (blob:http://localhost:30000/50e9e32f-cbb2-4c6f-b9ff-4b7f756d8de3:7646:7)
      at QWebSocketPrivate::sendBinaryMessage(QByteArray const&) (qwidget-login-test.wasm)
      at QWebSocket::sendBinaryMessage(QByteArray const&) (qwidget-login-test.wasm)
      at CtiLib::sendRequest(QString const&, bool) (qwidget-login-test.wasm)
      at CtiLib::sendAuth() (qwidget-login-test.wasm)
      at CtiLib::handleConnection() (qwidget-login-test.wasm)
      at QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (CtiLib::*)()>::call(void (CtiLib::*)(), CtiLib*, void**) (qwidget-login-test.wasm)
      at void QtPrivate::FunctionPointer<void (CtiLib::*)()>::call<QtPrivate::List<>, void>(void (CtiLib::*)(), CtiLib*, void**) (qwidget-login-test.wasm)
      at QtPrivate::QSlotObject<void (CtiLib::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (qwidget-login-test.wasm)
      at QMetaCallEvent::placeMetaCall(QObject*) (qwidget-login-test.wasm)
      onmessage @ qwidget-login-test.worker.js:166
      qtloader.js:382 pthread sent an error! http://localhost:30000/qwidget-login-test.worker.js:167: Uncaught [object MessageEvent]
      qwidget-login-test.worker.js:167 Uncaught MessageEvent
      

      This problem reproduces with a qtwebassembly build that has threads enabled. Does not reproduce with the prebuild qt kit.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lpotter Lorn Potter
            jussi_witick Jussi Witick
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes