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