几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】crash in setcurrentucs90 if called on r12.dxf and earlier (http://www.dimcax.com/hust/showthread.php?t=15531)

yang686526 2009-05-04 06:32 PM

【转帖】crash in setcurrentucs90 if called on r12.dxf and earlier
 
crash in setcurrentucs() if called on r12.dxf and earlier
crash in setcurrentucs() if called on r12.dxf and earlier
hi,
my app crashes in pdb->setcurrentucs() if called right after pdb=readfile(r12drawing). i'm using dd version 2.4.2.0.
to reproduce in odamfcapp, please locate method "oddbdatabaseptr codamfcappapp:penfile(lpctstr lpszpathname)"
and insert following snippet after "pdb = readfile(odstring(lpszpathname), false, m_bpartial);" line:
odgevector3d ucsxaxis = pdb->getucsxdir();
odgevector3d ucsyaxis = pdb->getucsydir();
if ((ucsxaxis != odgevector3d::kxaxis) || (ucsyaxis != odgevector3d::kyaxis))
{
bool bwriteenabled = pdb->iswriteenabled(); // == true ...
pdb->setcurrentucs (odgepoint3d::korigin, odgevector3d::kxaxis, odgevector3d::kyaxis); // <-- crash here on r12 drawing
}
i get the crash when opening/settingucs of "frontorthoucs-r12.dxf". my odamfcapp is built with debug vc2003mdd libs.
if i call setcurrentucs() on attached "frontorthoucs-r14.dwg" everything is fine. in my app, i need to have ortho/top view. the
command thedb->setcurrentucs (oddb::ktopview) also crashes on r12 ...
any idea what is wrong, workaround? thanks very much for any hint!
filip
attached files


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