I am using fob4jmf version 0.4.1. I have a java program that loops through a set of movie clips. After couple of iterations, I get java.lang.OutOfMemoryError: Java heap space.
When I run this in netbeans Profiler and look at the call stack for the largest memory allocated, I get the following call stack:
the latest version of Fobs fixed many problems related to memory leaks. However, these changes haven't been comitted to the stand_alone_codec class.
So, are you using Fobs datasources and Parser? If so, you've found yet another memory leak. If using the stand_alone_codec, you'll have to wait till I find some time to comit the changes to the experimental face of Fobs.
Jose San Pedro
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi you can resolve this problem
(java.lang.OutOfMemoryError: Java heap space.)
using a command line when you start the java
application, use this command line:
java -Xmx450M -XX:MaxDirectMemorySize=350M YourApplication
this parameters denote the memory your app can use.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problems seems be that FOBS spawns the following two thread every time you play media and which do not exit when the player is closed. As a result, there is a massive buildup of threads when you play media in playlist or loop. Hence the increase it memory usage. Need help with solution.
Name: JMF thread: SendEventQueue: com.sun.media.PlaybackEngine
State: WAITING on com.sun.media.SendEventQueue@1d13a79
Total blocked: 0 Total waited: 1
Stack trace:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
com.sun.media.util.ThreadedEventQueue.dispatchEvents(ThreadedEventQueue.java:50)
com.sun.media.util.ThreadedEventQueue.run(ThreadedEventQueue.java:92)
Name: JMF thread: SendEventQueue: com.sun.media.content.unknown.Handler
State: WAITING on com.sun.media.SendEventQueue@1b12d63
Total blocked: 0 Total waited: 1
I am using fob4jmf version 0.4.1. I have a java program that loops through a set of movie clips. After couple of iterations, I get java.lang.OutOfMemoryError: Java heap space.
When I run this in netbeans Profiler and look at the call stack for the largest memory allocated, I get the following call stack:
int[] ----> com.omnividea.media.parser.video.VideoTrack.readFrame (javax.media.Buffer) ---> com.sun.media.SourceThread.process() ---->
com.sun.media.util.LoopThread.run()
It does not point to anywhere within my code!
I have more detail information on how I reproduced the problem at:
http://forum.java.sun.com/thread.jspa?threadID=5160906
Anyone noticed a memory leak problem in the fobs code before? Any help would be appreciated.
Anyone?
Hi there,
the latest version of Fobs fixed many problems related to memory leaks. However, these changes haven't been comitted to the stand_alone_codec class.
So, are you using Fobs datasources and Parser? If so, you've found yet another memory leak. If using the stand_alone_codec, you'll have to wait till I find some time to comit the changes to the experimental face of Fobs.
Jose San Pedro
Hi you can resolve this problem
(java.lang.OutOfMemoryError: Java heap space.)
using a command line when you start the java
application, use this command line:
java -Xmx450M -XX:MaxDirectMemorySize=350M YourApplication
this parameters denote the memory your app can use.
The problems seems be that FOBS spawns the following two thread every time you play media and which do not exit when the player is closed. As a result, there is a massive buildup of threads when you play media in playlist or loop. Hence the increase it memory usage. Need help with solution.
Name: JMF thread: SendEventQueue: com.sun.media.PlaybackEngine
State: WAITING on com.sun.media.SendEventQueue@1d13a79
Total blocked: 0 Total waited: 1
Stack trace:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
com.sun.media.util.ThreadedEventQueue.dispatchEvents(ThreadedEventQueue.java:50)
com.sun.media.util.ThreadedEventQueue.run(ThreadedEventQueue.java:92)
Name: JMF thread: SendEventQueue: com.sun.media.content.unknown.Handler
State: WAITING on com.sun.media.SendEventQueue@1b12d63
Total blocked: 0 Total waited: 1
Stack trace:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)
com.sun.media.util.ThreadedEventQueue.dispatchEvents(ThreadedEventQueue.java:50)
com.sun.media.util.ThreadedEventQueue.run(ThreadedEventQueue.java:92)