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

WASM - QScreen::devicePixelRatio() fails outside of ui thread

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Won't Do
    • Affects Version/s: 6.2.0
    • Fix Version/s: None
    • Component/s: Other
    • Labels:
      None
    • Environment:
      Qt6.2 built from source with multithreading
      Windows: 10 20H2
      emsdk: 2.0.15
      chrome: Version 94.0.4606.81 (Offizieller Build) (64-Bit)
    • Platform/s:
      WebAssembly

      Description

      The example attached reproduces the issue.

      "Works" calls devicePixelRatio() in the ui thread and works.

      "Fails" calls it in another thread and fails. (this only happens in WebAssembly)

       

      I noticed this in my app that renders images in the background and accesses devicePixelRatio().

       

        Attachments

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

          Activity

            People

            Assignee:
            sorvig Morten Sørvig
            Reporter:
            Marscho Marscho
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes