Re: [osg-users] Building JNI wrapper for OSGdem

2012-05-12 Thread Rafa Gaitan
Hi Sean, Not sure of what's the problem there. I think you need to debug the problem by yourself. When we need to debug JNI code we build all in debug (or release with debug info) and use the 'Attach to process' functionality in debuggers. Attaching to java process and then setting the breakpoint

Re: [osg-users] Building JNI wrapper for OSGdem

2012-05-09 Thread Sean K
Thank you for the background information. There is different JNI issue that I am encountering. I was invoking a static function member from the native code. At this point, I dont mind using a static function member, but for thread safety in subsequent release, I need to switch it to use an insta

Re: [osg-users] Building JNI wrapper for OSGdem

2012-05-09 Thread Jason Daly
On 05/09/2012 12:39 PM, Sean K wrote: Hi Rafa Thank you so much for looking at the problem -- having a second set of eyes look at a problem is so valuable. You were right -- The OSG and VPB -- I was using release builds. But my own DLL -- I had it in the DEBUG build. After I changed to RELEA

Re: [osg-users] Building JNI wrapper for OSGdem

2012-05-09 Thread Sean K
Hi Rafa Thank you so much for looking at the problem -- having a second set of eyes look at a problem is so valuable. You were right -- The OSG and VPB -- I was using release builds. But my own DLL -- I had it in the DEBUG build. After I changed to RELEASE build, the crash did not happen anymo

Re: [osg-users] Building JNI wrapper for OSGdem

2012-05-09 Thread Rafa Gaitan
Hi Sean, The first I spotted watching your stacktrace is that your are mixing debug with release libraries. AFAIK on windows mixing debug and release always gives problems, so the best you can do if you want to debug your code is build osg in debug or build your code in release with debug symbols.

Re: [osg-users] Building JNI wrapper for OSGdem

2012-05-08 Thread Sean K
Hi, I took a look at your code. It looks good. Since the *.h headers from OSG and VPB DLLs are not intended for java JNI invocation, I see that your code has built is own DLL which in turn uses the OSG runtimes. I am taking this similar approach -- as follow... Since I want to do what osgdem.

Re: [osg-users] Building JNI wrapper for OSGdem

2012-05-05 Thread Sean K
thanks! On May 4, 2012 4:02 PM, "Rafa Gaitan" wrote: > Hi Sean, > > We have made lot of JNI stuff in osgVirtualPlanets. Is a the GIS > library for gvSIG3D that we developed. > > svn co https://devel.gvsig.org/svn/osgvp/trunk > > The wrappers are inside wrappers directory. Is not exactly what are

Re: [osg-users] Building JNI wrapper for OSGdem

2012-05-04 Thread Rafa Gaitan
Hi Sean, We have made lot of JNI stuff in osgVirtualPlanets. Is a the GIS library for gvSIG3D that we developed. svn co https://devel.gvsig.org/svn/osgvp/trunk The wrappers are inside wrappers directory. Is not exactly what are you looking for, but maybe you find inspiration in the code. Cheers

[osg-users] Building JNI wrapper for OSGdem

2012-05-04 Thread Sean K
I am looking to build a Java wrapper with JNI around the code which basically exists inside of osgdem.cpp. The bulk of that code resides in vpb.dll and osgDB.dll. Anybody tried this? I am guessing others have already done this. I also want to send back the console output back to the java calle