By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,650 Members | 1,368 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,650 IT Pros & Developers. It's quick & easy.

capture image from webcam using java

P: 1
In my java application i am using webcam to capture image and save into DB. this is working upto take 4 or 5 images after that ,its showing "Java Heap Space Error" below error

java.lang.OutOfMemoryError: Java heap space
at com.sun.media.BasicPlugIn.validateIntArraySize(Bas icPlugIn.java:168)
at com.sun.media.BasicPlugIn.validateData(BasicPlugIn .java:228)
at com.sun.media.codec.video.jpeg.NativeDecoder.proce ss(NativeDecoder.java:306)
at com.sun.media.BasicFilterModule.process(BasicFilte rModule.java:322)
at com.sun.media.BasicModule.connectorPushed(BasicMod ule.java:69)
at com.sun.media.BasicOutputConnector.writeReport(Bas icOutputConnector.java:120)
at com.sun.media.SourceThread.process(BasicSourceModu le.java:729)
at com.sun.media.util.LoopThread.run(LoopThread.java: 135)


Exception in thread "VFW Request Thread" java.lang.OutOfMemoryError: Java heap space
at com.sun.media.protocol.vfw.VFWSourceStream.doConne ct(VFWSourceStream.java:345)
at com.sun.media.protocol.vfw.VFWSourceStream.run(VFW SourceStream.java:763)
at java.lang.Thread.run(Thread.java:619)



after that i try to click means its showing some errors. i can't to find the problem. could any one help me please. Advance in thanks
Nov 7 '12 #1
Share this Question
Share on Google+
2 Replies


P: 2
It's OutOfMemoryError. I think you forgot to release your image memory after saving it to DB. Could you post the code about how you capture image from webcam?
Mar 18 '14 #2

Frinavale
Expert Mod 5K+
P: 9,731
It would help people to give you an answer to your question if you posted the code that causes the error.
Mar 19 '14 #3

Post your reply

Sign in to post your reply or Sign up for a free account.