필터 지우기
필터 지우기

java.lang.​OutOfMemor​yError: Java heap space using Matlab R2013a Java version 1.6.0_35-b10

조회 수: 1 (최근 30일)
Hi,
  • I have download and installed Java 1.6.0_35-b10, so without while loop if i list add working , but when i have used while loop then i am getting java.lang.OutOfMemoryError: Java heap space.?
On Mat-lab Part Side
list=java.util.ArrayList();
for k=1:length(matrix)
list.add(int32(matrix(k)));
end
import edu.lipreading.*;
training = MainMethod;
training.list_method(list);
on Java Class Part Side
public void list_method(List<Integer> points){
while(true){
Sample sample = new Sample();
sample.getMatrix().add(points);
}
}
I am getting error when i am run my mat-lab application.?
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2734)
at java.util.Vector.ensureCapacityHelper(Vector.java:226)
at java.util.Vector.add(Vector.java:728)
at edu.lipreading.MainMethod.onRecord(MainMethod.java:40)
at edu.lipreading.MainMethod.list_method(MainMethod.java:26)
  • Note :please let me know where i have done mistaken ?because from input web cam video processing various coordinates values in list 1-by-8 matrix .?
  • Example :matrix =[1,2,3,4,5,6,7,8] ,[554,33,2,2,544,2332,2,2] etc..
  • Note 2: I have followed result link also ,but i cannot resolved my issue please let me know .
  • Link 1 : outofmememoryerror
  • Link 2: java.opts file
  댓글 수: 3
Patrik Ek
Patrik Ek 2014년 3월 11일
편집: Patrik Ek 2014년 3월 11일
You mean kind of "I want a two vector outputs, but get only one"? It kind of seems fair enough to me. Are you sure that your webcam returns the output you want from it. I seems to me that one 1-by-8 vector is returned for every reading.
SAMEER ahamed
SAMEER ahamed 2014년 3월 12일
Thanks for reply me . yes from input web cam video i have 1-by-8
On Mat-lab Part
matrix=[right_lip_x;right_lip_y;left_lip_xy;left_lip_yx;upper_lip_x;upper_lip_y;bottom_lip_x;bottom_lip_y]; %1-by 8 vector values
list=java.util.ArrayList();
for k=1:length(matrix)
list.add(int32(matrix(k)));
end
import edu.lipreading.*;
training = MainMethod;
training.list_method(list);
On Java Part
public void list_method(List<Integer> points){
Sample sample = new Sample();
//Sample Class having private List<List<Integer>> matrix; Getter and Setter Method
sample.getMatrix().add(points);
}
My Result showing like :Sample [id=web cam 10:41:06 11/03/2014, matrix=[136, 41, 1, 41, 77, 8, 77, 72]] Sample [id=web cam 10:41:12 11/03/2014, matrix=[170, 49, 10, 49, 88, 10, 88, 84]] etc..
Actually I want to Expected result like Sample [id=web cam 10:41:12 11/03/2014, matrix=[136,41,1,41,77,8,77,72],[170, 49, 10, 49, 88, 10, 88, 84]] please let me know how i can get result?.
  • Note :If i have applied while loop list add i am getting error like java.lang.OutOfMemoryError: Java heap space.*

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by