The reason for me to ask this question is that it points to the same .so file of mine for the fault.So it's a bug in your code.
Can it be due to some out-of-memory issue as am using Virtual machine?SIGSEGV doesn't mean out of memory. It indicates a bug in your code. Pointer problem. The register dump will tell you the pointer value.
I read in many forums similar issues were caused by out-of-memory errorsOnly possible by ignoring zero malloc()/calloc()/realloc() results. Never seen one of those myself except in a deliberate torture test. Nothing to do with Java heap exhaustion either.
Anyways any idea why the connection (opening and closing of device) might fail?You mean any idea why your unseen C code creates a pointer issue when opening or closing an unknown hardware device via an unknown API?
Sreram wrote:I seriously doubt you saw "many forums" in relation to a Java/JNI program which was caused by out of memory. That is because the error you posted is, in the vast majority of cases, caused by a pointer bug.
I read in many forums similar issues were caused by out-of-memory errors,
Anyways any idea why the connection (opening and closing of device) might fail?Pointer bug. Standard problem in C/C++. It can cause all sorts of problems including any or all of the following (but not only these.)