Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt android application crashed when receiving explicit image intent.
Forum Updated to NodeBB v4.3 + New Features

Qt android application crashed when receiving explicit image intent.

Scheduled Pinned Locked Moved Solved Mobile and Embedded
2 Posts 1 Posters 412 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BernardWuam
    wrote on last edited by BernardWuam
    #1

    <?xml version="1.0"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.holiest.customActivity" android:installLocation="auto" android:versionCode="-- %%INSERT_VERSION_CODE%% --" android:versionName="-- %%INSERT_VERSION_NAME%% --">
    <!-- %%INSERT_PERMISSIONS -->
    <!-- %%INSERT_FEATURES -->
    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true"/>
    <application android:name="org.qtproject.qt.android.bindings.QtApplication" android:hardwareAccelerated="true" android:label="-- %%INSERT_APP_NAME%% --" android:requestLegacyExternalStorage="true" android:allowBackup="true" android:fullBackupOnly="false">
    <activity android:name="com.holiest.customActivity.CustomActivity" android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:launchMode="singleTop" android:screenOrientation="unspecified" android:exported="true" android:label="">
    <intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
    </intent-filter>
    <intent-filter>
    <action android:name="android.intent.action.SEND"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <data android:mimeType="image/*"/>
    </intent-filter>
    <meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
    <meta-data android:name="android.app.arguments" android:value="-- %%INSERT_APP_ARGUMENTS%% --"/>
    </activity>

        <provider android:name="androidx.core.content.FileProvider" android:authorities="${applicationId}.qtprovider" android:exported="false" android:grantUriPermissions="true">
            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/qtprovider_paths"/>
        </provider>
    </application>
    <queries>
        <intent>
            <action android:name="android.intent.action.SEND">
            </action>
            <data android:mimeType="text/plain"/>
        </intent>
    </queries>
    

    </manifest>

    above is the application manifest with the intent filter to handle image been sent to the app, but anytime any image is sent to the app. it crashes with the following error

    E Surface : freeAllBuffers: 1 buffers were freed while being dequeued!
    E Surface : freeAllBuffers: 1 buffers were freed while being dequeued!
    W .customActivity: Cleared Reference was only reachable from finalizer (only reported once)
    E TransactionExecutor: Failed to execute the transaction: tId:-608023111 ClientTransaction{
    E TransactionExecutor: tId:-608023111 transactionItems=[
    E TransactionExecutor: tId:-608023111 LaunchActivityItem{activityToken=android.os.BinderProxy@2a34fa,intent=Intent { act=android.intent.action.SEND typ=image/jpeg flg=0x1b080001 cmp=com.holiest.customActivity/.CustomActivity clip={image/jpeg {U(content)}} (has extras) },ident=8956748,info=ActivityInfo{8e38811 com.holiest.customActivity.CustomActivity},curConfig={1.0 310mcc260mnc [en_US] ldltr sw411dp w411dp h890dp 420dpi nrml long port finger qwerty/v/v dpad/v winConfig={ mBounds=Rect(0, 0 - 1080, 2400) mAppBounds=Rect(0, 0 - 1080, 2337) mMaxBounds=Rect(0, 0 - 1080, 2400) mDisplayRotation=ROTATION_0 mWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.56 fontWeightAdjustment=0},overrideConfig={1.0 310mcc260mnc [en_US] ldltr sw411dp w411dp h890dp 420dpi nrml long port finger qwerty/v/v dpad/v winConfig={ mBounds=Rect(0, 0 - 1080, 2400) mAppBounds=Rect(0, 0 - 1080, 2337) mMaxBounds=Rect(0, 0 - 1080, 2400) mDisplayRotation=ROTATION_0 mWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.3 fontWeightAdjustment=0},deviceId=0,referrer=com.android.chrome,procState=15,state=null,persistentState=null,pendingResults=null,pendingNewIntents=null,sceneTransitionInfo=null,profilerInfo=null,assistToken=android.os.BinderProxy@5f9d0aa,shareableActivityToken=android.os.BinderProxy@66dd49b,activityWindowInfo=ActivityWindowInfo{isEmbedded=false, taskBounds=Rect(0, 0 - 1080, 2400), taskFragmentBounds=Rect(0, 0 - 1080, 2400)}}
    E TransactionExecutor: tId:-608023111 ResumeActivityItem{mActivityToken=android.os.BinderProxy@2a34fa,procState=-1,updateProcState=false,isForward=true,shouldSendCompatFakeFocus=false}
    E TransactionExecutor: tId:-608023111 Target activity: com.holiest.customActivity.CustomActivity
    E TransactionExecutor: tId:-608023111 ]
    E TransactionExecutor: tId:-608023111 }
    D AndroidRuntime: Shutting down VM
    E AndroidRuntime: FATAL EXCEPTION: main
    E AndroidRuntime: Process: com.holiest.customActivity, PID: 15692
    E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.holiest.customActivity/com.holiest.customActivity.CustomActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewParent org.qtproject.qt.android.QtRootLayout.getParent()' on a null object reference
    E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4048)
    E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4235)
    E AndroidRuntime: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:112)
    E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:174)
    E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:109)
    E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:81)
    E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2636)
    E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107)
    E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:232)
    E AndroidRuntime: at android.os.Looper.loop(Looper.java:317)
    E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8705)
    E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
    E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
    E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
    E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewParent org.qtproject.qt.android.QtRootLayout.getParent()' on a null object reference
    E AndroidRuntime: at org.qtproject.qt.android.QtActivityDelegate.updateActivityAfterRestart(QtActivityDelegate.java:83)
    E AndroidRuntime: at org.qtproject.qt.android.QtActivityBase.handleActivityRestart(QtActivityBase.java:68)
    E AndroidRuntime: at org.qtproject.qt.android.QtActivityBase.onCreate(QtActivityBase.java:99)
    E AndroidRuntime: at org.qtproject.qt.android.bindings.QtActivity.onCreate(QtActivity.java:16)
    E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:9002)
    E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:8980)
    E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1526)
    E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4030)
    E AndroidRuntime: ... 13 more
    I Process : Sending signal. PID: 15692 SIG: 9
    16:38:10:

    "com.holiest.customActivity" died.

    please i am in urgent need of your assistance, thank you in advance.

    1 Reply Last reply
    0
    • B BernardWuam has marked this topic as solved on
    • B Offline
      B Offline
      BernardWuam
      wrote on last edited by
      #2

      Change android: lunchMode ="single instance" did the trick

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved