Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Warning: checksum: 0x935dbb45 (calculated) CRC mismatch 0xaafa14-0xab29e5 #1045

Open
rikan1 opened this issue Nov 21, 2024 · 17 comments
Open

Comments

@rikan1
Copy link

rikan1 commented Nov 21, 2024

Hello , i encountered a issue when converting a large (12MB) dwg file to json .

'Warning: checksum: 0x935dbb45 (calculated) CRC mismatch 0xaafa14-0xab29e5\n' +
'\n' +
'ERROR: Skip section AcDb:Preview with max decompression size 0x7d20 > 0x1800\n' +
'ERROR: Skip section with size 89 > 1 * 0\n' +
'ERROR: read_R2004_section_info out of range\n' +
'Warning: Failed to find section_info[9] with type 1\n' +
'ERROR: Failed to read compressed Header section\n' +
'Warning: Failed to find section_info[9] with type 3\n' +
'ERROR: Failed to read compressed Classes section\n' +
'Warning: Failed to find section_info[9] with type 4\n' +
'ERROR: Failed to read compressed Handles section\n' +
'Warning: Failed to find section_info[9] with type 2\n' +
'ERROR: Failed to read uncompressed AuxHeader section\n' +
'ERROR: Invalid section AcDb:Preview count or max decompression size. Sections: 1, Max size: 0\n' +
'ERROR: Failed to read uncompressed Preview section\n' +
'ERROR: Template section not found\n' +
'\n' +
'ERROR: Invalid num_segidx\n' +
'ERROR: Failed to decode file: /Users/somyaranjankar/Desktop/code/bbs-dwg-api/src/temp/1731333834741.dwg 0x940\n' +
'\n' +
'ERROR 0x940\n'

dwgread 0.13.3.7338 is used for conversion.

@michal-josef-spacek
Copy link
Contributor

@rikan1 Hi, we need more information.

  1. You could send us the AC string from the beginning of the file.
  2. dwgread -v3 __DWG_FILE__ could help more.

@santanup
Copy link

santanup commented Nov 27, 2024

@rikan1 Hi, we need more information.

  1. You could send us the AC string from the beginning of the file.
  2. dwgread -v3 __DWG_FILE__ could help more.

@michal-josef-spacek

we are getting this after adding "-v3"

'Reading DWG file /src/temp/1732731851358.dwg\n' +
"This file's version code is: AC1027 (r2013)\n" +
'is_maint: 0x8 [RC 0]\n' +
'zero_one_or_three: 0x3 [RC 0]\n' +
'thumbnail_address: 576 [RL 0]\n' +
'dwg_version: 0x21 [RC 0]\n' +
'maint_version: 0x4 [RC 0]\n' +
'codepage: 30 [RS 0]\n' +
'ANSI_1252\n' +
'unknown_0: 0x0 [RC 0]\n' +
'app_dwg_version: 0x0 [RC 0]\n' +
'app_maint_version: 0x0 [RC 0]\n' +
'security_type: 0 [RL 0]\n' +
'rl_1c_address: 0 [RL 0]\n' +

@michal-josef-spacek
Copy link
Contributor

ok, we know that is AC1027

@santanup
Copy link

ok, we know that is AC1027

How to fix it? @michal-josef-spacek

@michal-josef-spacek
Copy link
Contributor

@santanup I don't know what your problem is.

  1. The first message is:
    Hello , i encountered a issue when converting a large (12MB) dwg file to json .
    What is the result?

@michal-josef-spacek
Copy link
Contributor

michal-josef-spacek commented Nov 28, 2024

  1. The
    Warning: checksum: 0x935dbb45 (calculated) CRC mismatch 0xaafa14-0xab29e5
    is warning probably from system section.
    My example on some dwg file is
=== Read System Section (Section Page Map) @4e20 ===

section_type: 0x41630e3b [RLx 0]
decomp_data_size: 112 [RL 0]
comp_data_size: 103 [RL 0]
compression_type: 2 [RL 0]
checksum1 => 0x2099039f with seed and crc 0
checksum: 0xa8cb0e58 [RLx 0]
Warning: checksum: 0x6af11031 (calculated) CRC mismatch 0x4e34-0x4e9b

I don't know how much this is important. Probably not much in your case.

@michal-josef-spacek
Copy link
Contributor

  1. Issue with preview section:
ERROR: Skip section AcDb:Preview with max decompression size 0x7d20 > 0x1800

I have similar issue in my file:

section_info[5] fields:
size:            15754
num_sections:    1
max_decomp_size: 16384 / 0x4000
unknown:         1
compressed:      1 (1=no, 2=yes)
type:            10
encrypted:       0 (0=no, 1=yes, 2=unknown)
name:            AcDb:Preview
fixedtype:       10

ERROR: Skip section AcDb:Preview with max decompression size 0x4000 > 0x1800
Page count 1 in area 5
     section[5].info[0]: AcDb:Preview type 0 => type 10
Page:    2     size: 16384 address: 0x0 info: 0x220

I don't know how much this is important. Probably not much in your case.

@michal-josef-spacek
Copy link
Contributor

michal-josef-spacek commented Nov 28, 2024

  1. Issue:
ERROR: Skip section with size 89 > 1 * 0

and probably all other.
Probably related to something bad with reading of sections.
My exmaple of this kind of error:

ERROR: Skip section AcDb:AcDsPrototype_1b with size 2637952 > 25 * 29696
Page count 0 in area 2

section_info[3] fields:
size:            42537356099614
num_sections:    0
max_decomp_size: 0 / 0x0
unknown:         6
compressed:      10948 (1=no, 2=yes)
type:            29696
encrypted:       0 (0=no, 1=yes, 2=unknown)
name:            .
fixedtype:       0

ERROR: Skip section . with size 42537356099614 > 0 * 0
Page count 0 in area 3

section_info[4] fields:
size:            45260365365259
num_sections:    178176
max_decomp_size: 0 / 0x0
unknown:         12
compressed:      8760 (1=no, 2=yes)
type:            207872
encrypted:       0 (0=no, 1=yes, 2=unknown)
name:
fixedtype:       0

ERROR: read_R2004_section_info out of range
Warning: Failed to find section_info[4] with type 1
ERROR: Failed to read compressed Header section
Found no section_info[4] with type 9
ERROR: Failed to read uncompressed SummaryInfo section
Warning: Failed to find section_info[4] with type 3
ERROR: Failed to read compressed Classes section
Warning: Failed to find section_info[4] with type 7
ERROR: Failed to read compressed AcDbObjects section
Warning: Failed to find section_info[4] with type 2
ERROR: Failed to read uncompressed AuxHeader section
Found no section_info[4] with type 10
ERROR: Failed to read uncompressed Preview section
Found no section_info[4] with type 11
ERROR: Failed to read uncompressed AppInfo section
Found no section_info[4] with type 12
AppInfoHistory section not found

I don't know how much this is important. Probably not much in your case

@michal-josef-spacek
Copy link
Contributor

What is the result? So, some section errors, and some cannot block functionality. Something is probably very bad. Without an example DWG file we cannot fix it.

@santanup
Copy link

What is the result? So, some section errors, and some cannot block functionality. Something is probably very bad. Without an example DWG file we cannot fix it.

@michal-josef-spacek
These are the files -

@michal-josef-spacek
Copy link
Contributor

@santanup Thank you.
Analysis:

a) 1732784727769.dwg
Version: AC1027
Created by: Teigha
(be careful, Teigha has issues itself)
I see errors in PROXY_OBJECTs, DICTIONARY

b) 1732784624493.dwg
Version: AC1032
Created by: AutoCAD
I see many errors in many entities, In AC1032 we need to fix many things.

I could export both to JSON by:
dwgread -O JSON __INPUT_DWG__ | tee __OUTPUT_JSON__

What is the root cause, which you are trying to resolve?

@michal-josef-spacek
Copy link
Contributor

@santanup Could you export some of this files to DXF by AutoCAD?

@santanup
Copy link

Okay we will try, thanks

@rikan1
Copy link
Author

rikan1 commented Nov 28, 2024

@michal-josef-spacek
Can you please check this file .
https://d2k638bldkf5wf.cloudfront.net/importDwg/1731333834741.dwg

dwgread -O JSON INPUT_DWG. This command is failing

@michal-josef-spacek
Copy link
Contributor

@rikan1 Ok, this is the real issue with no possibility of reading this file.

@rikan1
Copy link
Author

rikan1 commented Nov 28, 2024

@michal-josef-spacek How to fix this , do you have any suggestions ?

@michal-josef-spacek
Copy link
Contributor

@rikan1 Check section parsing. This is not easy to do for me.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants