Opening IsoFile throws OutOfMemory Exception on Android
See original GitHub issueHello everyone. I was using this library for a project at work. I noticed that issue #284 was closed, but I wanted to submit another issue that’s similar in nature.
The project is in Kotlin, but I can convert to Java if it helps with readability of this ticket.
Device: Google Pixel 2 XL Android Q Beta 2 On IsoParser version 1.9.38
I’m trying to open an IsoFile via like this: val isoFile = IsoFile(Channels.newChannel(ByteArrayInputStream(base64DecodedString)
The resulting StackTrace error is the following:
java.lang.OutOfMemoryError: Failed to allocate a 2064261160 byte allocation with 7167453 free bytes and 505MB until OOM, target footprint 14334909, growth limit 536870912 at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:54) at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:49) at java.nio.ByteBuffer.allocate(ByteBuffer.java:282) at org.mp4parser.support.AbstractBox.parse(AbstractBox.java:96) at org.mp4parser.AbstractBoxParser.parseBox(AbstractBoxParser.java:115) at org.mp4parser.BasicContainer.initContainer(BasicContainer.java:107) at org.mp4parser.IsoFile.<init>(IsoFile.java:57) at org.mp4parser.IsoFile.<init>(IsoFile.java:52) at com.realeyes.adinsertion.exoplayer.PsshParser$Companion.getWidevinePSSH(PsshParser.kt:69) at com.realeyes.adinsertion.components.ads.live.VodPlaylistAdStitcher.checkForDrmKey(VodPlaylistAdStitcher.java:250) at com.realeyes.adinsertion.components.ads.live.VodPlaylistAdStitcher.parseWithVmapPrerolls(VodPlaylistAdStitcher.java:205) at com.realeyes.adinsertion.components.ads.live.VodPlaylistAdStitcher.getPlaylist(VodPlaylistAdStitcher.java:103) at com.realeyes.adinsertion.components.ads.StitchingAdManager.parse(StitchingAdManager.java:68) at com.realeyes.adinsertion.components.ads.StitchingAdManager.parse(StitchingAdManager.java:24) at com.google.android.reexoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:158) at com.google.android.reexoplayer2.upstream.Loader$LoadTask.run(Loader.java:389) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919)
Would greatly appreciate any advice on the following. I can’t seem to determine if it’s a truly known bug or not, or if it’s something I’m messing up. Let me know if I can give any more information on the issue I’m experiencing.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13
I have this issue as well, so does many other people. This question has been asked many times. Have a look at all the questions about this - #139 #151 #284 #299
Apparently it was fixed in #288 , but I still get this error.
I’m not if this will ever be fixed. It’s been 4 years since this issue has been reported.
I’m currently looking at other alternatives.
If you every get this error to go away, please let everyone know.
@thenotoriousrog I have created a new issue, I’ve added a project file and video to reproduce the issue, if you want to have a look.