NOutOfMemoryError on Android application

General information about Neurotechnology and its software

NOutOfMemoryError on Android application

Postby carlosmagno » May 06, 2019 19:13

Hello

I"m dealing with a peculiar error.
It occurs not always, but after the first occurrence it continues to occur until the device is turned off. The error does not disappear if the device is restarted. Also, this error is holding on to a specific device: Samsung Galaxy J2 Prime (SM-G532MT) running Android 6.0.1.

The error is:
Code: Select all
com.neurotec.lang.NOutOfMemoryError: Out of memory

From:
Code: Select all
com.neurotec.biometrics.NBiometricEngine.createTemplate

The stack trace:
Code: Select all
java.lang.RuntimeException: One or more errors occurred
   at com.neurotec.lang.NResult.checkAll(NResult.java:313)
   at com.neurotec.lang.NResult.raiseError(NResult.java:323)
   at com.neurotec.lang.NResult.check(NResult.java:224)
   at com.neurotec.biometrics.NBiometricEngine.createTemplate(NBiometricEngine.java:342)
Caused by: com.neurotec.util.concurrent.NAggregateExecutionException: One or more errors occurred
   at com.neurotec.util.concurrent.ConcurrentUtilErrorCreator.create(ConcurrentUtilErrorCreator.java:17)
   at com.neurotec.lang.ChainedErrorCreator.create(ChainedErrorCreator.java:22)
   at com.neurotec.lang.NError.get(NError.java:174)
   at com.neurotec.lang.NError.get(NError.java:191)
   at com.neurotec.lang.NError.getLast(NError.java:205)
   at com.neurotec.lang.NResult.checkUnchecked(NResult.java:235)
   ... 5 more
Caused by: com.neurotec.lang.NOutOfMemoryError: Out of memory
   at com.neurotec.lang.RuntimeErrorCreator.create(RuntimeErrorCreator.java:44)
   at com.neurotec.lang.ChainedErrorCreator.create(ChainedErrorCreator.java:22)
   at com.neurotec.lang.NError.get(NError.java:174)
   at com.neurotec.lang.NError.get(NError.java:168)
   ... 8 more

The template creation method is called from:
Code: Select all
private static NSubject createSubjectFromImage(NBiometricClient client, byte[] image) throws Exception {
   NImage nImage = null;
   NSubject subject = new NSubject();
   NFace face = new NFace();

   ByteBuffer buffer = ByteBuffer.wrap(image);
   nImage = NImage.fromMemory(buffer);
   face.setImage(nImage);
   subject.getFaces().add(face);
   NBiometricStatus status = client.createTemplate(subject);
   if(status != NBiometricStatus.OK){
      throw new Exception(status.toString());
   }
   return subject;
}

Although the error is related to a supposed lack of memory, analysis of the application heap and system memory usage information shows that the device has available memory at the moment of the error.
I would like to know what information I should fetch to try to figure out what might be causing this error.

Regards.
carlosmagno
 
Posts: 1
Joined: May 03, 2019 18:53

Re: NOutOfMemoryError on Android application

Postby MartynasV » May 07, 2019 09:19

Hello,

Please provide SDK revision number(can be found in SDK root directory, in Revision.txt file).
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 507
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania


Return to Public

Who is online

Users browsing this forum: No registered users and 2 guests