Canardoux / flutter_sound

Flutter plugin for sound. Audio recorder and player.
Mozilla Public License 2.0
877 stars 574 forks source link

[BUG]: -[FlautoRecorder updateRecorderProgress:] EXC_BAD_ACCESS (KERN_INVALID_ADDRESS) #1063

Open bloemy7 opened 2 months ago

bloemy7 commented 2 months ago

Flutter Sound Version :

├── flutter_sound 9.6.0
│   ├── flutter_sound_platform_interface 9.6.0
│   ├── flutter_sound_web 9.6.0
│   │   ├── flutter_sound_platform_interface...

Severity


Platforms you faced the error


Describe the bug Through Crashlytics, we are seeing a large amount of reports of this crash happening to users:

FlautoRecorder.mm - Line 353
-[FlautoRecorder updateRecorderProgress:] + 353
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000

We are using this code:

_recorder?.onProgress?.listen((e) async {

and I suppose it is linked to this somehow.

To Reproduce Unfortunately I am not able to reproduce this bug myself.

Logs!!!!

Unfortunately I cannot reproduce it myself so I don't have logs.

Potentially related? https://github.com/Canardoux/flutter_sound/issues/1062

Larpoux commented 2 months ago

Yes, probably related to #1062. 👎 I don’t like this. This bug is probably serious. But hard to work on it because we can’t reproduce it in lab.

bloemy7 commented 2 months ago

Unfortunately it's happening more and more for users out there. I know you are working hard on the 10.X rewrite. Do you have an estimated release time for that or not quite yet? @Larpoux regardless I appreciate your hard work on this, thank you so much.

Larpoux commented 2 months ago

Yes, I am very busy on 10.0 But this kind of problem is higher priority. If the problem is more and more frequent, we (I) must do something. I will switch to 9.x maintenance tomorrow, and I will let you know if I can do something.

Larpoux commented 2 months ago

Flutter Sound 9.9.6 is released.

9.9.6

Add two safeguards in iOS low level to protect us against asynchronous failures (#1062) and (#1063).

Can you try and give a feedback ? You may cross your fingers! If the problem remains, give me the new diagnostics, even if they are same.

bloemy7 commented 2 months ago

Thanks a lot @Larpoux . I will be updating to this in our next release (in a week or so) and I'll tell you if I see anything improve!