Wout Ware

September 10, 2010, 02:12:06 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: EndOfStreamException reading dwg file  (Read 260 times)
morque
Member
*
Posts: 5

ppluche2001@hotmail.com
« on: March 10, 2010, 10:21:51 pm »

I updated the library a few days ago. We have several dwg files that always have worked perfectly except one (sended you by email).
The exception is an EndOfStreamException on line 3.

1             DxfModel md;
2             if (string.Compare(Path.GetExtension(_file), ".dwg", true) == 0){
3                             md = DwgReader.Read(_file);
4             }else {
5                             //wrong file type error
6             }

This dwg always worked in the previous version, With the rest of my dwg files the new version works fine.

Also I notice a strange behavior with text objects, we use the language Espaņol(Mexico), but with the new version, some letters change into japanise or text styles change. And wen I try to save a document into PDF format, sometimes the process just freeze, apparently in an infinite loop

This behavior only is present in the new version (3.5.6), the older works ok

Logged
morque
Member
*
Posts: 5

ppluche2001@hotmail.com
« Reply #1 on: March 24, 2010, 04:59:00 pm »

This is the error, hope this help

************** Exception Text **************
System.IO.EndOfStreamException: Attempted to read past the end of the stream.
   at ..(Int32 length)
   at ..()
   at ..•()
   at ..‚()
   at WW.Cad.IO.DwgReader.’()
   at WW.Cad.IO.DwgReader.Read(DxfModel model)
   at WW.Cad.IO.DwgReader.Read()
   at WW.Cad.IO.DwgReader.Read(String filename)


cheers

morque
Logged
wout
Administrator
Member
*****
Posts: 837


« Reply #2 on: March 25, 2010, 02:19:13 pm »

Hi Morque,

Loading/display of the file you e-mailed me looked ok in CadLib 3.5.6.4, which version are you using?

Thanks!

Wout
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!