microAlexx - 2011-07-04

Hi,

I've got another error related to GetPickedObject.

When I have a scene with a lot of TGLLines (or maybe any object type), the GetPickedObject raise a exception, see below :

(French message)
Exception 'first chance' à $7C812AFB. Classe d'exception EAccessViolation avec un message 'Violation d'accès à l'adresse 00576F65 dans le module 'Project2.exe'. Ecriture de l'adresse 11841D18'. Processus Project2.exe (4104)

The code where the debugger stop, in GLSelection:

procedure TGLSelectRenderModeTechnique.SetObject(Value: TObject);
begin
  FObjectStack[FCurrentName] := Value; // HERE
  GL.LoadName(FCurrentName);
  Inc(FCurrentName);
end;

the Stack :

GLSelection.TGLSelectRenderModeTechnique.SetObject($12F1B0)
GLScene.TGLBaseSceneObject.Render(nil)
GLScene.TGLBaseSceneObject.RenderChildren(???,???,$12F91C)
GLScene.TGLImmaterialSceneObject.DoRender(???,???,True)
GLScene.TGLCameraInvariantObject.DoRender($12F91C,???,True)
GLObjects.TGLDummyCube.DoRender($12F91C,???,True)
GLScene.TGLBaseSceneObject.Render($12F91C)
GLScene.TGLBaseSceneObject.RenderChildren(???,???,$12F91C)
GLScene.TGLBaseSceneObject.DoRender(???,???,True)
GLScene.TGLBaseSceneObject.Render($12F91C)
GLScene.TGLSceneBuffer.RenderScene($B9F250,???,624,dsPicking,nil)
GLScene.TGLSceneBuffer.PickObjects(???,$C75A10,64)
GLScene.TGLSceneBuffer.GetPickedObjects(???,???)
GLScene.TGLSceneBuffer.GetPickedObject(809,330)

I have workaround this easy because I wasn't suppose to have so many TGLLines (mistake in my code)
But the way my application use can one day use a lot of TGLLines (or object object) and raise the same exception :(

Is this fixable on your side ?

Thanks you.

.µAlexx.