几何尺寸与公差论坛------致力于产品几何量公差标准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-04, 03:29 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】access violation crash in recoverfile9file.dxf0

access violation crash in recoverfile(file.dxf)
access violation crash in recoverfile(file.dxf)
hi,
using odamfcapp, and also in my code, i get "access violation" crash in recoverfile() when called on the attached dxf drawings.
i'm using dd version 2.4.2.0, odamfcapp built with debug vc2003mdd libs, my app built with debug vc8mdd libs.
test files description:
1) gcctest-2004.dxf: valid drawing containing aec, no problems calling readfile(), audit shows all ok, crashes in recoverfile()
2) visitctr.dxf: corrupted drawing (dim system vars), problems calling readfile() with final msgbox: "invalid index!", crashes in recoverfile()
to reproduce in odamfcapp:
- file/recover... menu
- select attached file
-> crash
while i don't get a crash on 1) in my app, because i first open it by readfile() before attempting to recover, i will always get crash on 2).
however, if 1) was corrupted and readfile was throwing exception, i'd also end up calling recoverfile, and get a crash.
can you please let me know how to safely avoid this problem (without catch(...))? this problem has highest priority and i just don't know how to get rid of it.
thanks very much in advance!
filip jerabek
---------------------------
call stack:
1) access violation reading location 0x00000008:
odamfcapp.exe!oddbdatabase::newregapp() line 448 + 0x3 c++
odamfcapp.exe!oddbobjectimpl::dxfinxdata() line 1869 + 0x1b c++
odamfcapp.exe!oddbobject::dxfin() line 1028 c++
odamfcapp.exe!oddbdxfloader::loadobject() line 1089 + 0x45 c++
odamfcapp.exe!oddbsymboltable::dxfin() line 451 + 0x38 c++
odamfcapp.exe!oddbdxfloader::loadtables() line 589 + 0x2d c++
odamfcapp.exe!oddbdxfloader::loadcontents() line 271 c++
odamfcapp.exe!oddbdxfloader::loaddrawing() line 189 + 0x8 c++
odamfcapp.exe!oddbdxfloader::enddbloading() line 113 c++
odamfcapp.exe!oddbdatabase::closeinput() line 621 + 0x1e c++
odamfcapp.exe!oddbdatabase::readfile() line 527 c++
odamfcapp.exe!oddbhostappservices::recoverfile() line 612 c++
> odamfcapp.exe!codamfcappappenfile() line 1887 + 0xc6 c++
2) access violation reading location 0x00000001:
> odamfcapp.exe!odsmartptr<odresbuf>::internaladdref () line 96 + 0xa c++
odamfcapp.exe!odsmartptr<odresbuf>:dsmartptr<odr esbuf>() line 212 c++
odamfcapp.exe!oderror_invalidsysvarvalue::limmin() line 86 + 0x14 c++
odamfcapp.exe!oddbdxfloader::loadheader() line 1672 + 0x12 c++
odamfcapp.exe!oddbdxfloader::loaddrawing() line 173 c++
odamfcapp.exe!oddbdxfloader::enddbloading() line 113 c++
odamfcapp.exe!oddbdatabase::closeinput() line 621 + 0x1e c++
odamfcapp.exe!oddbdatabase::readfile() line 527 c++
odamfcapp.exe!oddbhostappservices::recoverfile() line 612 c++
odamfcapp.exe!codamfcappappenfile() line 1887 + 0xc6 c++
odamfcapp.exe!codamfcappdoc:nopendocument() line 311 + 0x12 c++
where m_pobject==0x8 in internaladdref()
attached files
hi again,
referring to the above 2 drawings, readfile() throws oderror instance with einvalidindex error code.
so the workaround would be not to call recoverfile() if this exception was thrown during previous readfile. but this would prevent other, possibly recoverable files (with einvalidindex prb), to be recovered.
is it correct to state "if einvalidindex prb exists, the file is never recoverable"?
thanks!
filip
the problem with recovering the first file is fixed in 2.5
the second file has revealed another problem that will be fixed in the next update (2.5.2, sheduled on march)
thanks for your report.
vladimir
thanks
filip
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】access violation at program exi yang686526 DirectDWG 0 2009-05-04 03:29 PM
【转帖】(access violation reading 0xcccccccc)在线等呢 yang686526 ObjectARX(C++) 0 2009-04-14 02:29 PM


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


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