![]() |
【转帖】problems with borland builder 6
problems with borland builder 6
problems with borland builder 6 hi, i have recently downloaded the 1.10 maintenance release for borland builder 6 and i am having a couple of problems. firstly, i get an oderror_duplicaterecordname exception from readfile whenever i try to open a 'dxf' file that has duplicate layer names or duplicate ltype names in it. i know that this is an unusual situation, but autocad opens the files ok, and i think dwgdirect 1.09 was ok as well. secondly, i get an error with ppoly->getarcsegat() - i think that this has been reported elsewhere, but i'm pretty sure i know what the problem is. the 'dxf' file in question has a polyline with 2 vertices. both vertices have the same (x,y) coords and the first one has a bulge value. apart from these problems the maintenance release appears to solve several other problems that i had been experiencing - thanks very much. regards, geoff briggs throwing exception duplicate record name while file loading is "as designed" behavior. exceptions indicate errors during file loading. they should be handled by the caller. use recoverfile() to load demaged drawings. getarcsegmentat() crash for 2 coincident vertices is dd bug. we'll fix it. sergey slezkin thanks for that, sergey. however, i already have the following code:- try { pdb = svcs.readfile( filename ); } catch ( oderror& e ) { errorstring = svcs.geterrordescription( e.code() ).c_str(); } catch ( ... ) { errorstring = "unknown error"; } but instead of coming into the 'catch', after the exception is raised i get an access violation - read of address 00000010 - which doesn't look good. i've attached an example file that demonstrates the problem. thanks, geoff briggs attached files (1.6 kb, 13 views) unfortunately i can't reproduce it in msvc and we came across some problems in building debug bc6 libs. is it possible to reproduce the effect in odreadex sample? does this happens with every "bad" file? could you provide some additional info (stack dump etc.)? sergey slezkin hi sergey, yes, i get the same results in the odreadex project with any file that has duplicate layer names or duplicate ltype names. i've attached one file of each type and the relevant stack dump for each file at the point that the exception is thrown. thanks, geoff briggs attached files (4.2 kb, 13 views) geoff, i'm sorry i was wrong about "as designed" behavior of throwing exception from readfile() if duplicate layer/linetypes present in file. designed behavior is: if dublicate record presents in file exception is thrown but it is handled inside reading procedure. in handling routine if auditinfo is available (reading from recoverfile()) the information on duplicated records is registered. if auditinfo is not available (reading from readfile()) - oddbhostappservices::warning() function is called. so the effect you have is bc6 specific. we'll try to investigate it. btw, are you able to load such files with recoverfile()? sergey slezkin sergey, if i call recoverfile and pass a reference to a 'oddbauditinfo' i get exactly the same behaviour as with readfile. however, i don't know if this is significant or not, but if i don't pass the 'oddbauditinfo' reference to recoverfile then i only get the access violation, which then gets caught by my catch ( ... ). thanks for looking at this for me. geoff briggs hello, i was expecting the problem with duplicate layer and ltype names to be fixed in the 1.11 release, but it doesn't appear to be, and there is no mention of it in the release notes. does anyone have any information about this? it's not a massive problem, but it does slow my application down a bit. when i'm reading a dxf file, i first scan it for duplicate names and then decide whether to use the opendwg libraries or dwgdirect ones. thanks very much, geoff are you still able to reproduce the problem? odamfcapp in 1.11 loads the files you attached (duplicatenames.zip) successfuly. not all bugs fixed are listed in release notes. where were hundreds of them. sergey slezkin hi sergey, i've not been able to build odamfcapp in bb6, but i've tried it with odreadex and i still get the same results - oderror_duplicaterecordname followed by an access violation. have you managed to load the files using bb6? if you have, maybe i need to look elsewhere for the problem. cheers, geoff duplicate record name exception while loading such dxf files was caused by dd bug. this bug was fixed in 1.11. are you sure you test the right version? i can't reproduce the situation in odamfcapp or odreadex. (i tested it with your files duplicatelayername.dxf and duplicateltypename.dxf) sergey slezkin hi sergey, thanks for looking at this for me. i'm certain that i'm using the correct version, as there are other bug fixes that are working for me. for instance, '1757 getarcsegat() crash if polyline has coincident vertices' is fine, now. maybe it is a problem that is specific to borland. cheers, geoff fantastic! version 1.11.01.00 fixes this problem. thanks very much, geoff briggs |
所有的时间均为北京时间。 现在的时间是 08:36 AM. |