For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Using Cascade on Windows 95/98

Anonymous's picture
Forums: 

Dear all,

I want to use OpenCascade on Unix and Windows (95, 98, and NT). Running the samples on NT 4.0 is almost fine (some samples crash). On my Win98 system nothing works. Now I wonder whether it is a problem of my machine or a principle problem with the operating system.

When starting any of the samples I get the error message "Fatal Error During Graphic Initialisation". For the sample plate I traced the error down to

CSamplePlateApp::CSamplePlateApp() {

try

{myGraphicDevice = new Graphic3d_WNTGraphicDevice();}

catch(Standard_Failure)

{AfxMessageBox("Fatal Error During Graphic Initialisation");}

}

The statement

myGraphicDevice = new Graphic3d_WNTGraphicDevice();

fails.

The new operator does the following:

inline void* operator new(size_t size)

{

return Standard::Allocate(size);

}

The Allocate function is:

inline Standard_Address Standard::Allocate(const Standard_Integer aLen )

{ Standard_Address aStorage ;

Standard_Integer aLenW = ( aLen + 15 ) >> 4 ;

if ( MMgt_Opt && aLenW <= theFreeListSize &&

theFreeList[ aLenW ] != NULL ) {

aStorage = theFreeList[ aLenW ];

theFreeList[ aLenW ] = *(Standard_Address *) aStorage ;

*(Standard_Integer *) aStorage = aLenW ;

aStorage = (Standard_Integer *) ((long )aStorage + 8) ;

return aStorage ;

}

aStorage = MAllocate( aLen ) ;

#if TraceMMgt cout << "Allocate[" < < aLenW << "] "<< hex << (Standard_Integer *) aStorage << " - 2" << dec << endl ; #endif

return aStorage ; }

aLenW is calculated as 5 (aLen is 72). The degugger doesn't have any symbolic information for MMgt_Opt, theFreeListSize, and theFreeList. The program doesn't jump into the if block but continues with

aStorage = MAllocate( aLen ) ;

aStorage is NOT NULL after this operation.

When returning to the calling function and evaluating the statement

catch(Standard_Failure)

the debugger issues the message:

First-chance exception in SamplePlate.exe (MSVCRT.DLL): 0xE06D7363: Microsoft C++ Exception.

and the error message is displayed.

Could anybody explain to me what is the reason for this behaviour and what I can do to avoid it.

Thanks in advance

Thomas Haller

Philippe Centa's picture

> Dear all,

> I want to use OpenCascade on Unix and
> Windows (95, 98, and NT). Running the
> samples on NT 4.0 is almost fine (some
> samples crash). On my Win98 system nothing
> works. Now I wonder whether it is a problem
> of my machine or a principle problem with
> the operating system.

> When starting any of the samples I get the
> error message "Fatal Error During
> Graphic Initialisation".

Have you initialized CSF_GraphicShr properly c:\xxxxx\opengl.dll ?