Skip to content

iOS crash release mode : WaveformExtractor.extractWaveform(samplesPerPixel:offset:length:playerKey:) #397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Tom3652 opened this issue Feb 14, 2025 · 6 comments · May be fixed by #405
Open
Labels
more-info-required Indicates that the issue requires more description/information waiting-for-response Waiting for someone to respond.

Comments

@Tom3652
Copy link

Tom3652 commented Feb 14, 2025

Describe the bug

I have an ios crash : WaveformExtractor.extractWaveform(samplesPerPixel:offset:length:playerKey:) and here is the stack trace :

Fatal Exception: com.apple.coreaudio.avfaudio
0  CoreFoundation                 0x2d5fc __exceptionPreprocess
1  libobjc.A.dylib                0x31244 objc_exception_throw
2  CoreFoundation                 0x17a6e0 -[NSException initWithCoder:]
3  AVFAudio                       0x39688 _AVAE_CheckNoErr(char const*, int, char const*, char const*, int, NSError* __autoreleasing*)
4  AVFAudio                       0xe4080 -[AVAudioFile framePosition]
5  audio_waveforms                0x18e28 WaveformExtractor.extractWaveform(samplesPerPixel:offset:length:playerKey:) + 45 (WaveformExtractor.swift:45)
6  audio_waveforms                0x15034 specialized SwiftAudioWaveformsPlugin.createOrUpdateExtractor(playerKey:result:path:noOfSamples:) + 174 (SwiftAudioWaveformsPlugin.swift:174)
7  audio_waveforms                0x18218 specialized SwiftAudioWaveformsPlugin.handle(_:result:) + 145 (SwiftAudioWaveformsPlugin.swift:145)
8  audio_waveforms                0x132f4 @objc SwiftAudioWaveformsPlugin.handle(_:result:) (<compiler-generated>)
9  Flutter                        0x5e20d0 __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 322 (FlutterChannels.mm:322)
10 Flutter                        0x66be0 ___ZN7flutter25PlatformMessageHandlerIos21HandlePlatformMessageENSt3_fl10unique_ptrINS_15PlatformMessageENS1_14default_deleteIS3_EEEE_block_invoke + 110 (ref_ptr.h:110)
11 libdispatch.dylib              0x2248 _dispatch_call_block_and_release
12 libdispatch.dylib              0x3fa8 _dispatch_client_callout
13 libdispatch.dylib              0x12a34 _dispatch_main_queue_drain
14 libdispatch.dylib              0x1264c _dispatch_main_queue_callback_4CF
15 CoreFoundation                 0x79bcc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
16 CoreFoundation                 0x761c0 __CFRunLoopRun
17 CoreFoundation                 0xc8284 CFRunLoopRunSpecific
18 GraphicsServices               0x14c0 GSEventRunModal
19 UIKitCore                      0x3ee674 -[UIApplication _run]
20 UIKitCore                      0x14e88 UIApplicationMain
21 UIKitCore                      0x75115c keypath_get_selector_hoverStyle
22 Runner                         0x8d80 main (AppDelegate.swift)
23 ???                            0x1b50c5de8 (Missing)

To Reproduce
I have no idea unfortunately as it happened to my live users

Expected behavior

The app should not crash

Smartphone (please complete the following information):

  • Device: iPhone 13
  • OS: iOS 18.3.0

Screenshots

Additional context

I can provide the full stack trace if needed

@ujas-m-simformsolutions
Copy link
Collaborator

This error could be due corrupt or unsupported file being used or some sort of concurrency issue. Do you have any logs what type of files were being used?

@ujas-m-simformsolutions ujas-m-simformsolutions added more-info-required Indicates that the issue requires more description/information waiting-for-response Waiting for someone to respond. labels Feb 24, 2025
@Tom3652
Copy link
Author

Tom3652 commented Feb 26, 2025

Mmh no unfortunately i have checked but i have no more logs regarding this :/ but the file is a .mp4 file downloaded from an URL remotely and saved locally on the device.

@ujas-m-simformsolutions
Copy link
Collaborator

ujas-m-simformsolutions commented Mar 6, 2025

@Tom3652 I have made this PR which adds logs when initialization of AVAudioFile fails. If you could use this then it will help us find the issue and also it might also fix the crash and only give error logs.

@Tom3652
Copy link
Author

Tom3652 commented Mar 6, 2025

Hi @ujas-m-simformsolutions thanks for your PR !
Will you make a new release so i can use the package normally ? Or i need to use specific commit ?

I will make a new release of the app probably in two weeks

@ujas-m-simformsolutions
Copy link
Collaborator

@Tom3652 You will have to use the specific commit for this since we have just released a new version and we are not sure if the issue is from plugin or the file.

@Tom3652
Copy link
Author

Tom3652 commented Apr 22, 2025

hi @ujas-m-simformsolutions yes this sounds good so far i have not received a new crash 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-info-required Indicates that the issue requires more description/information waiting-for-response Waiting for someone to respond.
Projects
None yet
2 participants