chadandroid / mp4parser

Automatically exported from code.google.com/p/mp4parser
0 stars 0 forks source link

java.lang.RuntimeException: too many PopLocalFrame calls #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On Android 4.0.3, Nexus S

With an audio file approximately longer than 30 seconds, we see:

java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:278)
at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.RuntimeException: too many PopLocalFrame calls
at libcore.io.Posix.writev(Native Method)
at libcore.io.BlockGuardOs.writev(BlockGuardOs.java:196)
at java.nio.IoVec.doTransfer(IoVec.java:81)
at java.nio.FileChannelImpl.transferIoVec(FileChannelImpl.java:327)
at java.nio.FileChannelImpl.write(FileChannelImpl.java:505)
at java.nio.channels.FileChannel.write(FileChannel.java:716)
at 
com.googlecode.mp4parser.authoring.builder.DefaultMp4Builder$InterleaveChunkMdat
.getBox(DefaultMp4Builder.java:448)
at com.coremedia.iso.IsoFile.getBox(IsoFile.java:177)
at com.todoroo.aacenc.AACToM4A.convert(AACToM4A.java:40)

at android.os.AsyncTask$2.call(AsyncTask.java:264)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
... 5 more

Original issue reported on code.google.com by hunt...@gmail.com on 4 Sep 2012 at 7:40

GoogleCodeExporter commented 9 years ago
* please check if reproducable in simulator
* please attach simple example

Original comment by Sebastian.Annies on 10 Sep 2012 at 2:06

GoogleCodeExporter commented 9 years ago
I refuse to engage in your requests. Where are you based. Fly to NYC and let me 
show you in person

Original comment by hunt...@gmail.com on 10 Sep 2012 at 2:10

GoogleCodeExporter commented 9 years ago
The simulator is irrelevant. Android phones ARE simulators.

Do you not have an Android phone? If so ,I personally will send you one.

Original comment by hunt...@gmail.com on 10 Sep 2012 at 2:13

GoogleCodeExporter commented 9 years ago
Since I'm providing the support here for free I expect you to deliver an 
example for me to reproduce the issue and to stay calm and polite.

I don't have a Nexus S and since the problem does not occur on every device the 
question if you can reproduce problem also on the simulator is NOT irrelevant. 
I'm not going to try to reproduce the problem when I cannot be sure that the 
problem is even reproducable on my device or with my input data.

As you can see from the stacktrace the problem happens when the 
DefaultMp4Builder calls write(ByteBuffer[] srcs). That call causes something 
internal to go wrong. 

Nevertheless I changed the DefaultMp4Builder code in the trunk a bit so that no 
more than 64 byte buffers are written at a time. You could try that but since I 
haven't reproduced the problem it's just a gut feeling. If it's still failing 
you could set the public static DefaultMp4Builder#STEPSIZE to 1. If that still 
doesn't cure your problem I'll really need to reproduce the problem with your 
help. 

Original comment by Sebastian.Annies on 10 Sep 2012 at 2:49

GoogleCodeExporter commented 9 years ago
Sounds good ! I will try and report !

Original comment by hunt...@gmail.com on 10 Sep 2012 at 7:18

GoogleCodeExporter commented 9 years ago
Hi,

I managed to create the nearly minimal case where this error is exhibited. I'm 
sorry for the extra cruft, it's just an empty IntelliJ Idea project with the 
video handling run from the activity oncreate.

I tried to run it on Samsung Galaxy Nexus (Android 4.1) and Samsung Galaxy Tab 
7.7 (Android 4.0) and both crash with the too many PopLocalFrame calls. I then 
tried running it on two emulators. On 3.2 emulator the test app runs just fine 
and the output.mp4 is correctly generated. 4.0.3 emulator hangs similarly to 
the galaxies.

Please download the video: http://dl.dropbox.com/u/20811996/input.mp4 (320x240 
3min 2sec)and push it to the emulator at /sdcard/input.mp4, then run the app.

Please don't hesitate to contact me, I may have a stab at fixing this myself 
tomorrow during office hours(GMT +3)

-Jaakko Nissi

Original comment by jaakko.n...@gmail.com on 17 Oct 2012 at 12:33

Attachments:

GoogleCodeExporter commented 9 years ago
Hmm,

I'm sorry I bothered you with this extra material before testing through. I 
just compiled the latest trunk from svn and the test app seems to run fine when 
compiled with that isoparser jar. 

Hopefully we can expect the RC-16 jar sometime soon. Meanwhile I'll use the jar 
I just compiled with the main software I'm writing and test even longer videos. 
I'll report back on how it goes.

 -Jaakko Nissi

Original comment by jaakko.n...@gmail.com on 18 Oct 2012 at 6:17

GoogleCodeExporter commented 9 years ago
Oh, and I was using RC-15 with the failing app, so it seems your gut feeling 
was spot on.

 -Jaakko Nissi

Original comment by jaakko.n...@gmail.com on 18 Oct 2012 at 6:18

GoogleCodeExporter commented 9 years ago
A video of 13 minutes 1 seconds went through just fine, so I'll just shut up 
and stop spamming now.

 -Jaakko Nissi

Original comment by jaakko.n...@gmail.com on 18 Oct 2012 at 6:52

GoogleCodeExporter commented 9 years ago

Original comment by Sebastian.Annies on 26 Nov 2012 at 12:30