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

[Crash] Closing dialog in Notepad example causes the app to crash on Android device

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.0
    • Examples and Demos
    • None
    • Android

    Description

      MacOS 14.4.1

      Qt Creator 13.0.0

      Qt 6.7.0

      Most likely it's the issue in example itself, but I'm not sure. 

      Device: Samsung Galaxy S22 13.0, Pixel 3a 12.0

      Steps to reproduce:

      1. Open and run notepad example - https://doc.qt.io/qt-6/qtwidgets-tutorials-notepad-example.html
      2. Tap on the Print button or Font button to open dialog.
      3. Close the dialog.

      Expected: The dialog is closed, and the app still works.

      Actual: The app crashes.

      E AndroidRuntime: FATAL EXCEPTION: main
      E AndroidRuntime: Process: org.qtproject.example.notepad, PID: 2786
      E AndroidRuntime: java.lang.NullPointerException: Attempt to write to field 'boolean org.qtproject.qt.android.QtEditText.m_optionsChanged' on a null object reference in method 'void org.qtproject.qt.android.QtInputDelegate.lambda$resetSoftwareKeyboard$0$org-qtproject-qt-android-QtInputDelegate()'
      E AndroidRuntime:     at org.qtproject.qt.android.QtInputDelegate.lambda$resetSoftwareKeyboard$0$org-qtproject-qt-android-QtInputDelegate(QtInputDelegate.java:167)
      E AndroidRuntime:     at org.qtproject.qt.android.QtInputDelegate$$ExternalSyntheticLambda4.run(Unknown Source:2)
      E AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:942)
      E AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:99)
      E AndroidRuntime:     at android.os.Looper.loopOnce(Looper.java:226)
      E AndroidRuntime:     at android.os.Looper.loop(Looper.java:313)
      E AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:8741)
      E AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
      E AndroidRuntime:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
      E AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
      I Process : Sending signal. PID: 2786 SIG: 9 

      Reproducibility:  100%

       

      Attachments

        Issue Links

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

          Activity

            People

              qtandroidteam Qt Android Team
              lkos Łukasz Kosiorowski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes