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

Guard against potential NullPointerException for QtActivityDelegate

    XMLWordPrintable

Details

    • Android
    • 64f152d52 (dev), f7aadf60d (6.8)
    • 2024wk42s3FOQtforAndroid, 2024wk44s3FOQtforAndroid

    Description

      There could be a NullPointerException when calling display manager or input delegate using the QtDelegate instance, similar to:

      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: FATAL EXCEPTION: main
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: Process: org.qtproject.example.tst_qsignalspy, PID: 5377
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.qtproject.qt.android.QtDisplayManager.setSystemUiVisibility(int)' on a null object reference
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at org.qtproject.qt.android.QtActivityBase.onRestoreInstanceState(QtActivityBase.java:285)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at android.app.Activity.performRestoreInstanceState(Activity.java:1787)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1503)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3823)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:225)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:205)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:177)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:98)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:205)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:294)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8177)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.314  5377  5377 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
      agent:2024/10/04 23:58:22 build.go:404: 10-04 23:58:21.337  5377  5377 I Process : Sending signal. PID: 5377 SIG: 9 

      This comes from https://testresults.qt.io/coin/api/log/qt/qtbase/2aee676a4b67753d3870bb1966f2b6339f9bb9b3/LinuxRHEL_8_10x86_64AndroidAndroid_ANYx86_64GCCqtci-linux-RHEL-8.10-x86_64-50-eeb00dAndroidTestRun_GenerateSBOM_Packaging_Sccache_UseConfigure_VerifySBOM_WarningsAreErrors/cbd5a94045857cb4aa2aae00d09a637796685ae7/test_1728085100/log.txt.gz

      Attachments

        Issue Links

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

          Activity

            People

              assam Assam Boudjelthia
              assam Assam Boudjelthia
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change