Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-6616

Android: Ti.Media.openPhotoGallery Crash while using allowMultiple option

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: None
    • Component/s: Titanium SDK & CLI
    • Labels:
      None

      Description

      • Ti.Media.openPhotoGallery* on Android crashes while using the allowMultiple option.
        Used to work properly before.

      Environment:
      Ti SDK: 9.2.1.GA
      Phone: Samsung Galaxy Note9 (SM-N9600)
      Android Version: 10

          Ti.Media.openPhotoGallery({
            allowMultiple: true,
            mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],
            success: function(e) {},
            cancel: function () {},
            error: function () {}
          });
      

      Getting the following error after selecting multiple images. Selecting a single image seems to work fine.

      [ERROR] TiExceptionHandler: (main) [33125,39842] Failure delivering result ResultInfo{who=null, request=2, result=-1, data=Intent { flg=0x1 clip={image/* U:content://com.android.providers.media.documents/document/image%3A21912 ...} }} to activity {xxx.xxxx/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.toString()' on a null object reference
      [ERROR] TiExceptionHandler:
      [ERROR] TiExceptionHandler:     ti.modules.titanium.media.MediaModule$1.onResult(MediaModule.java:973)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.util.TiActivitySupportHelper$1.onResult(TiActivitySupportHelper.java:60)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.util.TiActivitySupportHelper.onActivityResult(TiActivitySupportHelper.java:117)
      [ERROR] TiExceptionHandler:     org.appcelerator.titanium.TiBaseActivity.onActivityResult(TiBaseActivity.java:900)
      [ERROR] TiExceptionHandler:     android.app.Activity.dispatchActivityResult(Activity.java:8294)
      [ERROR] TiExceptionHandler:     android.app.ActivityThread.deliverResults(ActivityThread.java:5335)
      [ERROR] TiExceptionHandler:     android.app.ActivityThread.handleSendResult(ActivityThread.java:5383)
      [ERROR] TiExceptionHandler:     android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
      [ERROR] TiExceptionHandler:     android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
      [ERROR] TiExceptionHandler:     android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
      [ERROR] TiExceptionHandler:     android.app.ActivityThread$H.handleMessage(ActivityThread.java:2270)
      [ERROR] TiExceptionHandler:     android.os.Handler.dispatchMessage(Handler.java:107)
      [ERROR] TiExceptionHandler:     android.os.Looper.loop(Looper.java:237)
      [ERROR] TiExceptionHandler:     android.app.ActivityThread.main(ActivityThread.java:8125)
      [ERROR] TiExceptionHandler:     java.lang.reflect.Method.invoke(Native Method)
      [ERROR] TiExceptionHandler:     com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
      [ERROR] TiExceptionHandler:     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                amukherjee Abir Mukherjee
                Reporter:
                fahad86 Muhammad Ahmed Fahad
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Integration