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


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-05-05, 08:45 AM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】dwgdirert 2.3.0, assertion at rxobject.h line 791

dwgdirert 2.3.0, assertion at rxobject.h line 791
dwgdirert 2.3.0, assertion at rxobject.h line 791
we have just integrated from dwgdirert 2.2.0 to this new library. we use vs2005 and statically link to the library.
we have seen the following assertion message when trying to open some drawings on debug mode, click on ignore button will hang the program, but then it works on release build;
file: e:\opendwg\dd2.3\dwgdirect_vc8\include\rxobject.h
line: 791
expression: pclass!=0
the comment on that line of rxobject.h is "if you get here, most likely requested class is not registred".
is there any way to find out which class needs to be registered? or is it something in the library itself?
thanks
hi,
all rxobject based classes must be registered with rxinit. you got such warning if some class was not registered with rxinit. this is new assert in 2.3.
way - call stack, may be watch information about used pointers can help.
once i got such warning when i forgot to load module with class initializaton.
quote:
originally posted by alexander rumyantsev
hi,
all rxobject based classes must be registered with rxinit. you got such warning if some class was not registered with rxinit. this is new assert in 2.3.
way - call stack, may be watch information about used pointers can help.
once i got such warning when i forgot to load module with class initializaton.
i click on vs break all button to see call stack right after i see the assertion window, but call stack does not show any information on what class the library was looking for at that time.
>> i forgot to load module with class initializaton
do you mean to call odrx_declare_static_module_entry_point and odrx_define_static_application? is there a way to find out which class/module is needed?
thanks
hi,
did you see something like in the call stack ? i just clicked retry in asser dialog.
code:
odamfcappdll.exe!myassert(const char * expr=0x005cd7a4, const char * filename=0x005cd788, int nline=791) line 296 + 0x8 c++
dd_root_2.03_7.dll!odassert(const char * expresssion=0x005cd7a4, const char * filename=0x005cd788, int nlineno=791) line 79 + 0x14 c++
odamfcappdll.exe!odqueryximpl<oddbdatabasedoc,oddbdatabase>(const oddbdatabasedoc * pthis=0x022f07d0, const odrxclass * pclass=0x00000000) line 791 + 0x1a c++
odamfcappdll.exe!oddbdatabasedoc::queryx(const odrxclass * pclass=0x00000000) line 82 + 0x1b c++
> odamfcappdll.exe!odassurfbody::cast(const odrxobject * pobj=0x022f07d0) line 64 + 0x2e c++
odamfcappdll.exe!cacissavedialog::cacissavedialog(const oddbobjectid & id={...}, cwnd * pparent=0x022f19b0) line 62 + 0x1a c++
odamfcappdll.exe!cdwgview:neditacissatsave() line 781 + 0x2b c++
for my example odassurfbody wasn't initialized. autosurfservices_2.03_7.drx module wasn't loaded.
code:
odassurfbody::cast(const odrxobject * pobj=0x022f07d0) line 64 + 0x2e
i did not see any of those, in call stack or output window i did not see it prints any line number of source file. maybe i don't have library's debug environment. we use dwgdirect as static library.
hi,
mfcapp has module map for statically linked modules. you can merge it with your application module map. i think that definition of all modules from mfcapp disable assert.
search for _toolkit_in_dll_ in mfcapp to find application module map.
is it help ? which module was missed ?
i copy the module map from odamfxapp and modify it to our need since we use dwgdirect/adtdirect as static libraries. i have to comment out some lines due to some lib files do not exist in dwgdirect 2.3.0.
below is what i have;
code:
#ifndef _toolkit_in_dll_
//odrx_declare_static_module_entry_point(excustobjsmodule);
odrx_declare_static_module_entry_point(dbcommandsmodule);
//odrx_declare_static_module_entry_point(odoleitemhandlermoduleimpl);
//odrx_declare_static_module_entry_point(wingdimodule);
//odrx_declare_static_module_entry_point(winopenglmodule);
//odrx_declare_static_module_entry_point(windirectxmodule);
//odrx_declare_static_module_entry_point(bitmapmodule);
odrx_declare_static_module_entry_point(exrastermodule);
odrx_declare_static_module_entry_point(modelermodule);
odrx_declare_static_module_entry_point(odpsplotstyleservicesimpl);
//odrx_declare_static_module_entry_point(odgrippointsmodule);
odrx_declare_static_module_entry_point(svgexportmodule);
odrx_declare_static_module_entry_point(odplotsettingsvalidatormodule);
//odrx_declare_static_module_entry_point(dwf7importmodule);
odrx_declare_static_module_entry_point(dd_dynblocksmodule);
odrx_declare_static_module_entry_point(odrasterprocessingservicesimpl);
//odrx_declare_static_module_entry_point(exdynamicblocksmodule);
//odrx_declare_static_module_entry_point(autosurfservicesmodule);
odrx_declare_static_module_entry_point(odrecomputedimblockmodule);
//odrx_declare_static_module_entry_point(odcurvefunctionsmodule);
odrx_declare_static_module_entry_point(odavemoduleimpl);
//odrx_declare_static_module_entry_point(odbagfilermoduleimpl);
odrx_declare_static_module_entry_point(exfieldevaluatormodule);
odrx_declare_static_module_entry_point(aecarchbase);
odrx_declare_static_module_entry_point(aecarchbase40);
odrx_declare_static_module_entry_point(aecarchbase50);
odrx_declare_static_module_entry_point(aecarchdachbase);
odrx_declare_static_module_entry_point(aecarchdachbase40);
odrx_declare_static_module_entry_point(aecarchdachbase50);
odrx_declare_static_module_entry_point(aecareacalculationbase);
odrx_declare_static_module_entry_point(aecareacalculationbase40);
odrx_declare_static_module_entry_point(aecareacalculationbase50);
odrx_declare_static_module_entry_point(aecbase);
odrx_declare_static_module_entry_point(aecbase40);
odrx_declare_static_module_entry_point(aecbase50);
odrx_declare_static_module_entry_point(aecschedule);
odrx_declare_static_module_entry_point(aecschedule40);
odrx_declare_static_module_entry_point(aecschedule50);
odrx_declare_static_module_entry_point(aecscheduledata);
odrx_declare_static_module_entry_point(aecscheduledata40);
odrx_declare_static_module_entry_point(aecscheduledata50);
odrx_declare_static_module_entry_point(aecstructurebase);
odrx_declare_static_module_entry_point(aecstructurebase40);
odrx_declare_static_module_entry_point(aecstructurebase50);
odrx_begin_static_module_map()
//odrx_define_static_application(dd_t("autosurfservices"), autosurfservicesmodule)
//odrx_define_static_application(dd_t("excustobjs"), excustobjsmodule)
odrx_define_static_application(dd_t("dbcommands"), dbcommandsmodule)
//odrx_define_static_application(dd_t("odoleitemhandler"), odoleitemhandlermoduleimpl)
//odrx_define_static_application(l"wingdi.gs", wingdimodule)
//odrx_define_static_application(l"winopengl.gs", winopenglmodule)
//odrx_define_static_application(l"windirectx.gs", windirectxmodule)
//odrx_define_static_application(l"winbitmap.gs", bitmapmodule)
odrx_define_static_application(dd_t("rxrasterservices"), exrastermodule)
odrx_define_static_application(dd_t("modelergeometry"), modelermodule)
//odrx_define_static_application(dd_t("grippoints"), odgrippointsmodule)
odrx_define_static_application(dd_t("dd_svgexport"), svgexportmodule)
odrx_define_static_application(dd_t("plotsettingsvalidator"), odplotsettingsvalidatormodule)
//odrx_define_static_application(dd_t("dd_dwf7import"), dwf7importmodule)
odrx_define_static_application(odps_plotstyle_services_appname, odpsplotstyleservicesimpl)
odrx_define_static_application(dd_t("dd_dynblocks"), dd_dynblocksmodule)
odrx_define_static_application(dd_t("rasterprocessor"), odrasterprocessingservicesimpl)
//odrx_define_static_application(dd_t("exdynamicblocks"), exdynamicblocksmodule)
odrx_define_static_application(dd_t("recomputedimblock"), odrecomputedimblockmodule)
//odrx_define_static_application(dd_t("odcurvefunctions"), odcurvefunctionsmodule)
odrx_define_static_application(dd_t("dd_ave"), odavemoduleimpl)
//odrx_define_static_application(dd_t("odbagfiler"), odbagfilermoduleimpl)
odrx_define_static_application(dd_t("exfieldevaluator"), exfieldevaluatormodule)
odrx_define_static_application(dd_t("aecarchbase"), aecarchbase)
odrx_define_static_application(dd_t("aecarchbase40"), aecarchbase)
odrx_define_static_application(dd_t("aecarchbase50"), aecarchbase)
odrx_define_static_application(dd_t("aecarchdachbase"), aecarchdachbase)
odrx_define_static_application(dd_t("aecarchdachbase40"), aecarchdachbase)
odrx_define_static_application(dd_t("aecarchdachbase50"), aecarchdachbase)
odrx_define_static_application(dd_t("aecareacalculationbase"), aecareacalculationbase)
odrx_define_static_application(dd_t("aecareacalculationbase40"), aecareacalculationbase)
odrx_define_static_application(dd_t("aecareacalculationbase50"), aecareacalculationbase)
odrx_define_static_application(dd_t("aecbase"), aecbase)
odrx_define_static_application(dd_t("aecbase40"), aecbase)
odrx_define_static_application(dd_t("aecbase50"), aecbase)
odrx_define_static_application(dd_t("aecschedule"), aecschedule)
odrx_define_static_application(dd_t("aecschedule40"), aecschedule)
odrx_define_static_application(dd_t("aecschedule50"), aecschedule)
odrx_define_static_application(dd_t("aecscheduledata"), aecscheduledata)
odrx_define_static_application(dd_t("aecscheduledata40"), aecscheduledata)
odrx_define_static_application(dd_t("aecscheduledata50"), aecscheduledata)
odrx_define_static_application(dd_t("aecstructurebase"), aecstructurebase)
odrx_define_static_application(dd_t("aecstructurebase40"), aecstructurebase)
odrx_define_static_application(dd_t("aecstructurebase50"), aecstructurebase)
odrx_end_static_module_map()
#endif
so far, i am still getting the same assertion and ignore or retry button does not pass this assertion.
the library files below that are used in odamfxapp do not exist in 2.3.0;
odbagfiler.lib, odcurvefunctions.lib, grippoints.lib, oleitemhandler.lib, excustobjs.lib, and exdynamicblocks.lib.
hello, wen
in 2.3.0 declarations in static module map for aec modules should look like this:
odrx_define_static_application(dd_t("aecarchbase") , aecarchbase)
odrx_define_static_application(dd_t("aecarchbase40 "), aecarchbase40)
odrx_define_static_application(dd_t("aecarchbase50 "), aecarchbase50)
odrx_define_static_application(dd_t("aecarchdachba se"), aecarchdachbase)
odrx_define_static_application(dd_t("aecarchdachba se40"), aecarchdachbase40)
odrx_define_static_application(dd_t("aecarchdachba se50"), aecarchdachbase50)
odrx_define_static_application(dd_t("aecareacalcul ationbase"), aecareacalculationbase)
odrx_define_static_application(dd_t("aecareacalcul ationbase40"), aecareacalculationbase40)
odrx_define_static_application(dd_t("aecareacalcul ationbase50"), aecareacalculationbase50)
odrx_define_static_application(dd_t("aecbase"), aecbase)
odrx_define_static_application(dd_t("aecbase40"), aecbase40)
odrx_define_static_application(dd_t("aecbase50"), aecbase50)
odrx_define_static_application(dd_t("aecschedule") , aecschedule)
odrx_define_static_application(dd_t("aecschedule40 "), aecschedule40)
odrx_define_static_application(dd_t("aecschedule50 "), aecschedule50)
odrx_define_static_application(dd_t("aecscheduleda ta"), aecscheduledata)
odrx_define_static_application(dd_t("aecscheduleda ta40"), aecscheduledata40)
odrx_define_static_application(dd_t("aecscheduleda ta50"), aecscheduledata50)
odrx_define_static_application(dd_t("aecstructureb ase"), aecstructurebase)
odrx_define_static_application(dd_t("aecstructureb ase40"), aecstructurebase40)
odrx_define_static_application(dd_t("aecstructureb ase50"), aecstructurebase50)
sorry for the inconvenience.
regards,
vladimir alekseev
hi,
it was answer from adtdirect team. was it helpful?
i made the changes like the post above (remove some white spaces in dd_t) for aec modules, but i am still getting the same assertion error and program has to shutdown in debug mode.
the same source code works well with dwgdirect/adtdirect 2.2.0. does this tell anything?
quote:
originally posted by wen
i made the changes like the post above (remove some white spaces in dd_t) for aec modules, but i am still getting the same assertion error and program has to shutdown in debug mode.
could you describe situation more precisely. what is the name of asserted function (not rxobject, but upper level functionality). may be we can slightly modify mfcapp or some other sample to reproduce shutdown and assert?
assert was added in 2.3.0. but rxobject functionality wasn't changed. it is possible that invalid asserted situation was in your 2.2.0 code too.
i think that the best way for us in the current situation is a sample code. could you prepare small example with assert and\or shutdown or email to me your reduces application sources. we will check it here. my email is .
quote:
originally posted by wen
the same source code works well with dwgdirect/adtdirect 2.2.0. does this tell anything?
i know that problem was in the static modules loading functionality in v2.2.0, so it is possibly that dll version of your application will work without shutdown.
could you reproduce assertion in dll version of application? is stack available in debug mode?
sources\example will be very helpful.
last edited by sslezkin; 12th april 2007 at 12:35 amfff">.
did you resolve the problem ?
we still have this problem in debug mode. it is just not easy to scale down our project to show you a running sample.
wen,
in any case stack on assert shows where the problem is. what you see in the stack if you break program ("retry") on assert ?
i think i may have found a fix for it today. i replace every where i call "iskindof" by "isa() ==" and i am no longer getting this assertion message in debug mode. sometimes a call like pobject->iskindof(aecdbentity::desc()) seems to become pobject->iskindof(null) and which causes a problem in rxobject::iskindof.
when the assert dialog box is on the screen, clicking on 'retry' will just bring up another assert dialog box with the same message.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】asme - where to star yang686526 American standards 0 2009-04-29 07:28 PM
[求助]请教高手,这段程序能否简化一下呢? yang686526 ObjectARX(AutoLISP) 0 2009-04-26 02:45 PM


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


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多