cine-io / cineio-broadcast-android

The cine.io Android Broadcast SDK
https://www.cine.io/products/broadcast
MIT License
52 stars 32 forks source link

Huge memory leak crashing the application. #24

Open cadesalaberry opened 9 years ago

cadesalaberry commented 9 years ago

On both the Nexus 4 (4.4.3) and the Samsung S4 (4.4.2) (cf. Screenshots), the broadcast crashes randomly after using too much memory. The SDK is completely unstable, and it is really hard to develop anything durable having the application crash sporadically...

@growlsworth could you have a look at it ?

The Nexus 4 crashes around 2m46s so I added a second screenshot.

screenshot from 2015-06-27 17 30 00 cut

screenshot from 2015-06-29 14 00 14 cut

screenshot from 2015-06-29 14 02 33 cut

java.lang.OutOfMemoryError
    at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
    at java.nio.MemoryBlock.allocate(MemoryBlock.java:125)
    at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:72)
    at io.cine.android.streaming.FFmpegMuxer.writeSampleData(FFmpegMuxer.java:151)
    at io.cine.android.streaming.AndroidEncoder.drainEncoder(AndroidEncoder.java:128)
    at io.cine.android.streaming.TextureMovieEncoder.handleFrameAvailable(TextureMovieEncoder.java:264)
    at io.cine.android.streaming.TextureMovieEncoder$EncoderHandler.handleMessage(TextureMovieEncoder.java:409)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:136)
    at io.cine.android.streaming.TextureMovieEncoder.run(TextureMovieEncoder.java:219)
    at java.lang.Thread.run(Thread.java:841)
cadesalaberry commented 9 years ago

Related to #2.