androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
https://developer.android.com/media/media3
Apache License 2.0
1.59k stars 377 forks source link

Transformer demo is crashing when trying to export video file on Android 14 device #1504

Closed hassanabidpk closed 3 months ago

hassanabidpk commented 3 months ago

Version

Media3 main branch

More version details

1.3.1

Devices that reproduce the issue

Pixel 6a with Android 14

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

  1. Build and run demo-transformer app on Android 14 device
  2. Choose preset input --> Apple Video effect --> Zoom in start --> Export
  3. Application crashed

Expected result

It should export, preview and playback file

Actual result

Crash

2024-06-27 13:38:23.679 15694-15694 AndroidRuntime          androidx.media3.demo.transformer     E  FATAL EXCEPTION: main (Ask Gemini)
Process: androidx.media3.demo.transformer, PID: 15694
 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
at androidx.media3.demo.transformer.TransformerActivity.startExport(TransformerActivity.java:233)
at androidx.media3.demo.transformer.TransformerActivity.onStart(TransformerActivity.java:182)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1582)
at android.app.Activity.performStart(Activity.java:8654)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3847)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:225)
.....

Media

Choose preset input 720p H264 video and AAC audio (b-frames)

Bug Report

SheenaChhabra commented 3 months ago

Hey @hassanabidpk Thanks for reporting this bug. Unfortunately I can not reproduce the bug after following mentioned steps. Can you please confirm whether you are testing on the main branch or 1.3.1 version? Can you try the steps again and confirm if you still see the error? Are you doing any addition steps like pausing and resuming an export?

hassanabidpk commented 3 months ago

after clean build and fetching latest release and main branches. It worked fine. Reason for crash was that no permission popup triggered (Android 14 https://developer.android.com/about/versions/14/changes/partial-photo-video-access) in export page (for some reasons)