libredwg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libredwg] Extracting Attributes from a 2007 drawing


From: Dave Coventry
Subject: Re: [libredwg] Extracting Attributes from a 2007 drawing
Date: Sat, 29 Dec 2012 23:30:21 +0200

Further to a request sent out a few days ago:

On 25 December 2012 07:18, Dave Coventry <address@hidden> wrote:

If I look at my Sections Map, I can see that the first page of the
AcDbObjects is as follows:

--- Section ---
data size:     1435688
max size:      63488
encryption:    0
hashcode:      674c05a9
name length:   34
unknown:       0
encoding:      4
num pages:     23
Section name:  AcDb:AcDbObjects

   --- Page ---
   offset:        0
   size:          63488
   id:            8
   uncomp_size:   63488
   comp_size:     61798
   checksum:      dfbd4a2
   crc:           a27abc00796a7c74

>From this I know that the ID is 8, which, looking at the Page Map,
starts at offset 0x5780 in my file:

--- Page ---
size:    0xf620
id:      0x8
offset:  0x5780

So I change the BitChain dat->byte value to 0x5780 and call the
read_system_page function with parameters as follows:

data = read_system_page(dat, 61798, 63488, 4);

This appears to work without error.

However, the second AcDbObjects page is as follows:

   --- Page ---
   offset:        63488
   size:          63488
   id:            9
   uncomp_size:   63488
   comp_size:     41250
   checksum:      72034213
   crc:           5bfbcaf2d08d8d43

>From the Page Map:

--- Page ---
size:    0xa460
id:      0x9
offset:  0x14da0

But setting dat->byte to 0x14da0 and calling
data = read_system_page(dat, 61798, 63488, 4);

fails:

Program received signal SIGSEGV, Segmentation fault.
0x000000000041f965 in copy_bytes (dst=0x6f7253 "", length=58750, offset=65151)
    at decode_r2007.c:163

Any clues?

Many thanks,

Dave Coventry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]