几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】c== exception on recompute dimension block (http://www.dimcax.com/hust/showthread.php?t=15317)

yang686526 2009-05-04 05:15 PM

【转帖】c== exception on recompute dimension block
 
c++ exception on recompute dimension block
c++ exception on recompute dimension block
hi everyone,
attached is a file that throws a c++ exception when i try to upgrade and downgrade the open of a particular dimension.
my code is very simple :
double measurment = 0.0f;
try {
dimptr->upgradeopen();
// get the dimension measurement here.
measurement = dimptr->measurement());
dimptr->downgradeopen();
} catch( oderror &e ) {
return null;
} catch( ... ) {
return null;
}
and the memory seems to get corrupted as the smart pointers try to release and invalid memory location.
any ideas i can do to get around this other than catch the exception and ignore it?
if a bug, i hope it helps in finding it and fixing for future versions.
cheers
jason
attached files
hello jason,
it is really bug with recomputer dimension. you may catch the exception and ignore it (dimension isn't changed here). we will try to fix it in next release. thank you for detail report.
best regards,
sergey z.


所有的时间均为北京时间。 现在的时间是 03:00 AM.