Skip to content
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

[AVAssetWriterInput appendSampleBuffer:] Cannot append sample buffer crash #13

Open
alexanderkhitev opened this issue Jan 6, 2019 · 8 comments
Labels

Comments

@alexanderkhitev
Copy link

Hi! Thanks for great framework!
I have seen reports in Crashlytics that occur in NextLevelSessionExporter.

[AVAssetWriterInput appendSampleBuffer:] Cannot append sample buffer: Must start a session (using -[AVAssetWriter startSessionAtSourceTime:) first
NextLevelSessionExporterencodetoWriterInput(_:_:)
Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x22015bf50 __exceptionPreprocess
1  libobjc.A.dylib                0x21f358284 objc_exception_throw
2  AVFoundation                   0x2262d0bcc __41-[AVAssetWriterInput appendSampleBuffer:]_block_invoke
3  NextLevelSessionExporter       0x1010fc704 NextLevelSessionExporterencodetoWriterInput(_:_:) (NextLevelSessionExporter.swift:429)
4  NextLevelSessionExporter       0x10110014c partial apply for NextLevelSessionExporter (NextLevelSessionExporter.swift:351)
5  NextLevelSessionExporter       0x1010fc8f0 $SIeg_IeyB_TR (<compiler-generated>)
6  AVFoundation                   0x2262d990c -[AVAssetWriterInputMediaDataRequester requestMediaDataIfNecessary]
7  libdispatch.dylib              0x21fb5fd58 _dispatch_call_block_and_release
8  libdispatch.dylib              0x21fb612f0 _dispatch_client_callout
9  libdispatch.dylib              0x21fb686e0 _dispatch_lane_serial_drain
10 libdispatch.dylib              0x21fb69264 _dispatch_lane_invoke
11 libdispatch.dylib              0x21fb71508 _dispatch_workloop_worker_thread
12 libsystem_pthread.dylib        0x21fd61b20 _pthread_wqthread
13 libsystem_pthread.dylib        0x21fd67dd4 start_wqthread
@piemonte
Copy link
Contributor

i believe this could be happening when encoding fails and never signals the appropriate semaphore for completion, the session should just explicitly fail

@rromanchuk
Copy link
Collaborator

I'm all of a sudden getting this now with 0.4.0, but i did recently just change some presets, so probably my own regression. @alexanderkhitev do you remember what specifically was responsible for throwing this?

@alexanderkhitev
Copy link
Author

Hey @rromanchuk ! No, I'm sorry. We didn't switch to original repository yet, we use our fork for now

@piemonte
Copy link
Contributor

fwiw, i pulled in most of @alexanderkhitev fork's changes at some point. will try reproduce the crash mentioned.

@rromanchuk
Copy link
Collaborator

@alexanderkhitev @piemonte hey guys i just tried switching to spm and i got this crash, and found myself here. I realized i had '0.4.3' locked in my Podfile but i forgot almost all the context around why. I thought the relevant changes were cherrypicked back in to master? Repos every-time, makes me wonder if i'm just doing something fundamentally wrong and i'm just getting lucky with 0.4.3.

@piemonte i'll start digging through diffs and try to figure out if i can find if it's something unique to my usage/implementation

@piemonte
Copy link
Contributor

piemonte commented Oct 6, 2020

hey @rromanchuk thanks for note. if you find something helpful, would appreciate it. also provided you access.

@piemonte piemonte reopened this Oct 6, 2020
@piemonte piemonte added the bug label Oct 6, 2020
@rabelhmd
Copy link

rabelhmd commented Apr 21, 2021

@rromanchuk I am facing exactly the same issue. Have you fixed the bug?
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants