几何尺寸与公差论坛------致力于产品几何量公差标准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-07, 12:49 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】regeneration of gsmodel causes exception in update

regeneration of gsmodel causes exception in update
regeneration of gsmodel causes exception in update
hi,
i have a problem when i try to regenerate the display in order to draw arcs more precise on screen. after the regeneration the update call throws an exception. if i don't call regen() before paint() (see below) the view is rendered ok. i have tried to browse the call stack and it seems it has something to do with rendering true type fonts?
i am using version 1.13
thanks in advance,
stefan hestner
code:
void cadview::init()
{
odgsmoduleptr pgs = :drxdynamiclinker()->loadmodule("wingdi");
odgsdeviceptr pdevice = pgs->createdevice();
enablegsmodel(true);
...
mpdevice = oddbgsmanager::setupactivelayoutviews(pdevice, this);
}
void cadview::regen()
{
mpdevice->invalidate();
if(mpdevice->gsmodel())
mpdevice->gsmodel()->invalidate(odgsmodel::kinvalidateall);
}
void cadview:aint()
{
try {
mpdevice->update();
}
catch(...) {
<- ends up here if regen has been called
}
}

dear stephan,
is it possible to reproduce the problem in our odamfcapp sample?
could you attach the dwg file that is enough for reproducing the issue in our odamfcapp sample?
sincerely yours,
george udov
no, i don't get the same problem in odamfcapp. so i must do something wrong, but i can't find out what it is. everything else works fine until i call regen. i'm not using the doc-view model so the structure of my code is slightly different from the one in odamfcapp. not all dwg files causes the exception.
/stefan
which exception do you get? oderror? what is error code? what exactly are you seeing in the stack?
sincerely yours,
george udov
i get an access violation. i've included the call stack below.
code:
msvcr71d.dll!memmove(unsigned char * dst=0x11f75e60, unsigned char * src=0x144c5fd0, unsigned long count=72) line 171 asm
ggui.dll!memcpy(void * dest=0x11f75e60, const void * src=0x144c5fd0, unsigned int size=72) line 152 + 0x12 c++
ggui.dll!copynormals(const odgevector3d * parray=0x144c5fd0, int num=3) line 393 + 0x14 c++
ggui.dll!copyfacedata(odgifacedata & facedata={...}, const odgifacedata * pfacedata=0x0012e578, int num=3) line 432 + 0x12 c++
ggui.dll!recshell::recshell(long _nbvertex=33, const odgepoint3d * _pvertexlist=0x1240a038, long _facelistsize=36, const long * _pfacelist=0x120f0238, const odgiedgedata * _pedgedata=0x00000000, const odgifacedata * _pfacedata=0x0012e578, const odgivertexdata * _pvertexdata=0x00000000) line 582 + 0x14 c++
ggui.dll!odgimetafilerimpl::shellproc(long nbvertex=33, const odgepoint3d * pvertexlist=0x1240a038, long facelistsize=36, const long * pfacelist=0x120f0238, const odgiedgedata * pedgedata=0x00000000, const odgifacedata * pfacedata=0x0012e578, const odgivertexdata * pvertexdata=0x00000000) line 615 + 0x3e c++
ggui.dll!odgixformimpl::shellproc(long nbvertex=33, const odgepoint3d * pvertexlist=0x11e24fe8, long facelistsize=36, const long * pfacelist=0x120f0238, const odgiedgedata * pedgedata=0x00000000, const odgifacedata * pfacedata=0x0012e578, const odgivertexdata * pvertexdata=0x00000000) line 380 + 0x3f c++
ggui.dll!odtruetypefont:utcharacter(void * data=0x117627a8, odgiconveyorgeometry * pgeom=0x0012e348) line 1379 + 0x46 c++
ggui.dll!odtruetypefont::drawcharacter(unsigned short character=56, odgepoint2d & advance={...}, odgiconveyorgeometry * pgeom=0x0012e348, odtextproperties & textflags={...}) line 1100 c++
ggui.dll!odgidefaultcontext::drawtext(odgiconveyorgeometry * pdest=0x1239216c, const odgepoint3d & position={...}, const odgevector3d & u={...}, const odgevector3d & v={...}, const char * msg=0x0f057274, long nlength=4, bool raw=true, const odgitextstyle * pstyle=0x115d8088, const odgevector3d * pextrusion=0x00000000) line 270 + 0x32 c++
ggui.dll!odgigeometrysimplifier::textproc(const odgepoint3d & position={...}, const odgevector3d & u={...}, const odgevector3d & v={...}, const char * msg=0x0f057274, long nlength=4, bool raw=true, const odgitextstyle * pstyle=0x115d8088, const odgevector3d * pextrusion=0x00000000) line 1093 + 0x3c c++
ggui.dll!odgiconveyorembranchmentimpl::textproc(const odgepoint3d & position={...}, const odgevector3d & u={...}, const odgevector3d & v={...}, const char * msg=0x0f057274, long length=4, bool raw=true, const odgitextstyle * ptextstyle=0x115d8088, const odgevector3d * pextrusion=0x00000000) line 180 + 0x33 c++
ggui.dll!odgibasevectorizer::text(const odgepoint3d & position={...}, const odgevector3d & normal={...}, const odgevector3d & direction={...}, const char * msg=0x0f057274, long length=4, bool raw=true, const odgitextstyle * pstyle=0x115dd458) line 1253 + 0x5c c++
ggui.dll!oddbmtextimpl::drawmtext(odgiworlddraw * pwd=0x115d7fb8, odmtextrendererdata & data={...}, oddbobjectid textstyleid={...}, bool braw=false, odarray<odmtextfragmentdata,odobjectsallocator<odmtextfragmentdata> > * fragments=0x116ad664, bool dodraw=true) line 1093 + 0x63 c++
ggui.dll!oddbmtext::worlddraw(odgiworlddraw * pwd=0x115d7fb8) line 2268 + 0x4e c++
ggui.dll!odgibasevectorizer::dodraw(unsigned long ndrawableflags=1, const odgidrawable * pdrawable=0x116ad548) line 808 + 0x11 c++
ggui.dll!odgsbasevectorizeview::dodraw(unsigned long ndrawableflags=1, const odgidrawable * pdrawable=0x116ad548) line 2093 c++
ggui.dll!odgibasevectorizer::draw(const odgidrawable * pdrawable=0x116ad548) line 766 + 0x1c c++
ggui.dll!odgsentitynode::update(odgsbasevectorizeview & view={...}, odgscontainernode * pparent=0x115da1b0) line 864 + 0x3a c++
ggui.dll!odgscontainernode::update(odgsbasevectorizeview & view={...}, odgscontainernode * __formal=0x00000000) line 602 + 0x15 c++
ggui.dll!odgsbasevectorizeview::display(bool bupdate=true) line 1599 + 0x13 c++
ggui.dll!odgsbasevectorizeview::update() line 1661 + 0x12 c++
ggui.dll!exgdivectorizeview::update() line 282 c++
ggui.dll!odgsbasevectorizedevice::update(odgsdcrect * __formal=0x00000000) line 193 + 0x10 c++
ggui.dll!exgsgdivectorizedevice::update(odgsdcrect * pupdatedrect=0x00000000) line 128 c++
ggui.dll!odgsmodellayouthelperimpl::update(odgsdcrect * pupdatedrect=0x00000000) line 356 + 0x1f c++
sorry to drag up an old post, but we have a dwg file that shows exactly the same problem. we also cannot reproduce in odamfcapp. we are still on 1.13.
stefan,
if you are still around, did you ever find a solution to your problem?
thanks.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】oddbhatchappendloop exception yang686526 DirectDWG 0 2009-05-06 07:47 PM
【转帖】odamfcapp and m-pdevice-update yang686526 DirectDWG 0 2009-05-06 06:55 PM
【转帖】appendloop90 exception question yang686526 DirectDWG 0 2009-05-04 04:05 PM
【转帖】pdmworkgroups api - pdmwproperties.update yang686526 SolidWorks二次开发 0 2009-04-12 10:01 PM


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


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