几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】assert in dbdatabaseconv.cpp line 612 (http://www.dimcax.com/hust/showthread.php?t=15138)

yang686526 2009-05-04 04:13 PM

【转帖】assert in dbdatabaseconv.cpp line 612
 
assert in dbdatabaseconv.cpp line 612
assert in dbdatabaseconv.cpp line 612
is this a known issue?
the assert expression in myassert callback is "invalid execution".
the 'debug assertion failed' window shows:
expression: string != null && sizeinbytes > 0
it seems to run ok in release mode, but it crashes in the debugger.
you may safely ignore the assert. it signals that there is some invalid round-trip data in the file and the data is going to be skipped.
vladimir
hi vladimir
thanks for your reply.
if anyone's interested: i suspect the crash we were getting in debug-mode was caused by unicode string? as we don't build with unicode.
to fix, i added a myassert handler to trap the assert message. note that i cloned the myassert code from your examples, and the format specifier "%ls" (from old example code) began crashing the debugger when i hooked in the myassert function. once i changed "%ls" to "%s" everything was ok.
the original debug-mode crash was only occurring when starting our program by double-clicking a filename. so i don't understand how all this ties together, but it is working fine now.
thanks for your help!


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