几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】crash while loading dwg (http://www.dimcax.com/hust/showthread.php?t=15548)

yang686526 2009-05-04 06:38 PM

【转帖】crash while loading dwg
 
crash while loading dwg
crash while loading dwg
hi,
while reading a autocad 2000 .dwg file, the dwgdirectlibraries are raising
an einvalidindex exception while reading the file using oddbhostappservices
::readfile method. so saved this as a 2004 dwg file suspecting that it is
a problem with the dataset. now i dont get any issue while reading the file.
but the einvalidindex is raised when exploding the hatch entity. after
debugging in the example application(that are delivered with the dwgdirect
libraries), it shows the exception while dumping the entities. is it that the
dwg file is corrupted. was this problem ever addressed in the new
libraries. please let me know if anyone of you have a solutioin for this.
thanks,
aparna
it may be result of invalid data in dwg file or a bug in dwgdirect.
1. does dwgdirect's recoverfile() report errors? (in odamfcapp - file/recover).
2. can the file be loaded into autocad?
3. what does autocad's recover say about this file?
sergey slezkin
re:
hi sergey,
yes this file can be loaded easily in autocad. but when using odamfcapp
application also it raised an exception with autocad version 2000 file that i
mentioned earlier. but no error was raised when the same dwg was saved
as 2004 version file. tried to do recoverfile method but this function call
itself was causing crash. dont know i did something wrong in using this
method. how can i know if it contains invalid data.
thanks,
aparna
the file was saved by dwgdirect?
and in odamfcapp file/recover crashes?
if so the sample file would be helpful.
btw, if you save the file by dwgdirect you can try to call
pdb->audit() before saving the file.
sergey slezkin
the file was not saved by dwgdirect. using the autocad product itself i
saved version 2000 file to version 2004 dwg file. odamfcapp crashes
while loading the version 2000 dwg file not the version 2004 saved file.
i tried to do using pdb->audit but still this function call is crashing the
application. i hope iam clear now. here version that iam mentioning is
the autocad version with which the file was saved.
most probably it's a defect in dwgdirect. but i need the file to reproduce the crash.
sergey slezkin


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