Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-28154

Crash when selecting an apk via 'Install an APK File' without a device configured

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 8.0.1
    • Android Support
    • None
    • macOS

    Description

      I was somewhat cluelessly clicking around in QtC, trying to get a Squish Qt-on-Android example app to deploy on a (real) Android device. At that point QtC had no devices listed - no simulators and no hardware. Steps to reproduce:

      • Open the Run configuration of a Qt-on-Android kit (Qt 6.2.5 here)
      • In the 'Deploy to Android device' section, click 'Install an APK File'
      • In the file chooser, select android-build-debug.apk from deep inside the build directory

      Upon confirming the file chooser, QtC crashes with this backtrace:

      Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
      0   libProjectExplorer.dylib      	       0x10b556934 std::__1::unique_ptr<ProjectExplorer::Internal::IDevicePrivate, std::__1::default_delete<ProjectExplorer::Internal::IDevicePrivate> >::operator->() const + 0 (memory:1658) [inlined]
      1   libProjectExplorer.dylib      	       0x10b556934 ProjectExplorer::IDevice::deviceState() const + 0 (idevice.cpp:611)
      2   libAndroid.dylib              	       0x10d765430 Android::Internal::AndroidDevice::androidDeviceInfoFromIDevice(ProjectExplorer::IDevice const*) + 64 (androiddevice.cpp:258)
      3   libAndroid.dylib              	       0x10d77a608 Android::AndroidManager::installQASIPackage(ProjectExplorer::Target*, Utils::FilePath const&) + 132 (androidmanager.cpp:577)
      4   libAndroid.dylib              	       0x10d761fc0 Android::Internal::AndroidDeployQtStep::createConfigWidget()::$_0::operator()() const + 336 (androiddeployqtstep.cpp:535) [inlined]
      5   libAndroid.dylib              	       0x10d761fc0 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, Android::Internal::AndroidDeployQtStep::createConfigWidget()::$_0>::call(Android::Internal::AndroidDeployQtStep::createConfigWidget()::$_0&, void**) + 336 (qobjectdefs_impl.h:163) [inlined]
      6   libAndroid.dylib              	       0x10d761fc0 void QtPrivate::Functor<Android::Internal::AndroidDeployQtStep::createConfigWidget()::$_0, 0>::call<QtPrivate::List<>, void>(Android::Internal::AndroidDeployQtStep::createConfigWidget()::$_0&, void*, void**) + 336 (qobjectdefs_impl.h:277) [inlined]
      7   libAndroid.dylib              	       0x10d761fc0 QtPrivate::QFunctorSlotObject<Android::Internal::AndroidDeployQtStep::createConfigWidget()::$_0, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) + 400 (qobjectdefs_impl.h:444)
      8   QtCore                        	       0x107495c64 0x1073e8000 + 711780
      9   QtWidgets                     	       0x106498cb4 0x106394000 + 1068212
      10  QtWidgets                     	       0x106498b34 0x106394000 + 1067828
      11  QtWidgets                     	       0x106499a24 QAbstractButton::mouseReleaseEvent(QMouseEvent*) + 172
      12  QtWidgets                     	       0x1063e7af4 QWidget::event(QEvent*) + 132
      13  QtWidgets                     	       0x10639e1c8 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 272
      14  QtWidgets                     	       0x1063a03e0 QApplication::notify(QObject*, QEvent*) + 5040
      15  QtCore                        	       0x10744d6a0 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 208
      16  QtWidgets                     	       0x10639e900 QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) + 908
      17  QtWidgets                     	       0x1063fb764 0x106394000 + 423780
      18  QtWidgets                     	       0x1063faa10 0x106394000 + 420368
      19  QtWidgets                     	       0x10639e1c8 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 272
      20  QtWidgets                     	       0x10639f230 QApplication::notify(QObject*, QEvent*) + 512
      21  QtCore                        	       0x10744d6a0 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 208
      22  QtGui                         	       0x1058622d8 QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) + 1820
      23  QtGui                         	       0x1058b5538 QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 444
      24  libqcocoa.dylib               	       0x106161318 0x10614c000 + 86808
      25  CoreFoundation                	       0x19c189044 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
      26  CoreFoundation                	       0x19c188f90 __CFRunLoopDoSource0 + 208
      27  CoreFoundation                	       0x19c188c90 __CFRunLoopDoSources0 + 268
      28  CoreFoundation                	       0x19c187610 __CFRunLoopRun + 828
      29  CoreFoundation                	       0x19c186b34 CFRunLoopRunSpecific + 600
      30  HIToolbox                     	       0x1a4dc6338 RunCurrentEventLoopInMode + 292
      31  HIToolbox                     	       0x1a4dc5fc4 ReceiveNextEventCommon + 324
      32  HIToolbox                     	       0x1a4dc5e68 _BlockUntilNextEventMatchingListInModeWithFilter + 72
      33  AppKit                        	       0x19ecee51c _DPSNextEvent + 860
      34  AppKit                        	       0x19ecece14 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1328
      35  AppKit                        	       0x19ecdefe0 -[NSApplication run] + 596
      36  libqcocoa.dylib               	       0x106160200 0x10614c000 + 82432
      37  QtCore                        	       0x107456cfc QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 544
      38  QtCore                        	       0x10744dd54 QCoreApplication::exec() + 128
      39  Qt Creator                    	       0x1049e08b0 main + 14888 (main.cpp:790)
      40  dyld                          	       0x104a2508c start + 520
      

      Workaround

      The crash went away as soon as I discovered that I had USB debugging disabled on the Android device and therefore QtC found a device to query.

      Attachments

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

        Activity

          People

            portale Alessandro Portale
            makummer Marcel Kummer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes