Trouble with AIS_InteractiveContex Load Method

Hello,

I transform my Project from OCCT 6.7.0 to OCCT 7.1.0.

CAD_Models can be load and viewed sucessful im my Viewer.

Using the Load Method of AIS_InteractiveContex  i get a crash.

 

Handle(AIS_InteractiveContext) const & myOperationContext;

class Workpiece
{
    public:
    Workpiece(Handle(AIS_Shape) const & shape);

    private:
    Handle(AIS_Shape) myShape;

    Handle(AIS_Shape) const & GetShape() const
    {
        ASSERT(!myShape.IsNull());
        ASSERT(!myShape->Shape().IsNull());
                       
        return myShape;
    }
}

// .. Loading sucessful workpiece(shape) via IGS-Interface :
// .. result = CImportExport::ReadIGES(file,shape);

Handle(AIS_Shape) s = new AIS_Shape(shape); //ok
ASSERT(!s.IsNull()); // ok

Workpiece * const model = new Workpiece(s); // ok
ASSERT(model);

// ... model is displayed in Viewer
myAISContext->Display( s, false ); // ok

........
myOperationContext->Load(model->GetShape()); // Crash

Heinz R.'s picture

Hi,

sorry for the break.

Some further informations:

Windows 10 64 bit

Visual Studio 2010 - debug - 32 bit

Happy Easter und Thank you for  a hint !

Heinz

Kirill Gavrilov's picture

Visual Studio 2010 - debug - 32 bit

So what is the call stack?
Have you tried to see using debugger what happens wrong inside AIS_InteractiveContext::Load() leading to crash?

Heinz R.'s picture

Hi,

the call stack gives this message:

     KernelBase.dll!7445dad8()     
     [Unten angegebene Rahmen sind möglicherweise nicht korrekt und/oder fehlen, keine Symbole geladen für KernelBase.dll]    
     KernelBase.dll!7445dad8()     
     msvcr100.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo)  Zeile 157    C++
     TKV3d.dll!63ae7201()     
     TKernel.dll!635dd68a()     

The Microsoft Visual C++ 2010 SP1 Redistributable Package (x86) was correct installed.

The OCCT 7.1.0 DLL's were compiled in 32 bit release-mode.