I'm developing a geometry engine in Java using CasCade. I've generated all the Java bindings I need with WOK, and have been happily implementing the system. Every now and then, I get a JVM crash within the CasCade code. I determined that this can be prevented by enclosing some calls within a synchronize() block, using the static myCasLock Locker object defined in jcas.Object. This seems to solve the problem nicely.
My question is: does anybody know exactly when this synchronisation should be used? I don't want to put every thing into synchronize() blocks due to performance costs, but I don't want to miss out on a potentially dangerous call and have intermittent crashes.
Any help will be appreciated.