Problem Description : Seeking for guidance
mohit.garg at appulse.com
Wed Feb 6 04:53:00 PST 2013
We are developing a product since last 8 months .
This product is a pretty basic video editor with mainly video cutting
functionality. We chose JavaFx
because the aim initially was to make a cross platform tool for Windows and
Mac. Moreover it
was also desired to run this application both as a desktop and as a web app.
The good thing is that this product is running happily on Mac(with slight
video seeking speed issue, anyways that's trivial for now)
Now let's come to the problem part. The problem is windows. This product
doesn't seem to fit for windows.
On Windows when we launch the product it starts off cool, runs cool but as
we start playing with the product virtual memory usage
starts increasing(as visible from the task manager).As with any memory
related problem we fired up the netbeans profiler, eclipse memory analyzer
After lots of analysis and grueling testing we decided that it's not the
heap which is problem as heap is getting managed properly and
profiler never showed heap going out of bounds. Moreover, we are not getting
any OutOfMemoryException. The only thing we are getting is a crash,
a proper windows process crash of java.exe with the following message :
"Unspecified fatal error encountered, Aborting".
As it is easy to guess, this message is not java/javafx specific ? Every
time it crashes, windows points out to MSVCR100.dll file as fault module.
As for the solution we have tried different profilers(but they are not
helpful as problem seems to lie outside of profiler's scope) ? Can it be
because of JNI calls
Made by JVM/JavaFx library to render the video ? Or Display Driver ?
I have tried dumping the java.exe process but couldn't find the required
symbols to analyze in windbg or any other such debugging tool so that we
could track down the error. We have also tried analyzing the heap memory of
windows (and not java) using vmmap tool of sysinternals.com. This tool
showed that there is continuous increase in windows heap memory with
prolonged usage of the tool. This has hinted us that there is some memory
leak in some native code but I am not very sure.
We filed out a Jira about JavaFx Mediaview not closing file handles on
video files even after playing is stopped(Initially we suspected this issue
could be the cause of memory leak but even after getting around with this we
couldn't stop leaking memory).Another activity which continually increases
the memory usage is seeking of video file(and memory never comes down
afterwards).However the problem escalated even more when I created a small
testApp with no file handle issue(solved) and no seeking issue(no seeking
used in testapp) but the memory was still leaking however slower than
I am attaching the testApp link. This testapp is intended to play HD H.264
mp4 files which one can find everywhere.
To reproduce the crash please run this on windows 7 machine. Load as many as
5 to 6 mp4 videos in the ListView and keep switching between videos
rigorously. You can open the task manager in side and can view the
continuous increase in virtual memory. I hope it will crash @ your end
within minutes with same message "Unspecified fatal error encountered,
We are seriously stuck in this problem and looking for help from all
veterans here. Please do the needful.
Thanks in advance.
More information about the openjfx-dev