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

yang686526 2009-05-06 09:03 PM

【转帖】odreadex assertion in win32 debug
 
odreadex assertion in win32 debug
odreadex assertion in win32 debug
hi,
i'm trying to build the odreadex example (dwgdirect 1.13). the build completed but when the application start to run, it gives an assertion (see attached file). if i choose to continue, the application crashes. anyone has any ideal why? (it's ok with the win32 release).
thanks
attached images
hi,
do you use readex with some file? please, attach this file.
hi alexander,
i use the attached file (1.dwg) for program arguments.
the program crash at:
odrxobjectimpl<myservices> svcs;
odinitialize(&svcs);
the stack trace is as in stack.bmp (attached file).
regards,
hanh cao
attached images (149.7 kb, 10 views)
attached files (30.5 kb, 7 views)

hi,
it seems that problem is in default implementation of ddt odtrace. it try to open
file* fp = fopen("c:\\out.txt", "a+"); for log. possibly it cannot open file on your pc.
also you can add your trace implementation by adding next strings to odreadex.cpp. it doesn't use any files for logging.
#include "diagnostics.h"
static void mydefaulttrace(const odchar*) { }
and
odsettracefunc(mydefaulttrace);
before call of odinitialize(&svcs);
it works,
thank you very much.


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