java.lang.OutOfMemoryError: Could not allocate callback thunk

10 views
Skip to first unread message

Rob Arciere

unread,
Aug 7, 2020, 10:21:33 AM8/7/20
to jniwrapp...@teamdev.com

We recently ported our application to Linux and we now are sometimes receiving the following OutOfMemoryError on Linux.  We are calling a native method passing it a structure which contains properties as well as a Callback

 

Any thoughts would be appreciated?

 

Thanks,

 

Rob Arciere

 

com.ci.pl.service.ServiceException: java.lang.OutOfMemoryError: Could not allocate callback thunk
      at com.ci.pl.app.filesystem.driver.win.core.EventServiceImpl.register(EventServiceImpl.java:468)
      at com.ci.pl.instruction.WatchDirectoryOperations.perform(WatchDirectoryOperations.java:3263)
      at com.ci.pl.instruction.Command.run(Command.java:137)
      at com.ci.pl.agent.core.CommandInvoker$InvocationWorker.run(CommandInvoker.java:712)
      at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.OutOfMemoryError: Could not allocate callback thunk
      at com.jniwrapper.Callback.createNativeFunctionInstance(Native Method)
      at com.jniwrapper.Callback.write(SourceFile:519)
      at com.jniwrapper.av.doIO(SourceFile:18)
      at com.jniwrapper.Parameter.acceptIOPerformer(SourceFile:216)
      at com.jniwrapper.Structure.acceptIOPerformer(SourceFile:396)
      at com.jniwrapper.Pointer.writeReferencedObject(SourceFile:448)
      at com.jniwrapper.Pointer.write(SourceFile:261)
      at com.jniwrapper.Parameter.push(SourceFile:163)
      at com.jniwrapper.Pointer.push(SourceFile:389)
      at com.jniwrapper.Parameter.a(SourceFile:153)
      at com.jniwrapper.FunctionCall.a(SourceFile:121)
      at com.jniwrapper.FunctionCall.call(SourceFile:35)
      at com.jniwrapper.Function.invoke(SourceFile:188)
      at com.jniwrapper.Function.invoke(SourceFile:224)
      at com.ci.pl.app.filesystem.driver.win.core.EventServiceImpl.register(EventServiceImpl.java:294)
      ... 4 more

 

Nataliya Rybynok

unread,
Aug 10, 2020, 3:39:55 AM8/10/20
to Rob Arciere, Customer Care
Hello Rob,
Thank you for reaching out!

Is it possible to provide a complete example that can be used to reproduce this exception in our test environments?

In addition, could you please specify the Linux and Java versions for which this exception can be reproduced?  

Looking forward to your response,
Nataliya Rybynok

Customer Service Manager | TeamDev
Phone +380 57 766-4300
teamdev.com

--
You received this message because you are subscribed to the Google Groups "JNIWrapper Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jniwrapper-for...@teamdev.com.
To view this discussion on the web visit https://groups.google.com/a/teamdev.com/d/msgid/jniwrapper-forum/BL0PR02MB4739C08C9EAB996FF813E95AA6490%40BL0PR02MB4739.namprd02.prod.outlook.com.
Reply all
Reply to author
Forward
0 new messages