Looking for working Ardor3d example...

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Looking for working Ardor3d example...

gouessej
Administrator
It probably comes from your own code, it often occurs during an attempt of reading a buffer beyond its limit or its capacity, look at how you use your buffers. You don't provide any test case to reproduce this crash, I'm not a magician...
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Looking for working Ardor3d example...

Clint
In reply to this post by Clint
I think my bug may be unrelated to JOGL and Ardor3D.  I posted an explanation about how to use Ardor3D models in World Wind here: http://forum.worldwindcentral.com/showthread.php?45896-Collada-models-with-lighting&highlight=collada+lighting
Reply | Threaded
Open this post in threaded view
|

Re: Looking for working Ardor3d example...

Clint
In reply to this post by gouessej
Before going any further, I want to say thank you for the repeated help.  You're amazing.

I am still getting the error.  It seems most likely to occur if I am far away and move to the model quickly.  You can find the sample code at this link: http://forum.worldwindcentral.com/showthread.php?45896-Collada-models-with-lighting , but I imagine the problem lies somewhere in the code below.  I have no idea what a DirectNioBuffersSet is or how to use it, so that's probably the source of the issue:

    public static void initializeArdorSystem(final DrawContext dc) {
        if (ContextManager.getContextForKey("HACKED CONTEXT") != null) {
            RenderContext rc = ContextManager.switchContext("HACKED CONTEXT");
            return;
        }

        Logging.logger().info("ARDOR INITIALIZER -->>  initializeArdorSystem");
        DirectNioBuffersSet dnbs = new DirectNioBuffersSet();
        final JoglContextCapabilities caps = new JoglContextCapabilities(dc.getGL(), dnbs);
        final JoglRenderContext rc = new JoglRenderContext(dc.getGLContext(), caps, dnbs);

        ContextManager.addContext("HACKED CONTEXT", rc);
        ContextManager.switchContext("HACKED CONTEXT");
        Camera cam = new Camera() {
            @Override
            public FrustumIntersect contains(BoundingVolume bound) {
                return FrustumIntersect.Inside;
            }
        };
        ContextManager.getCurrentContext().setCurrentCamera(cam);
        AWTImageLoader.registerLoader();
    }
Reply | Threaded
Open this post in threaded view
|

Re: Looking for working Ardor3d example...

robotfire
It seems that if I create the RenderContext every time this is called (it's called every time a collada is rendered), then the crash does not happen.  However, the models are completely white.  Any ideas?
Reply | Threaded
Open this post in threaded view
|

Re: Looking for working Ardor3d example...

gouessej
Administrator
You shouldn't create the render context at each display.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Looking for working Ardor3d example...

Clint
I tried removing that, because it seemed strange.  It didn't make a difference, though.  If I make a version of this program that I can share (which still causes the problem), can I post it for you to look at?  Is there some way to identify what is being called on the java side right before this happens?

I took ardor3d and made my own version, making modifications that are honestly mostly guesses.  I did get the error to stop happening on one machine by looking at the ardor3d 1.0 code, but two other machines still repeatedly get the problem.  Is there some way to run jogl in some sort of safe mode?  Is there some way to guarantee that the buffers are cleared or something?

Thanks again.

Clint
Reply | Threaded
Open this post in threaded view
|

Re: Looking for working Ardor3d example...

gouessej
Administrator
Have you tried to enable all logs?
http://jogamp.org/wiki/index.php/Jogl_FAQ#Detailed_Bug_Information

You can enable the logs in JogAmp's Ardor3D Continuation by using the flag "useDebug" when creating the canvas renderer that you pass to the canvas or window.
Julien Gouesse | Personal blog | Website
12