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

Android crash on Widget QMenu shortcut (when keyboard open)

    XMLWordPrintable

Details

    • Android
    • ecd4623f0 (dev), e3bea87ee (6.8)
    • 2024wk40s3FOQtforAndroid

    Description

      When Keyboard is visible and we use a shortcut on QMenu (and showPopup is called on platformMenu) - application crash:

       

       

      E AndroidRuntime: FATAL EXCEPTION: main
      E AndroidRuntime: Process: org.qtproject.example.QMenuCrash, PID: 11845
      E AndroidRuntime: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
      E AndroidRuntime:     at android.view.ViewGroup.addViewInner(ViewGroup.java:5248)
      E AndroidRuntime:     at android.view.ViewGroup.addView(ViewGroup.java:5077)
      E AndroidRuntime:     at android.view.ViewGroup.addView(ViewGroup.java:5049)
      E AndroidRuntime:     at org.qtproject.qt.android.QtLayout.setLayoutParams(QtLayout.java:212)
      E AndroidRuntime:     at org.qtproject.qt.android.QtActivityDelegate.lambda$openContextMenu$9$org-qtproject-qt-android-QtActivityDelegate(QtActivityDelegate.java:313)
      E AndroidRuntime:     at org.qtproject.qt.android.QtActivityDelegate$$ExternalSyntheticLambda9.run(D8$$SyntheticClass:0)
      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:201)
      E AndroidRuntime:     at android.os.Looper.loop(Looper.java:288)
      E AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:7872)
      E AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
      E AndroidRuntime:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
      E AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

       

      For reproduction use attached main.cpp:

      Click on TextEdit and type something. Press space to make sure it is not pre-edit text.

       

      Attachments

        1. main.cpp
          0.9 kB
          Bartlomiej Moskal

        Issue Links

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

          Activity

            People

              bartlomiejmoskal Bartlomiej Moskal
              bartlomiejmoskal Bartlomiej Moskal
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes