Skip to content

1.5.0 crashes with a RuntimeException when the chosen "Save recordings in" directory ceases to exist after selection, if the directory was deleted via MTP. #250

@RokeJulianLockhart

Description

@RokeJulianLockhart

Checklist

  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected app version

versionName=1.5.0
versionCode=14

Affected Android/Custom ROM version

[ro.build.version.release]: [15]
[ro.build.display.id]: [FP5.VT2E.C.059.20250908]

Affected device model

[ro.product.brand]: [Fairphone]
[ro.build.product]: [FP5]

How did you install the app?

installer=com.machiav3lli.fdroid

Steps to reproduce the bug

  1. #!/system/bin/sh
    cmd activity start --user 0 -a android.intent.action.VIEW -n com.google.android.documentsui/com.android.documentsui.files.FilesActivity -f 0 com.google.android.documentsui
  2. Visit /storage/emulated/0.

  3. Create a directory. 1

  4. #!/system/bin/sh
    cmd activity start --user 0 -a android.intent.action.VIEW -n org.fossify.voicerecorder/org.fossify.voicerecorder.activities.MainActivity -f 0 org.fossify.voicerecorder
  5. Visit .activities.SettingsActivity.

  6. Select the created directory.

  7. Connect the device to an external OS via MTP over USB.

  8. #!/usr/bin/env sh
    dolphin 'mtp:/Fairphone 5 5G/Internal shared storage/Music/Recordings'

    2

  9. Delete the directory. 3

  10. #!/system/bin/sh
    cmd activity start --user 0 -a android.intent.action.VIEW -n org.fossify.voicerecorder/org.fossify.voicerecorder.activities.MainActivity -f 0 org.fossify.voicerecorder
  11. Record audio.

Expected behavior

It should prompt me to choose a new directory:

ignoreImageMinify

Actual behavior

FATAL EXCEPTION: main
Process: org.fossify.voicerecorder, PID: 29850
java.lang.RuntimeException: Unable to start service org.fossify.voicerecorder.services.RecorderService@c9e3d3e with Intent { act=com.fossify.voicerecorder.action.CANCEL_RECORDING cmp=org.fossify.voicerecorder/.services.RecorderService }: java.lang.IllegalArgumentException: Failed to determine if primary:Music/Recordings/20251105_191320.m4a is child of primary:Music: java.io.FileNotFoundException: Missing file for primary:Music at /storage/emulated/0/Music
	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5166)
	at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2470)
	at android.os.Handler.dispatchMessage(Handler.java:107)
	at android.os.Looper.loopOnce(Looper.java:232)
	at android.os.Looper.loop(Looper.java:317)
	at android.app.ActivityThread.main(ActivityThread.java:8751)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:892)
Caused by: java.lang.IllegalArgumentException: Failed to determine if primary:Music/Recordings/20251105_191320.m4a is child of primary:Music: java.io.FileNotFoundException: Missing file for primary:Music at /storage/emulated/0/Music
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185)
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:155)
	at android.content.ContentProviderProxy.call(ContentProviderNative.java:764)
	at android.content.ContentResolver.call(ContentResolver.java:2469)
	at android.provider.DocumentsContract.deleteDocument(DocumentsContract.java:1469)
	at org.fossify.voicerecorder.services.RecorderService.onStartCommand(Unknown Source:159)
	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5148)
	... 9 more

Screenshots/Screen recordings

screen-20251105-192455.mp4

Footnotes

  1. stackoverflow.com/posts/13373489/timeline#comment_140840466

  2. reddit.com/c/chatSRvwvR32/s/cuUGHWwLG5

  3. forums.opensuse.org/t/109750

Metadata

Metadata

Assignees

Labels

acceptedFeature or bug accepted. PR is welcome.bugSomething is not working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions