Thank you Rafa,

I will test use of VC6 targets instead of cross compile mingw targets.
I use personal wrapper, only one jni function to init and one jni to draw.
This bug  is  on  a few  of  computers windows/nvidia, not all nvidia , only
windows computer.

Thanks,

On 11/22/06, Rafa Gaitan <[EMAIL PROTECTED]> wrote:

Hi Bertrand,

I'm not sure if I can help, but I'm developping some libraries in C++ with
JNI wrappers
to Java. The way I debug on Windows is using the magical Attach to process
function in
Visual Studio project...

So you only should excute your Java application in debug (I use Eclipse
and I put a Breakpoint on
the System.loadLibrary(...) method) then open Visual Studio project,
Debug->Process, and select
the java process which is your process (do not select the java with the
eclipse process). and then
do the attach to process in native mode. Then you can continue excution on
java.. and whenever you
put a breakpoint on C++.. the VS should stop there. Obviously the dll must
be in debug! :D

I'm not sure what technology are you using to work on Java, but a year
ago.. I was working with
JavaOSG bindings.. and I get the same error. Now I'm working with my own
bindings.. against
own libraries that do the hard job on OSG.

Hope this helps to you.

Rafa.



On 11/22/06, bertrand greslier <[EMAIL PROTECTED]> wrote:

>
>
> On 11/22/06, Robert Osfield < [EMAIL PROTECTED]> wrote:
> >
> > Hi Bertrand,
> >
> > On 11/22/06, bertrand greslier <[EMAIL PROTECTED]> wrote:
> > > > The stack trace doesn't help too much without debug info of line
> > > > numbers/files.  Could you reproduce this with a debug build?
> > > It is possible to make debug build but on windows system it is very
> > hard or
> > > impossible to obtain line number on a java jvm crash of the
> > navigator...
> >
> > Could you try and catch the expeption on the C++ side?
>
>
> If a JNI (Java Native Interface) crash on a segfault, the jvm
> crash...and genete a log stack trace
> If there is a unhandled C++ exception, the jvm is closed but I catch all
> C++ exception on each frame link this :
>
> try {
>     cooki3d::BD * pBD = (cooki3d::BD*)bdId;
>     assertC2( BD::checkAdrBD( pBD), NULL  );
>     EnvironnementJava * ej =
>       static_cast<EnvironnementJava*>( pBD->getEnv());
>
>     if(ej){
>       ej->appIdle();
>     }
>   }
>   catch(AssertException e){
>     CERRs("Java_jni_canvas_jogl_GearRenderer_display")
>       << "Exception AssertException caught !! "
>       <<  std::endl;
>     CERRnext <<e.getStackTrace()<<endl;
>   }
>   catch( ... ) {
>     CERRs("Java_jni_canvas_jogl_GearRenderer_display")
>       << "Exception caught !! "<<  std::endl;
>   }
>
>
> > > > Some general notes,  are you using the OSG single threaded?  You
> > can
> > > > safely use OSG multi-threaded by there are rules you need to
> > follow.
> > >
> > > I use the default OSG1.2, I think it is multi-threaded? I haven't
> > care of
> > > this until today.
> > > Also I use SDL threads, mutex, semaphore for my application.
> > > What I need to follow?
> >
> > The OSG doesn't automatically multi-threaded things apart for the
> > DatabasePager, so if you arn't creating threads on top of the OSG and
> > running different parts of it multi-threaded then the OSG will be
> > single thread.
> >
> > In the case of osgProducer/Viewer/Producer based apps the
> > multi-threading is done per camera, so if you have two cameras on two
> > windows you can have several threads running, but if you have just one
> >
> > camera on one window it'll run single threaded.
> >
> > Could you explan a bit more about the way you use the OSG, how many
> > camera etc.
>
>
>
> In my case, the user has only one applet started, so there is only on
> camera or OSG thread.
>
>
> > > Are you using ref_ptr<> for the handles to the scene
> > graph/sceneview?
> > >
> > > In some old codes I use directly ptr but I make manualy ref() and
> > un_ref().
> >
> > Unless there is a very good reason why you can't use ref_ptr<> use it.
> > There are some very rare instances where ref() and unref() are
> > required but if you do use them you have to be very careful to make
> > sure that they are matched in all branches of your code.
> >
> > ref_ptr<> is automatically safe in presence of exceptions too,
> > something that ref/unref() can't be.
> >
> > > > Could you also give a bit more info on the types of machines
> > > > everything works on and the types of machines where the problems
> > > > occur.
> > >
> > > I know a user has WindowsXP and a Geforce3...
> > > I haven't more informations.
> >
> > Ahh remote debugging ahhh.  I feel for your plight.
> >
> > I don't really have much to suggest right now.  Isolating where the
> > problem is stemming from is essential.  It could be a memory error, so
> >
> > the cause and effect might be rather disjoint.
> >
> > Robert.
>
>
>
> thank for your help, I will try to clean up.
>
> --
> Bertrand Greslier
> http://www.cooki3d.org
>
> _______________________________________________
> osg-users mailing list
> osg-users@openscenegraph.net
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
>

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/




--
Bertrand Greslier
http://www.cooki3d.org
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to