几何尺寸与公差论坛------致力于产品几何量公差标准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-06, 10:56 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】problem reading r12 dxf files

problem reading r12 dxf files
problem reading r12 dxf files
there seems to be a problem reading in r12 dxf files using the latest borland libraries (2.2.0). i have many examples of r12 dxf files that crash in the function call:
pdb = svcs.readfile( infilename, false, false, oda::ksharedenyno );
or
pdb = svcs.recoverfile(svcs.createfile(infilename), &aiinfo);
this problem did not exist in version 1.13.2.
this is a very serious problem for us and should be addressed if you are going to continue supporting borland. any help on this problem would be appreciated.
thank you,
raul
attached files


the problem seems to be a bug... in dwgdirect libraries.
il the dxf file lists the continuous linetype (in ltable) then we get a <duplicated record> exception.
edit the dxf file: rename the ltype from continuous to _countinuous. this way the dxf will be loaded without any problems.
hint: dwgdirect should check for duplicate ltypes (at least for continuous).
this is borland specific bug, and i don't know what to do with it.
duplicate record name is quite common situation, and is resolved by throw/catch construction inside dd. the exception passed is oderror or descendant. the construction is deep inside the library.
it looks like in some cases bcc incorrectly generates exception call code. that is - where 'throw oderror()' statement is used, instead of proper exception call, some wrong code is generated, which causes access violation later.
what is the cause exactly, is hard to discover, because it is impossible to generate debug library for borland build, due to 'tlink' error. (linker error was described many times on the forum.)
i was also unable to reproduce the error in smaller samples, to report it to borland support. perhaps it depends on call stack depth or something.
all the other compilers, which include gcc 2.95, gcc3.x, sunpro, sgi, hp, msvc*, xcode handle this situation correctly.
vladimir
i 'm seeing this issue in dd 2.2.0. i build dd on msvs2005.
when the ltype is renamed as said above things work fine.
also if i odamfcapp => 'save as' to r21 things work fine.
explain in more detail please, what exactly are you seeing.
vladimir
sure...
i use the dd 2.2.0 libs to build my application on msvs2005. do msvs2005 => debug => start debugging, load above attached dxf file and i get a oderror_duplicaterecordname exception.
now what i do is i open the attached dxf file using a text editor and rename the occurance of 'continuous' (on line number 36) to '_continuous' and save it. now load the file again, i don't see the oderror_duplicaterecordname comming.
now i'm trying to find if any other dxf files that i have gives that exception.
this is handled exception. did you read my message?
(switch debug/exceptions/c++ exceptions/"when exception is thrown" to "continue", instead of "break into debugger", and you will not see it.)
vladimir
i am currently upgrading from dd 1.13 to 2.3.0 and i am getting the same problems (using borland c++ builder v6).
this all seemed very familiar to me, as i remembered a similar problem a few years ago. i did a search through the old posts to the forum and discovered this thread .
so, it looks as though there was a problem in 1.10 that was fixed in 1.11.01.00. does this give any clues to a solution?
it is rather random problem. i think it depends on call stack contents.
we are contacting borland support, concerning compiler problems, but currently, there is no progress.
vladimir
thanks for your response, vladimir. i appreciate the difficulty you are having with this. good luck with borland support.


even if it is probably out of topic...
i decided to move a*cad i/o routines into a dll. to create the dll i used msvs2005. the application (written in bcb) then calls the dll to read/write a*cad files.
done. no more exception problems and full compatibility with both bcb and bds (not yet supported by dwgdirect).
and even better, the application footprint reduced of 5mb. msvs2005 linker seems smarter that bcb linker and dropped 7mb of not needed code from dwgdirect libs (i don't need entity rendering...).
i was wondering if there was any progress, yet, with this borland issue. we are really keen to get a release of our cad package out that will read autocad 2007 files.
i have installed 2.3.1, which successfully fixes the oduninitialise() problem - thanks for that.
i think, i found a source of the problem, it seems to be the same as described here:
(reference number: 374)
-xd is a rather dangerous switch (if i correctly understand what it does), i wonder why they turn it on by default..
but just turning off the switch hepls only bb2006.
bb6 generates weird compiler errors when compiling with -xd-
(e.g: assertion failed source\misc\odfontengineft.cpp(99) : config.cf_excdtorclnup at c:\helena\bcc\indep\stmt.c(9662))
i'll try to understand the cause of the bb6 compiler crashes.
anyway, borland 2006 libs will be released with -xd-
vladimir
this sounds promising, vladimir. any idea when these libraries will be available?
oh, just realised, you're referring to borland 2006 libs, whereas we need the bb6 libs. hope you can get those sorted as well.
last edited by geoff@ardensoftware.com; 11th june 2007 at 01:10 amfff">.
i digged the problem a bit and i don't think there would be a solution for bb6.
with -xd- it crashes on half of the files in dd, and in different situations.
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】oddbgetpreviewbitmap90 and dxf files yang686526 DirectDWG 0 2009-05-06 07:45 PM
【转帖】nls error yang686526 DirectDWG 0 2009-05-06 06:34 PM
【转帖】dxf files with walls, panels, and studs yang686526 DirectDWG 0 2009-05-05 08:50 AM
【转帖】dxf files error yang686526 DirectDWG 0 2009-05-05 08:49 AM
【转帖】crash in dxf reading file yang686526 DirectDWG 0 2009-05-04 06:27 PM


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


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