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

Screencapture example crashes on permission granted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.8.4, 6.9.1, 6.10.0 Beta3
    • 6.8.3, 6.9.0
    • Multimedia
    • None
    • Android
    • 175588693 (dev), e506e36ec (6.9), 8e5dbf7b4 (tqtc/lts-6.8)
    • Multimedia, weeks 15-16, Multimedia, weeks 18-19

    Description

      When trying to boot the screencapture example on Android, you get immediately prompted to give permission to start a capture. If you then grant the permission, the example will immediately crash with the following error log:

      D/CompatibilityChangeReporter: Compat change id reported: 78294732; UID 10291; state: ENABLED
      D/AndroidRuntime: Shutting down VM
      E/AndroidRuntime: FATAL EXCEPTION: main
      E/AndroidRuntime: Process: org.qtproject.example.screencapture, PID: 22898
      E/AndroidRuntime: java.lang.RuntimeException: Unable to create service org.qtproject.qt.android.multimedia.QtScreenCaptureService: java.lang.IllegalAccessException: java.lang.Class<org.qtproject.qt.android.multimedia.QtScreenCaptureService> is not accessible from java.lang.Class<android.app.AppComponentFactory>
      E/AndroidRuntime:     at android.app.ActivityThread.handleCreateService(ActivityThread.java:5111)
      E/AndroidRuntime:     at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
      E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2506)
      E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:106)
      E/AndroidRuntime:     at android.os.Looper.loopOnce(Looper.java:230)
      E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:319)
      E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:8919)
      E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
      E/AndroidRuntime:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
      E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
      E/AndroidRuntime: Caused by: java.lang.IllegalAccessException: java.lang.Class<org.qtproject.qt.android.multimedia.QtScreenCaptureService> is not accessible from java.lang.Class<android.app.AppComponentFactory>
      E/AndroidRuntime:     at java.lang.Class.newInstance(Native Method)
      E/AndroidRuntime:     at android.app.AppComponentFactory.instantiateService(AppComponentFactory.java:129)
      E/AndroidRuntime:     at androidx.core.app.CoreComponentFactory.instantiateService(CoreComponentFactory.java:74)
      E/AndroidRuntime:     at android.app.ActivityThread.handleCreateService(ActivityThread.java:5073)
      E/AndroidRuntime:     ... 9 more 

      The issue has been observed on two of my devices:
      Motorola Razr 40 Ultra, running Android 15
      Samsung Galaxy Tab A8, running Android 14

      I believe this is a regression, because this was working when the Android support was implemented.

      Attachments

        For Gerrit Dashboard: QTBUG-136191
        # Subject Branch Project Status CR V

        Activity

          People

            npskalerud Nils Petter Skålerud
            npskalerud Nils Petter Skålerud
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes