• Post Reply Bookmark Topic Watch Topic
  • New Topic

JNI crashes my JVM mysteriously

 
Daniel Gagnon
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm writing an app in C++ / Clojure using Java as the glue between the two. I have one java class where everything is static that has methods meant to be called to control the clojure part. So far, I'm calling Java from C++ but not the reverse.

On the C++ side, I own a class ID and several method IDs but do not otherwise retain any Java object. It works great except when I call a particular void method which takes a int that result in a JVM crash, unless I comment out a particular line that works great when called from Java.

The method is as follow:



removeColumn is a Clojure var that contains a clojure function. It does not throw an exception (I tried replacing the throws Exception by a try / catch block to print the stack trace and there's no exception thrown). I can call other Clojure functions in that method if I want to and there's no crash. And if I just call the method from java, no problem at all.

I don't know where I should look to find a clue to help me fix the problem. If someone can help, it would be much appreciated.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!