Bug in TColgp_ collection class ?

Hi !

By mistake I had the followoing code in an application (CAS 4.0DVP1 on Linux):

TColgp_Array1OfPnt pts( 1, 5); pts( 6) = gp_Pnt( ...);

And this fell through without any exception, though it did cause a malloc failure later on in the code.

Shouldn't this code throw an out of bounds exception ?

Mikael

Philippe Poncot's picture

For optimize reason, this code and all others codes which controls the same problems ( out of range ) return an exception only in a Debug context. If you want to activate it, do not use the: -DNo_Exception option in the .comp files

...or with WOK product 2 solutions: - if you want use an optimize version, modify the CMPLRS.edl file in lib directory of WOK:

subsitute @set %CMPLRS_CXX_ModeOpt = "-O2 -DNo_Exception +w "; by @set %CMPLRS_CXX_ModeOpt = "-O2 +w ";

- activate the Debug profile with : wokprofile -d