Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Multithreading and QML
Qt 6.11 is out! See what's new in the release blog

Multithreading and QML

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 4 Posters 3.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vidar
    wrote on last edited by
    #1

    Hi,

    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?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Make sure you emit that signal using a Qt::QueuedConnection.

      (Z(:^

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Vincent007
        wrote on last edited by
        #3

        check whether you are using QThread correctly.
        Are you sure that signal is emitted inside another thread instead of main thread?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MatesCZ
          wrote on last edited by
          #4

          Vidar: How did you solved it? I came across the same problem...

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved