From: Martin P. <pru...@gm...> - 2010-02-12 17:39:11
|
On Wed, Feb 10, 2010 at 5:17 PM, Carlos Alberto Bulant <car...@gm...> wrote: > i've being doing some tests, and i belive that the problem is that the > openmp native code generated in the stack of the second thread is > trying to access the objects declared in the main thread, and thats > the access violation. > > i put the creaon of the objects into he second thread run method, > before i call to the native code, and it doesn't complain enymore... Never used openmp, my java skills are rusty, don't know your code, but I will give a wild guess =) By a quick look at the log file I would tell your givin a null pointer to the native code. Your code somewhat looks like: //--------------------------------------- AnObject o; void MethodInTheMainThread(){ AnObject o = new AnObject(); RunTheScondThread(); } void MethodInTheSecondThread(){ CallToNativeMethod( o ); } //--------------------------------------- If so just changing the line "AnObject o = new AnObject();" to "o = new AnObject();" shall work. If not sorry by my wrong guess =) Martin Prusse |