nextcloud / nextcloud/android

Bug report: Crash while saving edited photo

Open
#15,670 0 comments 0 reactions 0 assignees View on GitHub
0. Needs triage bug feature: media player feature: previews and thumbnails
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### ⚠️ Before posting ⚠️

- [x] This is a **bug**, not a question or an enhancement.
- [x] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [x] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).

### Steps to reproduce

1. Open nextcloud app
2. Navigate to Media page
3. Tap photo, sandwich menu, edit
4. Crop photo
5. Tap save

### Expected behaviour

File is saved and opened

### Actual behaviour

Application crash, bug report appears on screen. Edited photo was not saved.

### Android version

14

### Device brand and model

Samsung S22 SM-901W

### Stock or custom OS?

Stock

### Nextcloud android app version

3.33.0

### Nextcloud server version

31.0.9

### Using a reverse proxy?

Yes

### Android logs

### Cause of error
```java
Exception in thread "main" java.lang.IllegalStateException: Fragment PreviewMediaFragment{fc6261} (5bab0834-8441-4e0b-87c8-7e3cffec406d) not attached to a context.
at androidx.fragment.app.Fragment.requireContext(Fragment.java:977)
at com.owncloud.android.ui.preview.PreviewMediaFragment.createExoPlayer(PreviewMediaFragment.kt:265)
at com.owncloud.android.ui.preview.PreviewMediaFragment.prepareForVideo$lambda$9$lambda$7(PreviewMediaFragment.kt:246)
at com.owncloud.android.ui.preview.PreviewMediaFragment.$r8$lambda$x7K6kSO2p-R3PbnFIHqisKkX3ek(Unknown Source:0)
at com.owncloud.android.ui.preview.PreviewMediaFragment$$ExternalSyntheticLambda3.run(D8$$SyntheticClass:0)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:9063)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

```

### App information
* ID: `com.nextcloud.client`
* Version: `30330090`
* Build flavor: `gplay`

### Device information
* Brand: `samsung`
* Device: `r0q`
* Model: `SM-S901W`
* Id: `UP1A.231005.007`
* Product: `r0qcsx`

### Firmware
* SDK: `34`
* Release: `14`
* Incremental: `S901WVLS8EYC1`

### Server error logs

```bash

```

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.