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

QOAuth2AuthorizationCodeFlow crash reading parameters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P1: Critical P1: Critical
    • None
    • 6.8.2
    • None
    • Windows 11 MSVC
    • Windows
    • Foundation Sprint 127

      Summary of the Strava Connect Test Application

      This test application demonstrates a crash in Qt's OAuth implementation when connecting to Strava. The root issue occurs in the setModifyParametersFunction callback, where a pointer to a parameter map is provided but becomes inaccessible in a deterministic manner.

      The Core Problem

      The crash specifically happens because:

      1. When setting up the OAuth flow, we provide a lambda function via setModifyParametersFunction that receives a QMultiMap<QString, QVariant> *parameters pointer.
      1. During the OAuth authorization process, this lambda is called with what appears to be a valid parameters pointer (non-null), but attempting to access or modify its contents causes a crash.
      1. This failure occurs consistently (deterministically) when working with Strava's OAuth implementation, suggesting either:
        • A timing/threading issue in Qt's OAuth implementation
        • A conflict with Strava's specific OAuth requirements
        • Memory management problems when processing OAuth parameters

      Key Components

      The application isolates this issue by implementing a minimal reproduction case focusing solely on the Strava authentication process:

      • A standalone implementation of strava_connect() that creates the OAuth flow
      • The exact parameter modification function that causes the crash
      • A complete OAuth callback handling setup

      This minimal test case allows the Qt team to observe and debug the exact conditions under which the pointer becomes inaccessible, leading to the crash.

        1. main-cpp.txt
          6 kB
          Roberto Viola
        2. image-2025-03-11-06-50-56-090.png
          184 kB
          Roberto Viola
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            roberto.viola Roberto Viola
            roberto.viola Roberto Viola
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes