question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Opening IsoFile throws OutOfMemory Exception on Android

See original GitHub issue

Hello 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:closed
  • Created 4 years ago
  • Comments:13

github_iconTop GitHub Comments

2reactions
HBiSoftcommented, May 8, 2019

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.

0reactions
HBiSoftcommented, Jun 2, 2019

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How Does OutOfMemory Error Happen and How to Solve it in ...
When you run an application on an Android device, the Android system allocates memory to it in order for it to function.
Read more >
When Android gives OutOfMemory Exception? - Stack Overflow
For example, I've a device with 2GB RAM installed, 500MB is taken by OS, 500 MB is taken by other apps. Now my...
Read more >
Out Of Memory Exception. - Aman Shekhar - Medium
In Java, all objects are stored in the heap. Every Android developer must have encountered the OutOfMemoryError, also known as OOME.
Read more >
How to Handle the OutOfMemoryError in Java - Rollbar
A java.lang.OutOfMemoryError is a runtime error in Java which occurs when the JVM is unable to allocate an object due to insufficient space ......
Read more >
3.2 Understand the OutOfMemoryError Exception
Usually, this error is thrown when there is insufficient space to allocate an object in the Java heap. In this case, The garbage...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found