Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App crashes with malloc: *** mmap(size=2147483648) failed (error code=12)

I am creating a AVQueuePlayer object by adding AVPlayerItems. All player items points to different audio URL and player should play as soon as it buffers.

As I start the app in simulator, I get very strange issue with memory. The console says

malloc: *** mmap(size=2147483648) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

and stack trace points some where internal in the framework. It juts points at function #0 MP3AudioStream::GeneratePackets(AudioFileStreamContinuation&) ()

I am not able to understand what is the issue.

Even adding breakpoint in malloc_error_break, doesn't giving any info.

Can some one help me in fixing the issue.

Thanks

like image 747
user2273744 Avatar asked Mar 08 '26 02:03

user2273744


1 Answers

errno code 12 means out of memory.

Check the size parameter that is passed to malloc - it is invalid. The size value of -1 signed (2147483648 unsigned) explains the out of memory error.

like image 124
suspectus Avatar answered Mar 10 '26 14:03

suspectus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!