Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): openPhotoGallery() crash selecting multiple files as of 9.1.0 #12212

Merged
merged 1 commit into from Oct 26, 2020

Conversation

jquick-axway
Copy link
Contributor

@jquick-axway jquick-axway commented Oct 23, 2020

JIRA:
https://jira.appcelerator.org/browse/TIMOB-28193

Summary:

  • Fixed regression introduced in 9.1.0 where Ti.Media.openPhotoGallery() might crash when selecting multiple photos and/or videos.
  • Modified e.media.file property to return a Ti.Filesystem.File object for content:// URLs.

Test:

  1. Build and run PhotoVideoMultiselectTest.js attached to TIMOB-28193.
  2. Tap on the "Add" button and select "Photo" from the dialog.
  3. Tap on the "Back" button.
  4. Verify you are returned to the app.
  5. Tap on the "Add" button and select "Photo" from the dialog.
  6. Select only 1 photo from the gallery.
  7. Verify app lists that 1 photo and displays it when tapped on.
  8. Tap on the "Add" button and select "Photo" from the dialog.
  9. Select 2 or more photos from the gallery.
  10. Verify app lists those photos and displays them correctly when tapped on.

@build
Copy link
Contributor

build commented Oct 23, 2020

Messages
📖 👍 Hey!, You deleted more code than you added. That's awesome!
📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖

✅ All tests are passing
Nice one! All 7719 tests are passing.
(There are 736 skipped tests not included in that total)

Generated by 🚫 dangerJS against cfe0e1c

Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: PASS

@ssjsamir ssjsamir self-requested a review October 26, 2020 15:29
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jquick-axway On step 10 after clicking on the 3rd/4th photo the image is not displayed, only the first two images clicked on are displayed.

Test Environment

MacOS Big Sur: 11.0 Beta 9
Xcode: 12.2 Beta
Java Version: 1.8.0_242
Android NDK: 21.3.6528147
Node.js: 12.18.1
""NPM":"5.0.0","CLI":"8.1.1""
PIXEL XL API 29
PIXEL XL device (10.0)

@jquick-axway
Copy link
Contributor Author

@ssjsamir , I can't reproduce the issue you're seeing.
Can you run the same test with Titanium 9.0.3 please?

@ssjsamir ssjsamir self-requested a review October 26, 2020 18:11
Copy link
Contributor

@ssjsamir ssjsamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jquick-axway This issue is also seen on 9.0.3.GA but it looks like the fix in question for this PR is working as intended and in that case I am going to pass this FR.

A user may still run into the following issues:
https://jira.appcelerator.org/browse/TIMOB-24379 (Android: Image Views not releasing memory, resulting in crash)
https://jira.appcelerator.org/browse/TIMOB-24528 (Fails to load images that exceed GPU max texture size)

Test Environment

MacOS Big Sur: 11.0 Beta 9
Xcode: 12.2 Beta
Java Version: 1.8.0_242
Android NDK: 21.3.6528147
Node.js: 12.18.1
""NPM":"5.0.0","CLI":"8.1.1""
PIXEL XL API 29
PIXEL XL device (10.0)

@sgtcoolguy sgtcoolguy merged commit 0b1116f into tidev:master Oct 26, 2020
@build
Copy link
Contributor

build commented Oct 26, 2020

The backport to 9_2_X failed:

The process 'git' failed with exit code 128

Check the run for full details
To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Check out the target branch
git checkout 9_2_X
# Make sure it's up to date
git pull
# Check out your branch
git checkout -b backport-12212-to-9_2_X
# Apply the commits from the PR
curl -s https://github.com/appcelerator/titanium_mobile/commit/cfe0e1c592aef034c82cdc16dbac359d1fd8a7ed.patch | git am -3 --ignore-whitespace
# Push it to GitHub
git push --set-upstream origin backport-12212-to-9_2_X

Then, create a pull request where the base branch is 9_2_X and the compare/head branch is backport-12212-to-9_2_X.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants