DiscussionsIssue archiveOCCT:Visualization

Archived issue #0007721

Visualization of 33 000 interactive objects crashes an application

Open CASCADEOCCT:Visualizationclosed0 public notes

Search issues

Description

Try to display 33 000 interactive objects (any!), an exception is being raised
in TKOpenGl. As far as I can judge, it occurs in the mechanism of allocation of
objects in memory (specific mechanism of TKOpenGl).
In order to reproduce the bug I used Official Open CASCADE sample:
graphic3ddemo. Insert the following code into onAbout() method:


#include <TopoDS_Vertex.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_Shape.hxx>
void Application::onAbout()
{

    Handle(AIS_InteractiveContext) IC = getActiveMDI()->getDocument()->getContext();
    for (int i = 1; i <= 100000; i++)
    {
        gp_Pnt p(i, i, i);
        TopoDS_Vertex V = BRepBuilderAPI_MakeVertex(p);
        Handle(AIS_Shape) A = new AIS_Shape(V);
        IC->Display(A, false);
    }
    IC->UpdateCurrentViewer();


  QMessageBox::information(this,tr("TIT_ABOUT"),tr("INF_ABOUT"), tr("BTN_OK"),
                         QString::null, QString::null, 0, 0);
}

Just call Help / About menu command to see the crash.

Additional information

Documentation remark, added by Author 2008-05-22 11:23:20:

Improvements:
There was a restriction of visualization of about 33 000 interactive objects.
Now this restriction is removed.
Modified entities:
OpenGl/OpenGl_GraphicDriver.cxx

Public activity

No public notes

Participants are labeled by their role within this record.