Merlin bird app Sound ID does not work under /e/OS

Hello,

Steps to reproduce: Start and stop the sound ID feature in Merlin. Observe the app crashing.

After every OS update, I try again. Today’s update to 3.1.4 did not fix it. Meanwhile, a bot keeps closing these threads so I am creating a third one. Links to the previous ones below.
This is definitely an /e/OS issue, not a Merlin bug, and it is not specific to particular phone models. Please take a look. I would be very happy to help by digging up stuff from logs, if someone tells me where they are.

Hi @szakib I did test Merlin in the past seeing these threads but I found it highly intrusive such that I did not persevere to collect a logcat. Perhaps you could try that to see if the actual blockers could be identified.

Thanks for the suggestion. Generating the .zip file on the phone an only sending whatever I’m OK with is a reasonable risk, I’m doing it now.

So here are the log lines that contain “merlin”:
https://1drv.ms/t/c/1c2743f7f87141ed/EV5l2Kpm0uhAqDF3Lh7fAXEB2vT-qEFJVXRG0SU0fUJehw?e=YyglTW

I use whoBIRD for some times now and I find it quite efficient. Maybe it can be useful as a workaround for your problem.

4 Likes

I installed the App (v3.7.1) on a /e/OS v3.1 A15 GSI and could record a sample.

The app draws a spectrogram, I can select a part of it, do audio replays. It won’t crash.

Apart from the repeating PackageConfigPersister warnings (that I see in my logcat too), the only Error class lines in your logs (that I do not see on my device) are:

E AndroidRuntime: Process: com.labs.merlinbirdid.app, PID: 6830
E AndroidRuntime: 	at edu.cornell.birds.merlin.audio.spectrogram.v2.impl.AudioSamplesMultiThreadedSpectrogramGenerator.createFrequencyDataBuffer(AudioSamplesMultiThreadedSpectrogramGenerator.kt:155)
E AndroidRuntime: 	at edu.cornell.birds.merlin.audio.spectrogram.v2.impl.AudioSamplesMultiThreadedSpectrogramGenerator.getFrequencyData$lambda$7$lambda$6(AudioSamplesMultiThreadedSpectrogramGenerator.kt:66)
E AndroidRuntime: 	at edu.cornell.birds.merlin.audio.spectrogram.v2.impl.AudioSamplesMultiThreadedSpectrogramGenerator.$r8$lambda$D95AJOc8bZh1qVUtv0sgm3JLM00(Unknown Source:0)
E AndroidRuntime: 	at edu.cornell.birds.merlin.audio.spectrogram.v2.impl.AudioSamplesMultiThreadedSpectrogramGenerator$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)

I’d send the stacktrace to Submit a ticket : Help Center and ask what createFrequencyDataBuffer() can fail on. Naively: did you grant it the microphone permission? maybe some audiosink settings, recording frequency (khz)?

You have a FP5, I’d look for audio bugs in the bugtracker.

Hi,

Now that you mentioned the spectrogram, I think that might be the issue, because:

  • the part where it records the sound actually works. The app crashes when I press Stop and it never displays the histogram, but it does save the sound file.
  • I have verified earlier that the mic permission works as it should.
  • (May or may not be related: The other mystery issue on this phone is my weather app not being able to draw the cloud overlay on the map.)

Can I see those audiosink settings you mention somewhere?

device audio xml things are here for the FP5 (A14 branch, or are you on A15?). media/ too is worth to look at.

You could ask other FP5 users on stockrom (or LineageOS) over at the fairphone forum is they have issues with the Merlin app.

About this being a FP5 issue:

  • the app works on FP5 with stock Android
  • There was a bug in the FP5-specific part of /e/OS regarding the mic, but that is fixed now.
  • People have had this exact problem on other phones too

So the issue is most probably somewhere at the bounday between /e/OS and Merlin. Since the Merlin devs DGAF about non-official Android, this place is my last hope.

I’m not saying it’s exclusively an FP5 issue, but it doesn’t seem to be a generic /e/OS component issue either and stretch to all devices.

What is your exact version string btw? if you’re still on T / A13 an upgrade to A14 or A15 could probably help if it contains that fix advertised in the linked FP forum thread. Unsure how dilligent people are looking after all release branches.

As to that boundary, it’s pretty clearly on the data stream that the SpectrogramGenerator receives. It’s either null, wrongly padded or not the frequency expected - in any case the code can’t handle it.

I am on A13. Will upgrade to the A15 version. Have to figure out if there will eventually be an update installer, or if I need to wipe and reinstall with the currently available one.

I’d do an adb sideload upgrade, but have a fresh backup (and enough free space).

If things go well, if you can, modify title to “with FP5 T / A13”

Seems like I will get A15 OTA in a month, or maybe two. Will wait for that.

you do not have mic issues generally, like in calls, and the saved audio file (despite the crash) within Merlin will have actual audio data?

No. The only other weird thing on this phone is that the FMI weather app is unable to display the cloud overlay on the map.