查看单个帖子
旧 2009-05-05, 11:00 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】floating point exception

floating point exception
floating point exception
dear someone.
i am using vc++8 with dwgdirect-version 2.1.0(dd_vc8)
i am experiencing the floating error under a specific situation.
i confirmed the occurrence of the error by changing the sample source as follows.
1. add code to "dd_nonlibs\examples\odreadex\exprotocolextension. cpp"
// start 1
int getmtextfrag(oddbmtextfragment* pmtextfrag, void* pparam)
{
return 1;
}
// end 1
// start 2
_control87(0, _em_zerodivide);
_control87(0, _em_invalid);
_control87(0, _em_overflow);
_control87(0, _em_underflow);
// end 2
// start 3
pmtext->explodefragments(getmtextfrag, null);
// end 3
2. build "odreadex" and run with argument "sample.dwg"
i guess that the error is occurred in processing "mtext".
in end user's environment, the printer driver (made by third party) might changed the floating point mode.
to reproduce the situation, i put the code "_control87".
accordingly, i cannot remove the code "_control87".
is this a bug in the library?
please teach me the method of evading making an error.
sincerely.
attached files
we have reproduced this situation. it is realy bug in dwgdirect.
the fix will be available in 2.2 release in a few days.
best regards,
sergey z.
dear sergey
thank you for the answer.
i am looking forward to the release of dwgdirect-version 2.2.
best regards,
hidekiyo
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)