issue_owner_repo
listlengths 2
2
| issue_body
stringlengths 0
261k
⌀ | issue_title
stringlengths 1
925
| issue_comments_url
stringlengths 56
81
| issue_comments_count
int64 0
2.5k
| issue_created_at
stringlengths 20
20
| issue_updated_at
stringlengths 20
20
| issue_html_url
stringlengths 37
62
| issue_github_id
int64 387k
2.46B
| issue_number
int64 1
127k
|
---|---|---|---|---|---|---|---|---|---|
[
"LibreDWG",
"libredwg"
] |
we encode the thumbnail directly after the header, but we need/want? to encode it with r13c3 much later (at the very end, after MEASUREMENT). and then patchup the address/crc in the header.
currently we do write the wrong header.thumbnail_address, mismatching the actual thumbnail start (fixed)
r13b1-r14: directly after header (88)
r13c3-r2000: after MEASUREMENT or AUXHEADER
as from the spec r13-r2000:
* HEADER
* FILE HEADER
* HEADER VARIABLES
* CLASS
* MEASUREMENT (R13 only, optional)
* PADDING (R13C3 and later)
* THUMBNAIL (Pre-R13C3)
* OBJECTS
* HANDLES
* OBJECT FREE SPACE (optional)
* MEASUREMENT (R14-R2000, optional)
* AuxHEADER (=SECOND HEADER, optional for R13C3 and later)
* THUMBNAIL (R13C3 and later)
|
encode thumbnail_address r13c3
|
https://api.github.com/repos/LibreDWG/libredwg/issues/853/comments
| 4 |
2023-10-09T06:18:05Z
|
2023-11-24T07:43:41Z
|
https://github.com/LibreDWG/libredwg/issues/853
| 1,932,374,881 | 853 |
[
"LibreDWG",
"libredwg"
] |
I converted a DWG with an empty model space and one paper space layout to JSON using `dwgread`. I then converted that JSON back to DWG using `dwgwrite`. When trying to open the DWG AutoCAD 2024 fatal errors ("unhandled access violation").

When doing the `dwgwrite` I get a fair few errors/warnings (just a sample of the "scariest" looking ones);
```
ERROR: Required object or entity key missing
ERROR: Unknown MTEXTOBJECTCONTEXTDATA.num_unknown_bits 488 ignored
ERROR: Unexpected STRING at 1386408 of 1509528 tokens, expected OBJECTS OBJECT. json_OBJECTS:3042
ERROR: Expected JSON STRING
ERROR: Unknown num_dashes field
ERROR: Unknown EVALUATION_GRAPH.unknown_bits ....
ERROR: Unknown subclass field EVAL_Node.node
Warning: Object handle not found 3305242624/0xC5020000
```
Would it be okay to email over the DWG?
Also I see encoding only supports outputting to the the 2000 format, is writing to a later format still on the roadmap?
|
Object of class AcDbDictionary can't be cast to AcDbEntity
|
https://api.github.com/repos/LibreDWG/libredwg/issues/851/comments
| 15 |
2023-10-01T19:14:53Z
|
2024-02-06T19:08:53Z
|
https://github.com/LibreDWG/libredwg/issues/851
| 1,920,924,869 | 851 |
[
"LibreDWG",
"libredwg"
] |
Hi rurban,
Making a quick report on an out-of-bounds read fuzzing crash. I confirmed this with a build using the `--enable-release` flag as well.
Release build error:
```
./programs/dwgread crash.dwg
ERROR: Invalid num_pages 7274598, skip
ERROR: Invalid section->pages[0] size
Warning: Failed to find section_info[1]
ERROR: Failed to read header section
Warning: Failed to find section_info[3]
ERROR: Failed to read class section
Warning: Failed to find section_info[7]
ERROR: Failed to read objects section
Warning: Failed to find section_info[2]
ERROR: Preview overflow 119 + 0 > 302223
Warning: thumbnail.size mismatch: 302223 != 0
zsh: segmentation fault ./programs/dwgread ./crash.dwg
```
Debug trace:
```
Program received signal SIGSEGV, Segmentation fault.
0x0000555555810645 in read_data_section (sec_dat=0x7fffffffc1f0, dat=0x7fffffffc880, sections_map=<optimized out>, pages_map=0x555555b0fd50,
sec_type=<optimized out>) at decode_r2007.c:840
840 r2007_section_page *section_page = section->pages[i];
(gdb) backtrace
#0 0x0000555555810645 in read_data_section (sec_dat=0x7fffffffc1f0, dat=0x7fffffffc880, sections_map=<optimized out>, pages_map=0x555555b0fd50,
sec_type=<optimized out>) at decode_r2007.c:840
#1 0x0000555555808d5c in read_2007_section_revhistory (dat=0x7fffffffc880, dwg=0x7fffffffc8c0, sections_map=0x555555b0f410,
pages_map=0x555555b0fd50) at decode_r2007.c:2023
#2 read_r2007_meta_data (dat=0x7fffffffc880, hdl_dat=<optimized out>, dwg=0x7fffffffc8c0) at decode_r2007.c:2466
#3 0x00005555555d5279 in decode_R2007 (dat=0x7fffffffc880, dwg=0x7fffffffc8c0) at decode.c:3469
#4 dwg_decode (dat=0x7fffffffc880, dwg=0x7fffffffc8c0) at decode.c:227
#5 0x00005555555be42d in dwg_read_file (filename=<optimized out>, dwg=0x7fffffffc8c0) at dwg.c:261
#6 0x00005555555be42d in main (argc=<optimized out>, argv=0x7fffffffdec8)
```
[crash.dwg.zip](https://github.com/LibreDWG/libredwg/files/12728083/crash.dwg.zip)
Thanks!
|
Out-of-Bound Read in read_data_section in 0.12.5
|
https://api.github.com/repos/LibreDWG/libredwg/issues/850/comments
| 1 |
2023-09-26T13:28:46Z
|
2023-10-30T17:06:23Z
|
https://github.com/LibreDWG/libredwg/issues/850
| 1,913,517,983 | 850 |
[
"LibreDWG",
"libredwg"
] |
Hi,
I successfully convert the dwg file to geojson but all the attributes are missing.
For example
In my dwg file I have something like this

and in my geojson I cannot see this properties.
`{
"type": "Feature",
"id": "3DA",
"properties": {
"SubClasses": "AcDbEntity : AcDbBlockReference",
"Layer": "UnitDetail",
"Color": 256,
"name": "UnitDetail",
"EntityHandle": "3DA"
},
"geometry": {
"type": "Point",
"coordinates": [ 368462.7367884437553585, 2682140.4038846166804433, -0.0044009092129904 ]
}
}`
Is there any way to extract this attributes as key value pairs?
|
Attributes not shown in output file
|
https://api.github.com/repos/LibreDWG/libredwg/issues/849/comments
| 2 |
2023-09-26T12:32:12Z
|
2024-05-22T07:22:16Z
|
https://github.com/LibreDWG/libredwg/issues/849
| 1,913,411,865 | 849 |
[
"LibreDWG",
"libredwg"
] |
Hello Maintainers,
I have a bug report open on huntr.dev, available [here](https://huntr.dev/bounties/8ccb62e1-d25a-45af-87fd-b9e4f0a5087b/), which has been pending for some time. I am keen to assist in resolving this promptly and am willing to close it if deemed out of scope or invalid. Your guidance on this would be appreciated.
Thanks in advance for your time and consideration.
|
Huntr fuzz: dwg->num_objects + tbl->number overflow
|
https://api.github.com/repos/LibreDWG/libredwg/issues/848/comments
| 5 |
2023-09-26T00:02:26Z
|
2023-10-08T02:54:29Z
|
https://github.com/LibreDWG/libredwg/issues/848
| 1,912,459,558 | 848 |
[
"LibreDWG",
"libredwg"
] |
There is an error decoding DWG in 2004 format. What is the cause of this error?
|
LOG_ERROR ("Invalid Data Section Page Map type 0x%x != 0x4163003b", FIELD_VALUE (section_type));
|
https://api.github.com/repos/LibreDWG/libredwg/issues/846/comments
| 2 |
2023-09-22T03:46:40Z
|
2023-09-22T05:49:27Z
|
https://github.com/LibreDWG/libredwg/issues/846
| 1,908,133,495 | 846 |
[
"LibreDWG",
"libredwg"
] |
FATAL EXCEPTION: main
Process: com.example.cadviwer, PID: 8631
java.lang.UnsatisfiedLinkError: dlopen failed: library "libredwg.so.0" not found: needed by /data/app/~~ymWA7_c29qFzOomORNeq8w==/com.example.cadviwer-TsQ4zoJndvEAVx0JlHtfkg==/base
|
How can I use the LibreDWG library on an Android smartphone?
|
https://api.github.com/repos/LibreDWG/libredwg/issues/844/comments
| 4 |
2023-09-20T10:22:19Z
|
2023-09-21T08:55:29Z
|
https://github.com/LibreDWG/libredwg/issues/844
| 1,904,672,980 | 844 |
[
"LibreDWG",
"libredwg"
] |
./configure --host=arm-linux-androideabi --prefix=/home/qw/arm
make
make install
====Compiling failed
How to proceed step by step? please provide a solution.
|
LibreDWG Compiling an Android library with NDK on Ubuntu is not successful.
|
https://api.github.com/repos/LibreDWG/libredwg/issues/843/comments
| 3 |
2023-09-20T07:06:47Z
|
2023-09-20T10:08:23Z
|
https://github.com/LibreDWG/libredwg/issues/843
| 1,904,306,238 | 843 |
[
"LibreDWG",
"libredwg"
] |
Ultra - "nit picky" - "All 0 tests passed" is both confusing and needless - can It be > 0 or not show atol?
```
====================
All 252 tests passed
====================
make[4]: Leaving directory '/home/libredwg/libredwg/test/unit-testing'
make[3]: Leaving directory '/home/libredwg/libredwg/test/unit-testing'
make[3]: Entering directory '/home/libredwg/libredwg/test'
make[3]: Nothing to be done for 'check-am'.
make[3]: Leaving directory '/home/libredwg/libredwg/test'
make[2]: Leaving directory '/home/libredwg/libredwg/test'
Making check in doc
make[2]: Entering directory '/home/libredwg/libredwg/doc'
echo make regen-dynapi might be needed
make regen-dynapi might be needed
make[2]: Leaving directory '/home/libredwg/libredwg/doc'
make[2]: Entering directory '/home/libredwg/libredwg'
make check-TESTS
make[3]: Entering directory '/home/libredwg/libredwg'
==================
All 0 tests passed
```
|
0 tests passed
|
https://api.github.com/repos/LibreDWG/libredwg/issues/841/comments
| 2 |
2023-09-07T01:16:34Z
|
2023-09-20T07:42:23Z
|
https://github.com/LibreDWG/libredwg/issues/841
| 1,884,951,156 | 841 |
[
"LibreDWG",
"libredwg"
] |
For some reason I'm singing myself/ the company I work at for up to this. If you dont want it or there is no PR in 6 months - please close this.
C/C++ is "nice", "python" is - ML only - as far as I'm concerned.
The JSON "intermittent" step is a pain (see #837) so I need easy access to the structs.
|
Go bindings
|
https://api.github.com/repos/LibreDWG/libredwg/issues/840/comments
| 1 |
2023-09-07T01:10:02Z
|
2023-09-07T08:04:57Z
|
https://github.com/LibreDWG/libredwg/issues/840
| 1,884,946,873 | 840 |
[
"LibreDWG",
"libredwg"
] |
This is me getting - "nit picky", just close if you dont agree.
If you try to build a stock build on a fresh Ubuntu system (I.E as per the instructions in the README) you need the "texinfo" package - requiring needless Perl packages in my case (this instance doesn't need docs, its "cattle" not a "pet").
`./configure --help` shows no option to disable this (I can see) - can this be avoided?
|
Texinfo requires alot of packages. --disable-docs
|
https://api.github.com/repos/LibreDWG/libredwg/issues/839/comments
| 1 |
2023-09-07T00:43:31Z
|
2024-03-12T10:20:26Z
|
https://github.com/LibreDWG/libredwg/issues/839
| 1,884,929,871 | 839 |
[
"LibreDWG",
"libredwg"
] |
Pretty self explanatory, no matter what I pass I.E `-j12` - it has no impact
|
Make seems capped at 4 CPU processes?
|
https://api.github.com/repos/LibreDWG/libredwg/issues/838/comments
| 4 |
2023-09-07T00:26:28Z
|
2024-01-12T07:19:10Z
|
https://github.com/LibreDWG/libredwg/issues/838
| 1,884,919,464 | 838 |
[
"LibreDWG",
"libredwg"
] |
For me a 1.5MB DWG gets expanded to about 21MB of JSON, which is about a 1300% increase in storage requirements!
Luckily I can trash the JSON when I'm done but the storage requirements is quite the increase.
A wild guess would be the JSON keys being repeated "long_strings" does the most damage.
Is the filesize a concern for this project? I'm guessing probably not
|
JSON file sizes
|
https://api.github.com/repos/LibreDWG/libredwg/issues/837/comments
| 3 |
2023-09-06T16:22:05Z
|
2023-09-12T20:06:56Z
|
https://github.com/LibreDWG/libredwg/issues/837
| 1,884,355,825 | 837 |
[
"LibreDWG",
"libredwg"
] |
Hey, long time no support request - great work on the library! :wave:
Ive got a DWG i'm trying to read to JSON and get the following errors;
```
$ ../programs/dwgread -O json -o ./dwgread-DR.json dr_test.dwg -v3
Warning: checksum: 0x54100440 (calculated) CRC mismatch 0x13afbc0-0x13afbd0
Warning: Invalid sections: 0 != numgaps: 10 + numsections: 2255
ERROR: Invalid opcode 0x8 in input stream at pos 20558221
Warning: Failed to find section_info[0] with type 1
ERROR: Failed to read compressed Header section
ERROR: Failed to read uncompressed SummaryInfo section
Warning: Failed to find section_info[0] with type 3
ERROR: Failed to read compressed Classes section
Warning: Failed to find section_info[0] with type 7
ERROR: Failed to read compressed AcDbObjects section
Warning: Failed to find section_info[0] with type 2
ERROR: Failed to read uncompressed AuxHeader section
ERROR: Failed to read uncompressed Preview section
ERROR: Failed to read uncompressed AppInfo section
ERROR: Template section not found
ERROR: Failed to decode file: dr_test.dwg 0x540
ERROR 0x540
```
In this particular case I could ask the designer to tidy up (anonymize) the drawing and submit it, but over the next few days ill be running this on a few hundred thousand DWG's, which I suspect will contain more errors.
At that many drawings we're abit beyond "tidy up and submit" for bug fixes, is there any log/information that would be useful from parsing "so many" DWGs at once? Maybe some kind of aggregate statistics about common errors?
The file dates go back years but I suspect the earliest file format is whatever was shipped with ACAD 2011, the latest being whatever is being shipped with ACAD now.
|
Invalid sections: 0 != numgaps: 10 + numsections
|
https://api.github.com/repos/LibreDWG/libredwg/issues/836/comments
| 2 |
2023-09-06T16:17:59Z
|
2024-02-06T07:23:59Z
|
https://github.com/LibreDWG/libredwg/issues/836
| 1,884,350,014 | 836 |
[
"LibreDWG",
"libredwg"
] |
Hi,I have a dxf file used dxf2dwg.exe to convert it to dwg,but it ocuurs error as follows:
D:\code\dwg\libredwg>dxf2dwg.exe 456.dxf
Reading DXF file 456.dxf
ERROR: Invalid DXF group code: 6400
ERROR: Failed to decode DXF file: 456.dxf
READ ERROR 0x800 456.dxf
and I give the dxf file ,please give me an answer!
[456.zip](https://github.com/LibreDWG/libredwg/files/12522602/456.zip)
|
indxf binary: Invalid DXF group code :6400
|
https://api.github.com/repos/LibreDWG/libredwg/issues/835/comments
| 5 |
2023-09-05T11:00:35Z
|
2024-02-05T10:17:40Z
|
https://github.com/LibreDWG/libredwg/issues/835
| 1,881,732,730 | 835 |
[
"LibreDWG",
"libredwg"
] |
example_2018.json.err
s531-smooth-plate-standard-bottom-stair-connection-to-embed_from_pacificstair.com.json.err
s532-smooth-plate-extended-top-stair-connection-to-embed_from_pacificstair.com.json.err
s533-smooth-plate-extended-bottom-stair-connection-to-embed_from_pacificstair.com.json.err
s534-smooth-plate-haunch-top-stair-connection-to-embed_from_pacificstair.com.json.err
s535-smooth-plate-haunch-bottom-stair-connection-to-embed_from_pacificstair.com.json.err
s540-smooth-plate-standard-top-stair-connection-to-structural-steel_from_pacificstair.com.json.err
s541-smooth-plate-standard-bottom-stair-connection-to-structural-steel_from_pacificstair.com.json.err
s542-smooth-plate-extended-top-stair-connection-to-structural-steel_from_pacificstair.com.json.err
s543-smooth-plate-extended-bottom-stair-connection-to-structural-steel_from_pacificstair.com.json.err
s544-smooth-plate-haunch-top-stair-connection-to-structural-steel_from_pacificstair.com.json.err
s545-smooth-plate-haunch-bottom-stair-connection-to-structural-steel_from_pacificstair.com.json.err
|
json-check: Object of class AcDbLayerTableRecord can't be cast to AcDbEntity
|
https://api.github.com/repos/LibreDWG/libredwg/issues/833/comments
| 2 |
2023-09-04T10:24:42Z
|
2023-09-20T07:51:15Z
|
https://github.com/LibreDWG/libredwg/issues/833
| 1,879,970,019 | 833 |
[
"LibreDWG",
"libredwg"
] |
r10/from_autocad_r10_mac/tablet.dwg and the xenix variant cannot decode a POLYLINE_2D, which is wrongly identified as POLYLINE_MESH, with 2D and 3D nd MESH vertices, with bulge and tangent_dir.
the pline_flag offset calc is wrong, for ltype preR11. there the ltype has only size 1.
type: 19 [RCd]
Detect polyline: start_byte: 62826, flag_r11: 0x82, opts_r11: 0x1, pline_flag: **0x14** !
Add entity POLYLINE_MESH [1946] Decode entity POLYLINE_MESH
... VERTEX_2D's
@offset: 0xf124
type: 20 [RCd]
Detect vertex: start_byte: 63043, flag_r11: 0x2, opts_r11: 0x1c, vertex_flag: 0x44
Add entity VERTEX_MESH [1953] Decode entity VERTEX_MESH
Entity number: 1953, Type: 20, Addr: f642
flag_r11: 0x2 [RC 0] @63044.0
HAS_LTYPE(0x2)
size: 42 [RS] @4.0
layer: 6 [H(RSd) 8] @63046.0
opts_r11: 0x1c [RSx 0] @63050.0
HAS_BULGE(0x4) HAS_FLAG(0x8) HAS_TANGENT_DIR(0x10)
ltype: 0 [H(RC) 6] @63050.0
object_map{3DC} = 1953
=> handle: (0.2.3DC)
point: (8.01401, 1.70443) [2RD 10] @63067.0
flag: 0xc4 [RC 0] @63068.0
UNUSED_4(0x4) MESH(0x40) PFACE_MESH(0x80)
ERROR: offset 16
...
@offset: 0xf23e
type: 20 [RCd]
Detect vertex: start_byte: 63325, flag_r11: 0x2, opts_r11: 0x1c, vertex_flag: 0x71
Add entity VERTEX_3D [1961] Decode entity VERTEX_3D
Entity number: 1961, Type: 20, Addr: f75c
flag_r11: 0x2 [RC 0] @63326.0
HAS_LTYPE(0x2)
size: 42 [RS] @4.0
layer: 6 [H(RSd) 8] @63328.0
opts_r11: 0x1c [RSx 0] @63332.0
HAS_BULGE(0x4) HAS_FLAG(0x8) HAS_TANGENT_DIR(0x10)
ltype: 0 [H(RC) 6] @63332.0
object_map{3DC} = 1961
=> handle: (0.2.3DC)
point: (7.94132, 1.70044) [2RD 10] @63349.0
flag: 0xa3 [RC 0] @63350.0
EXTRA_VERTEX(0x1) CURVE_FIT(0x2) 3D(0x20) PFACE_MESH(0x80)
ERROR: offset 16
converted to DXF the MESH vertex would be
0
VERTEX
5
E2A
8
SYMBOLS
6
CONTINUOUS
10
8.014006349535594
20
1.704433980068487
30
0.0
42
-0.1003814048191414
and the VERTEX_3D would be
0
VERTEX
5
E32
8
SYMBOLS
6
CONTINUOUS
10
7.941315150782691
20
1.700435391019081
30
0.0
42
-0.1003814048191623
with the owning POLYLINE being
0
POLYLINE
5
7C0
8
SYMBOLS
6
CONTINUOUS
66
1
10
0.0
20
0.0
30
0.0
70
1
(a closed POLYLINE_2D)
|
decode_r11: wrong POLYLINE/VERTEX decode
|
https://api.github.com/repos/LibreDWG/libredwg/issues/832/comments
| 0 |
2023-09-04T08:17:56Z
|
2023-09-04T10:21:16Z
|
https://github.com/LibreDWG/libredwg/issues/832
| 1,879,757,659 | 832 |
[
"LibreDWG",
"libredwg"
] |
e.g. tablet_from_autocad_r10_mac.json.err
this error comes from illegal layer color.index defaults, because the decode already fails before in ptr tbl VPORT.size overflow.
|
json-check: AcDbLayerTableRecord(1D): Color index 0
|
https://api.github.com/repos/LibreDWG/libredwg/issues/831/comments
| 1 |
2023-09-01T15:37:05Z
|
2023-09-04T10:23:04Z
|
https://github.com/LibreDWG/libredwg/issues/831
| 1,877,640,856 | 831 |
[
"LibreDWG",
"libredwg"
] |
wrong prev_entity, next_entity links, see 2018/Surface, 2004/113200,
to/2004/from_uloz.to/00_002_SKLADBA_STROPU_NAD_1NP_Kl_B.dwg
seems like the prev,next_entity links are absolute, not relative. downconvert_relative_handle was harmful
|
json-check: AcDbBlockTableRecord encode errors
|
https://api.github.com/repos/LibreDWG/libredwg/issues/830/comments
| 1 |
2023-09-01T15:34:55Z
|
2023-11-24T09:56:47Z
|
https://github.com/LibreDWG/libredwg/issues/830
| 1,877,637,748 | 830 |
[
"LibreDWG",
"libredwg"
] |
lots of ODA Warning: Invalid input
AcDb2dPolyline(16B9)
and AcDbBlockTableRecord ODA errors, because the 2nd to last elements in the entity chain have an empty next_entity handle. the last also has an empty prev_entity.
e.g. for
vertex[0]: (3.2.16BA) abs:5818 [H* 0]
vertex[1]: (3.2.16BB) abs:5819 [H* 0]
vertex[2]: (3.2.16BC) abs:5820 [H* 0]
vertex[3]: (3.2.16BD) abs:5821 [H* 0]
seqend: (3.2.16BE) abs:5822 [H 0]
=>
prev_entity: (4.0.0) abs:0 [H 0]
next_entity: (4.2.16BB) abs:5819 [H 0]
prev_entity: (4.2.16BA) abs:5818 [H 0]
next_entity: (4.0.0) abs:0 [H 0]
prev_entity: (4.2.16BB) abs:5819 [H 0]
next_entity: (4.0.0) abs:0 [H 0]
prev_entity: (4.0.0) abs:0 [H 0]
next_entity: (4.0.0) abs:0 [H 0]
----
the intermediate should just have nolinks enabled, and first and last have 8.0.0. and 6.0.0 links
|
encode vertex chains. next_entity missing. in_postprocess_SEQEND
|
https://api.github.com/repos/LibreDWG/libredwg/issues/829/comments
| 0 |
2023-09-01T06:30:12Z
|
2023-09-01T15:34:29Z
|
https://github.com/LibreDWG/libredwg/issues/829
| 1,876,827,193 | 829 |
[
"LibreDWG",
"libredwg"
] |
I have JSON output like:
```
{
"entity": "BLOCK",
"index": 23,
"type": 4,
"handle": [0, 1, 33],
"size": 29,
"bitsize": 187,
"_subclass": "AcDbEntity",
"layer": [5, 1, 16, 16],
"prev_entity": [4, 0, 0, 0],
"next_entity": [4, 0, 0, 0],
"preview_exists": 0,
"entmode": 1,
"isbylayerlt": 1,
"nolinks": 0,
"color": 256,
"ltype_scale": 1.0,
"invisible": 0,
"_subclass": "AcDbBlockBegin",
"name": "*PAPER_SPACE"
},
```
There are two '_subclass' keys. This is not possible in JSON.
|
JSON file generated by libredwg is not valid - duplicate keys
|
https://api.github.com/repos/LibreDWG/libredwg/issues/828/comments
| 2 |
2023-08-31T11:22:16Z
|
2023-08-31T14:52:23Z
|
https://github.com/LibreDWG/libredwg/issues/828
| 1,875,330,097 | 828 |
[
"LibreDWG",
"libredwg"
] |
eg ./json-check 2000/Cylinder
incomplete 3DSOLID_wire import
ERROR: Unknown type for 3DSOLID_wire.points 3BD* with ARRAY
indxf is ok though, just a different entities roundtrip in different order
|
injson 3DSOLID
|
https://api.github.com/repos/LibreDWG/libredwg/issues/827/comments
| 0 |
2023-08-31T10:58:30Z
|
2023-09-01T15:34:28Z
|
https://github.com/LibreDWG/libredwg/issues/827
| 1,875,294,535 | 827 |
[
"LibreDWG",
"libredwg"
] |
first, look at https://github.com/mrclnz/dwgthumb and the (probably old) bugs it fixes.
then new type 6 (== PNG)
```
overall size: 5764 [RL]
num_headers: 2 [RC]
[0] Code: 1 [RC]
Header data start: 487 [RL]
Header data size: 80 [RL] (80)
[1] Code: 6 [RC]
Data start: 567 [RL]
Size of unknown type 6: 5665 [RL]
No thumbnail bmp image in ../td/example_2018.dwg
overall size: 302219 [RL]
num_headers: 2 [RC]
[0] Code: 1 [RC]
Header data start: 3399 [RL]
Header data size: 80 [RL] (80)
[1] Code: 2 [RC]
BMP data start: 3479 [RL]
BMP size: 302120 [RL]
BMP offset: 119
ERROR: Preview overflow 119 + 302120 > 302223
No thumbnail bmp image in ../td/example_2007.dwg
```
* [x] add type 6 support (PNG), write with .png extension
* [x] add type 3 support (WMF), write with .wmf extension (no coverage!)
* [x] fix example_2007 overflow
|
better dwgbmp support
|
https://api.github.com/repos/LibreDWG/libredwg/issues/824/comments
| 0 |
2023-08-31T08:49:57Z
|
2023-08-31T15:18:00Z
|
https://github.com/LibreDWG/libredwg/issues/824
| 1,875,075,224 | 824 |
[
"LibreDWG",
"libredwg"
] |
new version defaults, don't write r2000, but old versions asis
dwg readers would prefer r2000 or higher, oda can only read from r9 on,
but for the sake of sanity and less up/downconversions don't upconvert preR13 to r2000 per default.
only <r1.4 upconvert to r1.4, and >=r2004 down to r2000.
This way we have much less up/downconverting changes.
see branch work/write-prer13asis
|
change dwgwrite version defaults from r2000 to asis
|
https://api.github.com/repos/LibreDWG/libredwg/issues/823/comments
| 3 |
2023-08-31T08:00:33Z
|
2023-08-31T11:31:37Z
|
https://github.com/LibreDWG/libredwg/issues/823
| 1,874,994,056 | 823 |
[
"LibreDWG",
"libredwg"
] |
Attempting to build 0.12.5.6241 on macos 10.15 (x86_64) with clang 11 fails with:
```
In file included from out_json.c:2593:
./2ndheader.spec:111:3: error: format specifies type 'unsigned short' but the argument has type 'BITCODE_RL' (aka 'unsigned int') [-Werror,-Wformat]
FIELD_RSx (crc, 0);
^~~~~~~~~~~~~~~~~~
./spec.h:325:32: note: expanded from macro 'FIELD_RSx'
# define FIELD_RSx(name, dxf) FIELD_RS (name, dxf)
^~~~~~~~~~~~~~~~~~~~
out_json.c:473:28: note: expanded from macro 'FIELD_RS'
#define FIELD_RS(nam, dxf) FIELD (nam, RS, dxf)
^~~~~~~~~~~~~~~~~~~~
out_json.c:215:48: note: expanded from macro 'FIELD'
_path_field (#nam), _obj->nam); \
^~~~~~~~~
```
|
Build failure with clang 11 on macos x86_64
|
https://api.github.com/repos/LibreDWG/libredwg/issues/820/comments
| 2 |
2023-08-27T17:22:14Z
|
2023-08-28T12:21:13Z
|
https://github.com/LibreDWG/libredwg/issues/820
| 1,868,569,104 | 820 |
[
"LibreDWG",
"libredwg"
] |
Actual situation:
Example (Blank AC2.10 DWG file)
[BLANK.DWG.gz](https://github.com/LibreDWG/libredwg/files/12431679/BLANK.DWG.gz)
After conversion to JSON, there is BLOCK_HEADER in the form:
```
...
{
}
...
```
Because code (in src/out_json.c):
```
...
case DWG_TYPE_BLOCK_HEADER:
if (dat->version <= R_12
&& strEQc (obj->tio.object->tio.BLOCK_HEADER->name, "*MODEL_SPACE"))
{
LOG_TRACE ("Skip *MODEL_SPACE\n");
return 0;
}
...
```
Which generates an ERROR log in conversion from JSON to DWG:
```
ERROR: Required (null).type missing, skipped
```
Because JSON ```{}```.
I think that is bad.
Some possibilities:
1) Remove {} from JSON, this means no error log.
2) Remove the code above and generate JSON code like:
```
{
"object": "BLOCK_HEADER",
"index": 5,
"type": 49,
"handle": [0, 1, 31],
"size": 0,
"flag": 0,
"name": "*MODEL_SPACE",
"block_offset_r11": 4294967295,
"unknown_r11": 0
},
```
Which seems somehow right.
The result after conversion from JSON to DWG is fine.
@ruban What do you think?
|
What about BLOCK_HEADER in DWG->JSON conversion in preR13?
|
https://api.github.com/repos/LibreDWG/libredwg/issues/818/comments
| 3 |
2023-08-24T17:01:36Z
|
2023-09-05T08:31:22Z
|
https://github.com/LibreDWG/libredwg/issues/818
| 1,865,556,131 | 818 |
[
"LibreDWG",
"libredwg"
] |
with 2004/dbcolor json roundtrips and applying the following diff, results in a fixed ODA conversion. no Annotative data, no other APPID records.
without it fails with
Object of class AcDbRegAppTableRecord can't be cast to AcDbEntity.
``` diff
--- ../.build/dbcolor_2004.json 2023-08-24 18:23:06.390050916 +0200
+++ dbcolor_2004.json 2023-08-24 18:31:19.434854118 +0200
@@ -545,13 +545,8 @@
"ownerhandle": [4, 0, 0, 0],
"entries": [
[2, 1, 18, 18],
- [2, 1, 221, 221],
- [2, 1, 222, 222],
- [2, 1, 223, 223],
- [2, 1, 224, 224],
[2, 2, 263, 263],
[2, 2, 422, 422],
- [2, 2, 515, 515]
]
},
{
@@ -3583,7 +3578,6 @@
"cloning": 1,
"is_hardowner": 0,
"items": {
- "Annotative": [2, 1, 229, 229],
"Standard": [2, 1, 216, 216]
}
},
@@ -3656,258 +3650,6 @@
"break_size": 0.125
},
{
- "object": "STYLE",
- "index": 69,
- "type": 53,
- "handle": [0, 1, 220],
- "size": 94,
- "bitsize": 727,
- "eed": [
- {
- "size": 28,
- "handle": [5, 1, 222],
- "code": 0,
- "value": "AnnotativeData"
- },
- {
- "code": 2,
- "value": 0
- },
- {
- "code": 70,
- "value": 1
- },
- {
- "code": 70,
- "value": 1
- },
- {
- "code": 2,
- "value": 1
- },
- {
- "size": 14,
- "handle": [5, 1, 18],
- "code": 0,
- "value": "Arial"
- },
- {
- "code": 71,
- "value": 34
- }
- ],
- "is_xdic_missing": 1,
- "ownerhandle": [4, 1, 3, 3],
- "name": "Annotative",
- "is_xref_ref": 1,
- "is_xref_resolved": 0,
- "is_xref_dep": 0,
- "xref": [5, 0, 0, 0],
- "is_shape": 0,
- "is_vertical": 0,
- "text_size": 0.0,
- "width_factor": 1.0,
- "oblique_angle": 0.0,
- "generation": 0,
- "last_height": 0.2,
- "font_file": "Arial.ttf",
- "bigfont_file": ""
- },
- {
- "object": "APPID",
- "index": 70,
- "type": 67,
- "handle": [0, 1, 221],
- "size": 25,
- "bitsize": 173,
- "is_xdic_missing": 1,
- "ownerhandle": [4, 1, 9, 9],
- "name": "AcadAnnoPO",
- "is_xref_ref": 1,
- "is_xref_resolved": 0,
- "is_xref_dep": 0,
- "xref": [5, 0, 0, 0],
- "unknown": 0
- },
- {
- "object": "APPID",
- "index": 71,
- "type": 67,
- "handle": [0, 1, 222],
- "size": 29,
- "bitsize": 205,
- "is_xdic_missing": 1,
- "ownerhandle": [4, 1, 9, 9],
- "name": "AcadAnnotative",
- "is_xref_ref": 1,
- "is_xref_resolved": 0,
- "is_xref_dep": 0,
- "xref": [5, 0, 0, 0],
- "unknown": 0
- },
- {
- "object": "APPID",
- "index": 72,
- "type": 67,
- "handle": [0, 1, 223],
- "size": 33,
- "bitsize": 237,
- "is_xdic_missing": 1,
- "ownerhandle": [4, 1, 9, 9],
- "name": "ACAD_DSTYLE_DIMJAG",
- "is_xref_ref": 1,
- "is_xref_resolved": 0,
- "is_xref_dep": 0,
- "xref": [5, 0, 0, 0],
- "unknown": 0
- },
- {
- "object": "APPID",
- "index": 73,
- "type": 67,
- "handle": [0, 1, 224],
- "size": 34,
- "bitsize": 245,
- "is_xdic_missing": 1,
- "ownerhandle": [4, 1, 9, 9],
- "name": "ACAD_DSTYLE_DIMTALN",
- "is_xref_ref": 1,
- "is_xref_resolved": 0,
- "is_xref_dep": 0,
- "xref": [5, 0, 0, 0],
- "unknown": 0
- },
- {
- "object": "DIMSTYLE",
- "index": 74,
- "type": 69,
- "handle": [0, 1, 225],
- "size": 192,
- "bitsize": 1458,
- "eed": [
- {
- "size": 28,
- "handle": [5, 1, 222],
- "code": 0,
- "value": "AnnotativeData"
- },
- {
- "code": 2,
- "value": 0
- },
- {
- "code": 70,
- "value": 1
- },
- {
- "code": 70,
- "value": 1
- },
- {
- "code": 2,
- "value": 1
- },
- {
- "size": 12,
- "handle": [5, 1, 223],
- "code": 70,
- "value": 388
- },
- {
- "code": 40,
- "value": 1.5
- },
- {
- "size": 6,
- "handle": [5, 1, 224],
- "code": 70,
- "value": 392
- },
- {
- "code": 70,
- "value": 0
- }
- ],
- "is_xdic_missing": 1,
- "ownerhandle": [4, 1, 10, 10],
- "name": "Annotative",
- "is_xref_ref": 1,
- "is_xref_resolved": 0,
- "is_xref_dep": 0,
- "xref": [5, 0, 0, 0],
- "DIMPOST": "",
- "DIMAPOST": "",
- "DIMSCALE": 0.0,
- "DIMASZ": 0.18,
- "DIMEXO": 0.0625,
- "DIMDLI": 0.38,
- "DIMEXE": 0.18,
- "DIMRND": 0.0,
- "DIMDLE": 0.0,
- "DIMTP": 0.0,
- "DIMTM": 0.0,
- "DIMTOL": 0,
- "DIMLIM": 0,
- "DIMTIH": 1,
- "DIMTOH": 1,
- "DIMSE1": 0,
- "DIMSE2": 0,
- "DIMTAD": 0,
- "DIMZIN": 0,
- "DIMAZIN": 0,
- "DIMTXT": 0.18,
- "DIMCEN": 0.09,
- "DIMTSZ": 0.0,
- "DIMALTF": 25.4,
- "DIMLFAC": 1.0,
- "DIMTVP": 0.0,
- "DIMTFAC": 1.0,
- "DIMGAP": 0.09,
- "DIMALTRND": 0.0,
- "DIMALT": 0,
- "DIMALTD": 2,
- "DIMTOFL": 0,
- "DIMSAH": 0,
- "DIMTIX": 0,
- "DIMSOXD": 0,
- "DIMCLRD": {
- "rgb": "c1000000"
- },
- "DIMCLRE": {
- "rgb": "c1000000"
- },
- "DIMCLRT": {
- "rgb": "c1000000"
- },
- "DIMADEC": 0,
- "DIMDEC": 4,
- "DIMTDEC": 4,
- "DIMALTU": 2,
- "DIMALTTD": 2,
- "DIMAUNIT": 0,
- "DIMFRAC": 0,
- "DIMLUNIT": 2,
- "DIMDSEP": 46,
- "DIMTMOVE": 0,
- "DIMJUST": 0,
- "DIMSD1": 0,
- "DIMSD2": 0,
- "DIMTOLJ": 1,
- "DIMTZIN": 0,
- "DIMALTZ": 0,
- "DIMALTTZ": 0,
- "DIMUPT": 0,
- "DIMATFIT": 3,
- "DIMTXSTY": [5, 1, 17, 17],
- "DIMLWD": 4294967294,
- "DIMLWE": 4294967294,
- "flag0": 0,
- "DIMLDRBLK": [5, 0, 0, 0],
- "DIMBLK": [5, 0, 0, 0],
- "DIMBLK1": [5, 0, 0, 0],
- "DIMBLK2": [5, 0, 0, 0]
- },
- {
"object": "MLEADERSTYLE",
"index": 75,
"type": 508,
@@ -3917,7 +3659,6 @@
"eed": [
{
"size": 3,
- "handle": [5, 2, 263],
"code": 70,
"value": 2
}
@@ -6436,22 +6177,6 @@
]
},
{
- "object": "APPID",
- "index": 146,
- "type": 67,
- "handle": [0, 2, 515],
- "size": 46,
- "bitsize": 341,
- "is_xdic_missing": 1,
- "ownerhandle": [4, 1, 9, 9],
- "name": "ACAD_EXEMPT_FROM_CAD_STANDARDS",
- "is_xref_ref": 1,
- "is_xref_resolved": 0,
- "is_xref_dep": 0,
- "xref": [5, 0, 0, 0],
- "unknown": 0
- },
- {
"object": "DBCOLOR",
"index": 147,
"type": 517,
```
|
fixing 2004 oda issue AcDbRegAppTableRecord can't be cast to AcDbEntity
|
https://api.github.com/repos/LibreDWG/libredwg/issues/817/comments
| 3 |
2023-08-24T16:35:49Z
|
2023-08-28T13:16:39Z
|
https://github.com/LibreDWG/libredwg/issues/817
| 1,865,519,003 | 817 |
[
"LibreDWG",
"libredwg"
] |
There is call:
```
encode_preR13_section (SECTION_BLOCK, dat, dwg);
```
But in ```encode_preR13_section()``` is the possibility of returned error.
I am proposing to change to:
```
error |= encode_preR13_section (SECTION_BLOCK, dat, dwg);
```
|
in dwg_encode are not properly handled errors
|
https://api.github.com/repos/LibreDWG/libredwg/issues/814/comments
| 1 |
2023-08-23T15:44:57Z
|
2023-08-24T07:12:49Z
|
https://github.com/LibreDWG/libredwg/issues/814
| 1,863,590,637 | 814 |
[
"LibreDWG",
"libredwg"
] |
Output of compilation:
```
dwg2ps.c: In function ‘create_postscript’:
dwg2ps.c:117:54: error: passing argument 4 of ‘set_info’ from incompatible pointer type [-Werror=incompatible-pointer-types]
117 | (void)set_info (ps, dwg, "Author", dwg->summaryinfo.LASTSAVEDBY);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
| |
| BITCODE_TV {aka char *}
dwg2ps.c:77:31: note: expected ‘BITCODE_TU’ {aka ‘short unsigned int * restrict’} but argument is of type ‘BITCODE_TV’ {aka ‘char *’}
77 | BITCODE_TU restrict text)
| ~~~~~~~~~~~~~~~~~~~~^~~~
dwg2ps.c:118:51: error: passing argument 4 of ‘set_info’ from incompatible pointer type [-Werror=incompatible-pointer-types]
118 | if (set_info (ps, dwg, "Title", dwg->summaryinfo.TITLE))
| ~~~~~~~~~~~~~~~~^~~~~~
| |
| BITCODE_TV {aka char *}
dwg2ps.c:77:31: note: expected ‘BITCODE_TU’ {aka ‘short unsigned int * restrict’} but argument is of type ‘BITCODE_TV’ {aka ‘char *’}
77 | BITCODE_TU restrict text)
| ~~~~~~~~~~~~~~~~~~~~^~~~
dwg2ps.c:119:52: error: passing argument 4 of ‘set_info’ from incompatible pointer type [-Werror=incompatible-pointer-types]
119 | set_info (ps, dwg, "Keywords", dwg->summaryinfo.KEYWORDS);
| ~~~~~~~~~~~~~~~~^~~~~~~~~
| |
| BITCODE_TV {aka char *}
dwg2ps.c:77:31: note: expected ‘BITCODE_TU’ {aka ‘short unsigned int * restrict’} but argument is of type ‘BITCODE_TV’ {aka ‘char *’}
77 | BITCODE_TU restrict text)
| ~~~~~~~~~~~~~~~~~~~~^~~~
cc1: all warnings being treated as errors
```
|
dwg2ps issue after summaryinfo changes
|
https://api.github.com/repos/LibreDWG/libredwg/issues/812/comments
| 1 |
2023-08-23T15:07:59Z
|
2023-08-24T07:12:58Z
|
https://github.com/LibreDWG/libredwg/issues/812
| 1,863,528,950 | 812 |
[
"LibreDWG",
"libredwg"
] |
at least a NULL handle or so.
we still get ODA recovery errors
|
create a VX_CONTROL object on downconverting
|
https://api.github.com/repos/LibreDWG/libredwg/issues/811/comments
| 0 |
2023-08-23T07:22:52Z
|
2023-08-24T07:13:14Z
|
https://github.com/LibreDWG/libredwg/issues/811
| 1,862,727,250 | 811 |
[
"LibreDWG",
"libredwg"
] |
I am saving dwg file as geojson file from command line with dwgread.exe. when I look at the geographic coordinates... it shows 6 digits after the comma. 6 digits is not enough for geographic coordinates. How can I make it to have at least 10 digits.
|
Not enough digits for geojson coordinates
|
https://api.github.com/repos/LibreDWG/libredwg/issues/810/comments
| 11 |
2023-08-22T13:16:58Z
|
2023-08-26T22:04:08Z
|
https://github.com/LibreDWG/libredwg/issues/810
| 1,861,447,387 | 810 |
[
"LibreDWG",
"libredwg"
] |
There is an issue in the encoding of 3DLINE in pre13.
Test via dwgadd.
cat test.dwgadd
```
line (1 2 3) (4 5 6)
```
Command:
```dwgadd -v9 --as r9 -o test.dwg test.dwgadd```
Output:
```
Add entity _3DLINE [8] Decode entity _3DLINE
===========================
Entity number: 8, Type: 21, Addr: 3ef
flag_r11: 0x0 [RC 0]
size: 56 [RS]
layer: -1 [H(RSd) 8]
opts_r11: 0x3 [RSx 0]
HAS_Z_FIRST(0x1) HAS_Z_SECOND(0x2)
object_map{22} = 8
=> handle: (0.1.22)
start: (0, 1, 2) [3RD 10]
end: (3, 4, 5) [3RD 11]
```
|
Issue in encoding 3DLINE in preR13
|
https://api.github.com/repos/LibreDWG/libredwg/issues/809/comments
| 6 |
2023-08-18T17:41:26Z
|
2023-08-24T12:26:26Z
|
https://github.com/LibreDWG/libredwg/issues/809
| 1,857,068,223 | 809 |
[
"LibreDWG",
"libredwg"
] |
use bit_chain's not pointers.
use the r2004 decompressor.
use fields, not hand-written getters.
|
Refactor decode_r2007 to use normal 2004 methods
|
https://api.github.com/repos/LibreDWG/libredwg/issues/806/comments
| 0 |
2023-08-18T07:04:33Z
|
2023-08-18T07:04:43Z
|
https://github.com/LibreDWG/libredwg/issues/806
| 1,856,178,069 | 806 |
[
"LibreDWG",
"libredwg"
] |
Example file:
[line.dwg.gz](https://github.com/LibreDWG/libredwg/files/12373403/line.dwg.gz)
Decoding output:
```
=======> Thumbnail: 3165
```
Detection of thumbnail:
```
00000c5d 3080 DWG_SENTINEL_THUMBNAIL_BEGIN [..16]
000050f8 3081 DWG_SENTINEL_THUMBNAIL_END [..16]
```
Begin address is right, but searching for a second sentinel doesn't work.
|
Don't decode AC1014 thumbnail
|
https://api.github.com/repos/LibreDWG/libredwg/issues/805/comments
| 5 |
2023-08-17T20:40:10Z
|
2023-08-18T14:16:16Z
|
https://github.com/LibreDWG/libredwg/issues/805
| 1,855,675,681 | 805 |
[
"LibreDWG",
"libredwg"
] |
Actually, we have handles section in the second header like:
```
num_handles: 14 [BS 0]
handles[0].num_hdl: 1 [RCd 0]
handles[0].nr: 0 [RCd 0]
hdl: { 0x2c } [*RC]
handles[1].num_hdl: 1 [RCd 0]
handles[1].nr: 1 [RCd 0]
hdl: { 0x1 } [*RC]
handles[2].num_hdl: 1 [RCd 0]
handles[2].nr: 2 [RCd 0]
hdl: { 0x2 } [*RC]
handles[3].num_hdl: 1 [RCd 0]
handles[3].nr: 3 [RCd 0]
hdl: { 0x3 } [*RC]
handles[4].num_hdl: 1 [RCd 0]
handles[4].nr: 4 [RCd 0]
hdl: { 0x5 } [*RC]
handles[5].num_hdl: 1 [RCd 0]
handles[5].nr: 5 [RCd 0]
hdl: { 0x6 } [*RC]
handles[6].num_hdl: 1 [RCd 0]
handles[6].nr: 6 [RCd 0]
hdl: { 0x7 } [*RC]
handles[7].num_hdl: 1 [RCd 0]
handles[7].nr: 7 [RCd 0]
hdl: { 0x8 } [*RC]
handles[8].num_hdl: 1 [RCd 0]
handles[8].nr: 8 [RCd 0]
hdl: { 0x9 } [*RC]
handles[9].num_hdl: 1 [RCd 0]
handles[9].nr: 9 [RCd 0]
hdl: { 0xa } [*RC]
handles[10].num_hdl: 1 [RCd 0]
handles[10].nr: 10 [RCd 0]
hdl: { 0xb } [*RC]
handles[11].num_hdl: 1 [RCd 0]
handles[11].nr: 11 [RCd 0]
hdl: { 0xc } [*RC]
handles[12].num_hdl: 1 [RCd 0]
handles[12].nr: 12 [RCd 0]
hdl: { 0x17 } [*RC]
handles[13].num_hdl: 1 [RCd 0]
handles[13].nr: 13 [RCd 0]
hdl: { 0xd } [*RC]
crc: 0xacee [RSx 0]
```
This mean backup of:
```
HANDSEED: 0.1.2C [H 0]
...
BLOCK_CONTROL_OBJECT: (3.1.1) abs:1 [H 0]
LAYER_CONTROL_OBJECT: (3.1.2) abs:2 [H 0]
STYLE_CONTROL_OBJECT: (3.1.3) abs:3 [H 0]
LTYPE_CONTROL_OBJECT: (3.1.5) abs:5 [H 0]
VIEW_CONTROL_OBJECT: (3.1.6) abs:6 [H 0]
UCS_CONTROL_OBJECT: (3.1.7) abs:7 [H 0]
VPORT_CONTROL_OBJECT: (3.1.8) abs:8 [H 0]
APPID_CONTROL_OBJECT: (3.1.9) abs:9 [H 0]
DIMSTYLE_CONTROL_OBJECT: (3.1.A) abs:10 [H 0]
VX_CONTROL_OBJECT: (3.1.B) abs:11 [H 0]
DICTIONARY_ACAD_GROUP: (5.1.D) abs:13 [H 0]
DICTIONARY_ACAD_MLINESTYLE: (5.1.17) abs:23 [H 0]
DICTIONARY_NAMED_OBJECT: (3.1.C) abs:12 [H 0]
```
I think that is better to print handles in the second header in handle format.
Example 1
```
handles[13].num_hdl: 1 [RCd 0]
handles[13].nr: 13 [RCd 0]
hdl: { 0xd } [*RC]
```
to something like
```
handles[13].nr: 13 [RCd 0]
handles[13].handle: (?.1.D) abs:13 [H 0]
```
Example 2
```
handles[10].num_hdl: 2 [RCd 0]
handles[10].nr: 10 [RCd 0]
hdl: { 0x2 0x2a } [*RC]
```
to something like
```
handles[10].nr: 10 [RCd 0]
handles[10].handle: (?.2.22A) abs:554 [H 0]
```
|
Improve handles logging of second header
|
https://api.github.com/repos/LibreDWG/libredwg/issues/804/comments
| 5 |
2023-08-16T16:51:14Z
|
2023-08-17T19:55:05Z
|
https://github.com/LibreDWG/libredwg/issues/804
| 1,853,596,028 | 804 |
[
"LibreDWG",
"libredwg"
] |
Test scenario:
Input DWG file (blank file from AutoCAD 2000):
[test.dwg.gz](https://github.com/LibreDWG/libredwg/files/12361564/test.dwg.gz)
When I convert to JSON, 10th handle in JSON:
```
{
"nr": 10,
"hdl": [
11
]
},
```
Which is backup of ```VX_CONTROL_OBJECT: (3.1.B) abs:11 [H 0]```
After conversion from this JSON to DWG, result will be:
```
handles[10].num_hdl: 1 [RCd 0]
handles[10].nr: 10 [RCd 0]
hdl: { 0x8 } [*RC]
```
As I see, each time will be 0x8 from JSON conversion to DWG. This is bad.
|
Issue in 10th handle in second header
|
https://api.github.com/repos/LibreDWG/libredwg/issues/803/comments
| 3 |
2023-08-16T16:35:11Z
|
2023-08-17T14:08:09Z
|
https://github.com/LibreDWG/libredwg/issues/803
| 1,853,575,310 | 803 |
[
"LibreDWG",
"libredwg"
] |
need to handle possible double-bytes?
either into TU codepage specific, or into utf8 (as injson and indxf)
the IS_FROM_TU macro would be also wrong for the first currently implemented case, at least for BIG5, GB2312
* 932 is single-byte for most chars, but 0x8*, 0x9*, 0xE* and 0xF* lead bytes
* CP949, JOHAB, ANSI_949, 936, 950 for all > 0x8* lead bytes
* 1361 for all but 0x8[0123], 0xD[4567F], 0xF[A-F] lead bytes
* BIG5, GB2312 are two-byte only
...
none have valid 0x00 bytes. so it looks like nothing to fix here.
only logging can be improved to match the current user locale. (UTF-8 or other)
|
decode pre-r2007 asian codepages
|
https://api.github.com/repos/LibreDWG/libredwg/issues/802/comments
| 0 |
2023-08-14T05:58:04Z
|
2023-08-16T08:39:42Z
|
https://github.com/LibreDWG/libredwg/issues/802
| 1,849,054,996 | 802 |
[
"LibreDWG",
"libredwg"
] |
Building 0ad71990 on Ubuntu 23.04 with GCC 12.3.0 fails:
```
escape.c: In function ‘htmlescape’:
escape.c:41:25: error: pointer ‘dest’ used after ‘realloc’ [-Werror=use-after-free]
41 | const int off = d - dest;
| ~~^~~~~~
escape.c:45:25: note: call to ‘realloc’ here
45 | dest = (char*)realloc (dest, len);
| ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```
Please let me know what other information I should provide to help you figure this out.
|
realloc UAF (gcc 12)
|
https://api.github.com/repos/LibreDWG/libredwg/issues/801/comments
| 3 |
2023-08-13T14:13:32Z
|
2023-08-21T08:34:50Z
|
https://github.com/LibreDWG/libredwg/issues/801
| 1,848,611,259 | 801 |
[
"LibreDWG",
"libredwg"
] |
somethink like
```
VERSIONS (R_13, R_2000) {
IF_ENCODE_FROM_EARLIER {
// documented as 0x18,0x78,0x01,0x04 for R13, 0x18,0x78,0x01,0x05 for R14
// r14: 7d f4 78 01
// r2000: 14 64 78 01
VERSION (R_13) {
unknown_rc4[] = { 0x18, 0x78, 0x01, 0x04 };
}
VERSION (R_14) {
unknown_rc4[] = { 0x18, 0x78, 0x01, 0x05 };
}
VERSION (R_2000) {
unknown_rc4[] = { 0x14, 0x64, 0x78, 0x01 };
}
}
FIELD_TFF (version, 12, 0);
FIELD_VECTOR_INL (null_b, B, 4, 0);
// DEBUG_HERE;
FIELD_RC (unknown_10, 0); // 0x10
FIELD_VECTOR_INL (unknown_rc4, RC, 4, 0);
//PRE (R_2000) {
// if (FIELD_VALUE (unknown_10) == 0x18 && FIELD_VALUE (unknown_rc4[0]) == 0x78)
// dat->byte -= 2;
//}
FIELD_RC (num_sections, 0); // r14: 5, r2000: 6
REPEAT sections, num_sections
// address+sizes of sections 0-2 is correct, 3+4 is empty
FIELD_RC (section[i].nr, 0);
FIELD_BLx (section[i].address, 0);
FIELD_BL (section[i].size, 0);
FIELD_BS (num_handlers, 0); // 14, resp. 16 in r14
if (FIELD_VALUE (num_handlers) > 16)
{
LOG_ERROR ("Second header num_handlers > 16: %d\n",
FIELD_VALUE (num_handlers));
FIELD_VALUE (num_handlers) = 14;
}
REPEAT handlers, num_handlers
FIELD_RC (handlers[i].size, 0);
FIELD_RC (handlers[i].nr, 0);
FIELD_VECTOR (handlers[i].data, RC, handlers[i].size, 0);
// TODO: CRC check
// crc = bit_read_CRC (dat);
FIELD_RS_BE (crc, 0);
VERSION (R_14) {
FIELD_RL (junk_r14_1, 0);
FIELD_RL (junk_r14_2, 0);
}
}
```
|
Add a 2ndheader.spec
|
https://api.github.com/repos/LibreDWG/libredwg/issues/800/comments
| 3 |
2023-08-04T10:40:39Z
|
2023-08-11T14:20:40Z
|
https://github.com/LibreDWG/libredwg/issues/800
| 1,836,500,423 | 800 |
[
"LibreDWG",
"libredwg"
] |
https://json-schema.org/
https://github.com/LibreDWG/libredwg/blob/work/libredwg-schema/libredwg-schema.json
let gen-dynapi.pl generate it.
|
Add a json-schema spec
|
https://api.github.com/repos/LibreDWG/libredwg/issues/799/comments
| 0 |
2023-08-04T07:53:59Z
|
2023-08-13T11:43:42Z
|
https://github.com/LibreDWG/libredwg/issues/799
| 1,836,255,980 | 799 |
[
"LibreDWG",
"libredwg"
] |
error:

bug file:
[dwg.zip](https://github.com/LibreDWG/libredwg/files/12256366/dwg.zip)
|
AC1018 read_R2004_section_info corruption with AcDbObjects
|
https://api.github.com/repos/LibreDWG/libredwg/issues/797/comments
| 4 |
2023-08-04T02:03:46Z
|
2023-08-04T07:37:38Z
|
https://github.com/LibreDWG/libredwg/issues/797
| 1,835,951,932 | 797 |
[
"LibreDWG",
"libredwg"
] |
When I am investigating https://github.com/LibreDWG/libredwg/issues/346 I found that 2NDHEADER isn't in JSON.
When I convert JSON to DWG, the DWG is without 2NDHEADER.
What about adding 2NDHEADER to JSON?
Or do we need to fix the conversion from JSON to DWG by adding 2NDHEADER?
|
2NDHEADER in JSON
|
https://api.github.com/repos/LibreDWG/libredwg/issues/792/comments
| 9 |
2023-07-31T21:12:43Z
|
2023-08-16T16:36:44Z
|
https://github.com/LibreDWG/libredwg/issues/792
| 1,830,034,153 | 792 |
[
"LibreDWG",
"libredwg"
] |
When I am looking at https://github.com/LibreDWG/libredwg/issues/789 I am looking to diff between dwgread log in -v3 log level.
And output is like:
```
< Next object: 8 Handleoff: 0x1 [UMC] Offset: 245 [MC]
---
> Next object: 8 Handleoff: 0x1 [UMC] Offset: 40 [MC]
```
and
```
546c546
< Object number: 9/9, Size: 391 [MS], Type: 42 [BS], Address: 16101
---
> Object number: 9/9, Size: 391 [MS], Type: 42 [BS], Address: 15881
```
@rurban
Could we move these addresses (Offset, Address) to LOG_HANDLE?
The primary intent is the possibility of diff.
|
Proposal of logging change of addresses
|
https://api.github.com/repos/LibreDWG/libredwg/issues/790/comments
| 1 |
2023-07-31T20:05:16Z
|
2023-08-01T10:39:25Z
|
https://github.com/LibreDWG/libredwg/issues/790
| 1,829,936,924 | 790 |
[
"LibreDWG",
"libredwg"
] |
When I am investigating https://github.com/LibreDWG/libredwg/issues/346 I found an issue with AcDb:Handles section
Process:
- DWG file from https://github.com/LibreDWG/libredwg/issues/346
```
section[2].number: 2 [RC] AcDb:Handles
section[2].address: 163035 [RL]
section[2].size: 678 [RL]
```
- Convert to JSON
- Convert back to DWG
```
section[2].number: 2 [RC] AcDb:Handles
section[2].address: 163037 [RL]
section[2].size: 1167 [RL]
```
Issues:
1. First two sections are ok, but the third section start address is different.
2. And items inside are different.
|
AcDb:Handles start address
|
https://api.github.com/repos/LibreDWG/libredwg/issues/789/comments
| 4 |
2023-07-31T19:11:47Z
|
2023-08-01T17:20:20Z
|
https://github.com/LibreDWG/libredwg/issues/789
| 1,829,854,547 | 789 |
[
"LibreDWG",
"libredwg"
] |
When I am investigating https://github.com/LibreDWG/libredwg/issues/346 I found issues in Template section
Support of templates is from R14
Template section consists from description and MEASUREMENT fields:
There are two types of Template section:
1. AC1013 .. AC1018
description is RS for text size and RC for each byte
MEASURENMENT is RS
3. AC1021 .. ?
description is RS for text size and RS for each byte
MEASURENMENT is RS
Issues:
a. In AC1013 .. AC1015 isn't description decoding. And bad comment "(0 English/256 Metric)"
b. No write support for description
c. There is no write support from JSON file to DWG for template description
d. How to support text in encoding? For each versions.
|
template section: T16 up/downconvert needed
|
https://api.github.com/repos/LibreDWG/libredwg/issues/788/comments
| 18 |
2023-07-31T09:19:09Z
|
2023-08-16T16:52:53Z
|
https://github.com/LibreDWG/libredwg/issues/788
| 1,828,763,249 | 788 |
[
"LibreDWG",
"libredwg"
] |
I'm new to dxf format, but wrote this `test.dxf`:
```
0
SECTION
2
ENTITIES
0
LINE
8
Polygon
10
0.0
20
0.0
11
100.0
21
0.0
0
LINE
8
Polygon
10
100.0
20
0.0
11
100.0
21
100.0
0
LINE
8
Polygon
10
0.0
20
0.0
11
100.0
21
100.0
0
ENDSEC
0
EOF
```
I was able to open it in AutoCAD 2019, but get the following error when I tried to convert to DWG version using `dxf2dwg`:
```ERROR: File test.dxf too small, 225 byte.```
|
dxf2dwg ERROR: File test.dxf too small, 225 byte.
|
https://api.github.com/repos/LibreDWG/libredwg/issues/786/comments
| 0 |
2023-07-29T14:15:06Z
|
2023-08-02T08:55:49Z
|
https://github.com/LibreDWG/libredwg/issues/786
| 1,827,499,956 | 786 |
[
"LibreDWG",
"libredwg"
] |
In https://github.com/LibreDWG/libredwg/issues/346 is discussed issue:
```
1206,1207c1206
< "index": 256,
< "rgb": "c3000007"
---
> "rgb": "c0000000"
```
There is the conversion of fill_color (CMC) defined by (AC1015):
```
rowstyles[rcount1].fill_color.index: 256 [CMC.BS 63]
rowstyles[rcount1].fill_color.rgb: 0xc3000007 [CMC.BL 421]
fill_color.method: 0xc3 Truecolor
rowstyles[rcount1].fill_color.flag: 0x0 [CMC.RC]
```
to JSON, where is:
```
"fill_color": {
"index": 256,
"rgb": "c3000007"
},
```
This means that rgb color doesn't exist in index table → index=256
See:
```
bit_read_CMC()
{
...
color->index = dwg_find_color_index (color->rgb);
...
}
```
and
```
EXPORT BITCODE_BS
dwg_find_color_index (BITCODE_BL rgb)
{
Dwg_RGB_Palette pal;
rgb &= 0x00ffffff;
pal.r = (rgb >> 16) & 0xFF;
pal.g = (rgb >> 8) & 0xFF;
pal.b = rgb & 0xFF;
// linear search is good enough for 256. the palette is unsorted.
for (BITCODE_BS i = 0; i < 256; i++)
{
if (memcmp (&pal, &rgb_palette[i], 3) == 0)
return i;
}
return 256;
}
```
When I am converting this JSON back to DWG, result will be:
```
rowstyles[rcount1].text_color.flag: 0x0 [CMC.RC]
rowstyles[rcount1].fill_color.index: 0 [CMC.BS 63]
rowstyles[rcount1].fill_color.rgb: 0xc0000000 [CMC.BL 421]
fill_color.method: 0xc0 ByLayer
rowstyles[rcount1].fill_color.flag: 0x0 [CMC.RC]
```
The problem with this is, that was called:
```
if (dat->from_version >= R_2004)
bit_downconvert_CMC (dat, color);
```
in bit_write_CMC().
|
DWG to JSON (and back) and CMC issue
|
https://api.github.com/repos/LibreDWG/libredwg/issues/785/comments
| 9 |
2023-07-24T19:55:41Z
|
2023-08-01T14:21:41Z
|
https://github.com/LibreDWG/libredwg/issues/785
| 1,819,043,264 | 785 |
[
"LibreDWG",
"libredwg"
] |
Hi.
When I input statement “dwgread –O GeoJSON –o outjson Arc.dwg” in cmd, the program keeps waiting and cannot run. What is the reason for this?
|
How to use dwgread
|
https://api.github.com/repos/LibreDWG/libredwg/issues/784/comments
| 2 |
2023-07-24T07:35:02Z
|
2023-07-25T05:36:11Z
|
https://github.com/LibreDWG/libredwg/issues/784
| 1,817,824,362 | 784 |
[
"LibreDWG",
"libredwg"
] |
Hi,
I see in the bindings folder that only perl and python are supported.
Is there a way to use it for JAVA/Android?
Thank you very much,
|
Bindings for Java/Android
|
https://api.github.com/repos/LibreDWG/libredwg/issues/783/comments
| 3 |
2023-07-24T02:19:41Z
|
2023-09-21T08:56:02Z
|
https://github.com/LibreDWG/libredwg/issues/783
| 1,817,473,571 | 783 |
[
"LibreDWG",
"libredwg"
] |
We have an issue in dwg_find_color_index(), which is not working.
The problem is with:
```
BITCODE_BL rgb = 0xff0000;
Dwg_RGB_Palette pal;
pal.r = rgb & 0xff0000;
```
where BITCODE_BL is uint32_t and pal.r is unsigned char and conversion isn't working.
|
Issue in dwg_find_color_index()
|
https://api.github.com/repos/LibreDWG/libredwg/issues/780/comments
| 5 |
2023-07-21T18:54:40Z
|
2023-07-24T05:05:08Z
|
https://github.com/LibreDWG/libredwg/issues/780
| 1,816,257,105 | 780 |
[
"LibreDWG",
"libredwg"
] |
In https://github.com/LibreDWG/libredwg/issues/346 I described roundtripping issue in conversion between JSON and DWG.
In the conversion from DWG to JSON is used:
```
DWG_TABLE (LTYPE)
...
FIELD_BINARY (strings_area, 256, 0);
```
in dwg.spec
The result of the conversion of "" is 512 character string with zeros.
In the conversion from JSON to DWG is used:
```
in_hex2bin() ...
```
in in_dxf.c
The result of the conversion of 512 character string with zeros is "0".
I am curious when we have in_hex2bin without tests, and there is a copy of this function in unit-testing/add_test.c.
I think that could be fine to have one function and tests with it. + Fix of this issue.
|
DWG to JSON and back strings_area issue
|
https://api.github.com/repos/LibreDWG/libredwg/issues/775/comments
| 9 |
2023-07-19T10:39:27Z
|
2023-07-24T05:05:23Z
|
https://github.com/LibreDWG/libredwg/issues/775
| 1,811,672,725 | 775 |
[
"LibreDWG",
"libredwg"
] |
RS,RL,handles still broken on mips32 and ppc64 big-endian.
I'm adding now qemu binfmt support (debian-style) to the scripts (env LD_LIBRARY_PATH='/usr/powerpc64-linux-gnu/lib), just debugging is tricky there.
* [X] compile on mip32 and ppc64
* [X] decode and convert to JSON
* [x] bits_test
* [x] bit_read_DD codes 2 and 1
* [x] decode_r2007
* [x] add_APPID
* [ ] check-minimal: encode, codepage conversion, dynapi
* [ ] check full
|
check and fix big-endian
|
https://api.github.com/repos/LibreDWG/libredwg/issues/774/comments
| 1 |
2023-07-17T14:15:45Z
|
2023-07-27T11:01:53Z
|
https://github.com/LibreDWG/libredwg/issues/774
| 1,807,890,499 | 774 |
[
"LibreDWG",
"libredwg"
] |
libredwg 0.12.5.5907 currently [fails to build on ppc64](https://build.opensuse.org/package/live_build_log/devel:libraries:c_c++/libredwg/openSUSE_Factory_PowerPC/ppc64):
```
[ 39s] bits.c: In function 'bit_read_RD':
[ 39s] bits.c:555:31: error: passing argument 1 of '__bswap_64' makes integer from pointer without a cast [-Werror=int-conversion]
[ 39s] 555 | result = (double *)htole64 (byte);
[ 39s] | ^~~~
[ 39s] | |
[ 39s] | unsigned char *
[ 39s] bits.c:555:22: note: in expansion of macro 'htole64'
[ 39s] 555 | result = (double *)htole64 (byte);
[ 39s] | ^~~~~~~
[ 39s] In file included from /usr/include/byteswap.h:25:
[ 39s] /usr/include/bits/byteswap.h:70:24: note: expected '__uint64_t' {aka 'long unsigned int'} but argument is of type 'unsigned char *'
[ 39s] 70 | __bswap_64 (__uint64_t __bsx)
[ 39s] | ~~~~~~~~~~~^~~~~
```
It seems to have previously succeeded (0.12.5), but that might have been because WORDS_BIGENDIAN was unset for some other reason.
|
FTBFS 0.12.5.5907 on ppc64
|
https://api.github.com/repos/LibreDWG/libredwg/issues/773/comments
| 1 |
2023-07-15T18:15:48Z
|
2023-07-17T10:42:46Z
|
https://github.com/LibreDWG/libredwg/issues/773
| 1,806,263,388 | 773 |
[
"LibreDWG",
"libredwg"
] |
I downloaded the libredwg-0.12.5.5885-win64.zip and extracted it. I'm trying to run the dwg2svg2.exe. I'm getting a popup saying libredwg-0.dll was not found. How do I get this? Do I need to download anything else?
Please help and guide on how to run the exe files on windows system</div>
|
How to use this? dlls missing
|
https://api.github.com/repos/LibreDWG/libredwg/issues/771/comments
| 3 |
2023-07-05T17:56:11Z
|
2024-03-19T07:28:26Z
|
https://github.com/LibreDWG/libredwg/issues/771
| 1,790,025,685 | 771 |
[
"LibreDWG",
"libredwg"
] |
Hello,
I try to convert dwg to dxf using dwg2dxf, got error as below:
dwg2dxf -o ~/Downloads/64a08d92d5b6a0c965b9442fb0b48fb7389b9cec.dwg.dxf /Downloads/64a08d92d5b6a0c965b9442fb0b48fb7389b9cec.dwg
Reading DWG file /Downloads/64a08d92d5b6a0c965b9442fb0b48fb7389b9cec.dwg
ERROR: Failed to decode file: /Users/weiken/Downloads/64a08d92d5b6a0c965b9442fb0b48fb7389b9cec.dwg 0x100
READ ERROR 0x100
origin dwg file open with AutoCAD:

### attachment
[64a08d92d5b6a0c965b9442fb0b48fb7389b9cec.dwg.zip](https://github.com/LibreDWG/libredwg/files/11949891/64a08d92d5b6a0c965b9442fb0b48fb7389b9cec.dwg.zip)
|
decode section_map_address: 0x0 [RLL 0] (r2004)
|
https://api.github.com/repos/LibreDWG/libredwg/issues/769/comments
| 2 |
2023-07-04T13:44:37Z
|
2023-07-07T06:22:41Z
|
https://github.com/LibreDWG/libredwg/issues/769
| 1,787,964,517 | 769 |
[
"LibreDWG",
"libredwg"
] |
In order to display the type and name of each handle, starting with HEADER, we'd need to prescan all objects (HANDLES) at least for the type, for table records even up to its name.
Currently we can display it only for back references, not future objects.
e.g.
```
reactors[0]: (4.1.C) abs:12 [H* 330] => DICTIONARY
ownerhandle: (12.1.E) abs:381 [H 330] => BLOCK_HEADER bloko
layer: (5.1.8A) abs:138 [H 8] => LAYER Tavolo 3
```
Benefit:
Many ODA errors stem from invalid references. This way we could easier see where they are pointing to.
Cost:
Abstract decode_section_handles for all 3 versions.
Seperate handles and decode_add_object code for 2000, 2004 and 2007. From 1 phase to 3 phases:
* 0 for single-pass (-v3),
* 1 for first pass (allocate objects and skip),
* 2 for second pass (already allocated, full object from spec).
|
prescan objects with -v4
|
https://api.github.com/repos/LibreDWG/libredwg/issues/768/comments
| 0 |
2023-06-30T06:08:53Z
|
2023-06-30T07:07:22Z
|
https://github.com/LibreDWG/libredwg/issues/768
| 1,781,953,793 | 768 |
[
"LibreDWG",
"libredwg"
] |
Hello,
I'm trying to convert dwg to dxf using dwg2dxf, there are some errors and the dxf file is not generated.
Are there any way to solve the errors?
Thank you.
### environment
macOS big sur 11.5.2 , Apple clang version 12.0.5 (clang-1205.0.22.9),GNU Make 3.81, libredwg latest [commit](https://github.com/LibreDWG/libredwg/commit/a0636e94f35cfc140cccfb026dabb1de2742977f)
compile with
./autogen.sh && ./configure --disable-bindings && make && sudo make install
### some information
programs/dwg2dxf -o ~/Downloads/6151acdedf1bc01e5a5847868d8bdbbee139b29c.dwg.dxf ~/Downloads/6151acdedf1bc01e5a5847868d8bdbbee139b29c.dwg -y
Reading DWG file /Downloads/6151acdedf1bc01e5a5847868d8bdbbee139b29c.dwg
Warning:
@0x6834 => start 0x7b5d
Warning:
@0x7e61 => start 0x8508
ERROR: DWG_SENTINEL_R11_VIEW_BEGIN not found at 34056
ERROR: Failed to decode file: /Downloads/6151acdedf1bc01e5a5847868d8bdbbee139b29c.dwg 0x100
origin dwg file open with AutoCAD:

### attachment
[6151acdedf1bc01e5a5847868d8bdbbee139b29c.dwg.zip](https://github.com/LibreDWG/libredwg/files/11859001/6151acdedf1bc01e5a5847868d8bdbbee139b29c.dwg.zip)
|
decode error in r11 layer and view.address
|
https://api.github.com/repos/LibreDWG/libredwg/issues/767/comments
| 13 |
2023-06-25T06:54:36Z
|
2023-07-07T06:25:11Z
|
https://github.com/LibreDWG/libredwg/issues/767
| 1,773,102,703 | 767 |
[
"LibreDWG",
"libredwg"
] |
e.g. with MLEADERSTYLE converted to r2000:
EED found ACAD_MLEADERVER 107
EED[0] code: 70 [RC], short: 2 [RS]
ACAD_MLEADERVER class_version: 2
with ACAD_MLEADERVER as added APPID of name ACAD_MLEADERVER
DIMSTYLE may need a APPID "ACAD_DSTYLE_DIMJAG" or ACAD_DSTYLE_DIMTALN
|
downconverting some classes need to add a class_version EED
|
https://api.github.com/repos/LibreDWG/libredwg/issues/766/comments
| 0 |
2023-06-22T13:39:21Z
|
2023-06-23T15:03:41Z
|
https://github.com/LibreDWG/libredwg/issues/766
| 1,769,703,108 | 766 |
[
"LibreDWG",
"libredwg"
] |
see the branch work/oda and its actions, which installs the ODAFileConverter
and tests it against our produced dwgs from json. DXF not yet.
```
TeighaFileConverter . .. ACAD2004 DXF 0 1 example_2004.dwg
OdError thrown during readFile of drawing "/home/runner/work/libredwg/libredwg/programs/example_2004.dwg" :
.dwg file needs recovery
dwgread -oexample_2007.json ../test/test-data/example_2007.dwg
./dwgwrite -y -v0 -o example_2007.dwg example_2007.json
TeighaFileConverter . .. ACAD2007 DXF 0 1 example_2007.dwg
OdError thrown during readFile of drawing "/home/runner/work/libredwg/libredwg/programs/example_2007.dwg" :
.dwg file needs recovery
dwgread -oexample_2010.json ../test/test-data/example_2010.dwg
./dwgwrite -y -v0 -o example_2010.dwg example_2010.json
TeighaFileConverter . .. ACAD2010 DXF 0 1 example_2010.dwg
ODA Warning: Cannot set C to that value.
OdError thrown during readFile of drawing "/home/runner/work/libredwg/libredwg/programs/example_2010.dwg" :
.dwg file needs recovery
dwgread -oexample_2013.json ../test/test-data/example_2013.dwg
./dwgwrite -y -v0 -o example_2013.dwg example_2013.json
TeighaFileConverter . .. ACAD2013 DXF 0 1 example_2013.dwg
ODA Warning: Cannot set C to that value.
ODA Warning: Object improperly read
AcDbRegion(176)
OdError thrown during readFile of drawing "/home/runner/work/libredwg/libredwg/programs/example_2013.dwg" :
.dwg file needs recovery
dwgread -oexample_2018.json ../test/test-data/example_2018.dwg
./dwgwrite -y -v0 -o example_2018.dwg example_2018.json
TeighaFileConverter . .. ACAD2018 DXF 0 1 example_2018.dwg
ODA Warning: Cannot set C to that value.
ODA Warning: General modeling failure
AcDbRegion(176)
ODA Warning: Object improperly read
AcDbRegion(176)
ODA Warning: General modeling failure
AcDb3dSolid(2E1)
ODA Warning: Object improperly read
AcDb3dSolid(2E1)
ODA Warning: General modeling failure
AcDbRegion(37D)
ODA Warning: Invalid input
AcDb3dPolyline(41A)
ODA Warning: Invalid input
AcDbPolyFaceMesh(4E4)
OdError thrown during readFile of drawing "/home/runner/work/libredwg/libredwg/programs/example_2018.dwg" :
Object of class AcDbLayerTableRecord can't be cast to AcDbEntity.
dwgread -oexample_r14.json ../test/test-data/example_r14.dwg
./dwgwrite -y -v0 -o example_r14.dwg example_r14.json
TeighaFileConverter . .. ACAD14 DXF 0 1 example_r14.dwg
ODA Warning: Invalid RoundTripR14 data
OdError thrown during readFile of drawing "/home/runner/work/libredwg/libredwg/programs/example_r14.dwg" :
CRC does not match
dwgread -oexample_r13.json ../test/test-data/example_r13.dwg
./dwgwrite -y -v0 -o example_r13.dwg example_r13.json
TeighaFileConverter . .. ACAD13 DXF 0 1 example_r13.dwg
ODA Warning: Invalid RoundTripR14 data
OdError thrown during readFile of drawing "/home/runner/work/libredwg/libredwg/programs/example_r13.dwg" :
Object improperly read: <AcDbProxyObject> (38E)
Previous error: .dwg file needs recovery
dwgread -oentities-3d.json ../test/test-data/r11/entities-3d.dwg
./dwgwrite -y -v0 -o entities-3d.dwg entities-3d.json
TeighaFileConverter . .. ACAD12 DXF 0 1 entities-3d.dwg
dwgread -oentities.json ../test/test-data/r2.10/entities.dwg
./dwgwrite -y -v0 -o entities.dwg entities.json
TeighaFileConverter . .. ACAD10 DXF 0 1 entities.dwg
OdError thrown during readFile of drawing "/home/runner/work/libredwg/libredwg/programs/entities.dwg" :
Unsupported early .dwg file version
dwgread -oText.json ../test/test-data/2010/Text.dwg
./dwgwrite -y -v0 -o Text.dwg Text.json
TeighaFileConverter . .. ACAD2010 DXF 0 1 Text.dwg
ODA Warning: Color index 27397
ODA Warning: Cannot set C to that value.
ODA Warning: Color index 27397
OdError thrown during readFile of drawing "/home/runner/work/libredwg/libredwg/programs/Text.dwg" :
Object improperly read: <AcDbMLeaderStyle> (E5)
Previous error: Object improperly read
dwgread -oLeader.json ../test/test-data/2010/Leader.dwg
./dwgwrite -y -v0 -o Leader.dwg Leader.json
TeighaFileConverter . .. ACAD2010 DXF 0 1 Leader.dwg
ODA Warning: Color index 27397
ODA Warning: Cannot set C to that value.
ODA Warning: Color index 27397
OdError thrown during readFile of drawing "/home/runner/work/libredwg/libredwg/programs/Leader.dwg" :
Object improperly read: <AcDbMLeaderStyle> (E5)
Previous error: Object improperly read
```
|
add oda check to json.test, add to CI
|
https://api.github.com/repos/LibreDWG/libredwg/issues/764/comments
| 3 |
2023-06-21T13:06:19Z
|
2023-06-25T06:25:19Z
|
https://github.com/LibreDWG/libredwg/issues/764
| 1,767,565,781 | 764 |
[
"LibreDWG",
"libredwg"
] |
Hello,
I'm trying to convert dwg to dxf using dwg2dxf, there are some errors and the converted dxf file is invalid.
Are there any way to solve the errors? Is it a bug?
Thank you.
### environment
macOS big sur 11.5.2 , Apple clang version 12.0.5 (clang-1205.0.22.9),GNU Make 3.81, libredwg latest [commit](https://github.com/LibreDWG/libredwg/commit/f0228020f14800a497bb428ef2022c0083aeb8ab)
compile with
./autogen.sh && ./configure --disable-bindings && make && sudo make install
### some information
dwg2dxf -o ~/Downloads/6370a4f740006e9980514aa0ada3187921e2c5c3.dxf ~/Downloads/6370a4f740006e9980514aa0ada3187921e2c5c3.dwg -y
Reading DWG file /Users/weiken/Downloads/6370a4f740006e9980514aa0ada3187921e2c5c3.dwg
ERROR: Section[13]->pages[0] overflow
ERROR: Invalid System Section
Writing DXF file /Users/weiken/Downloads/6370a4f740006e9980514aa0ada3187921e2c5c3.dxf
ERROR: dwg.block_control and HEADER.BLOCK_CONTROL_OBJECT missing
ERROR: BLOCK_CONTROL missing
origin dwg file open with AutoCAD:

### attachment
[6370a4f740006e9980514aa0ada3187921e2c5c3.dwg.zip](https://github.com/LibreDWG/libredwg/files/11744424/6370a4f740006e9980514aa0ada3187921e2c5c3.dwg.zip)
|
convert failed in dwg2dxf
|
https://api.github.com/repos/LibreDWG/libredwg/issues/763/comments
| 2 |
2023-06-14T10:07:09Z
|
2023-06-14T12:40:58Z
|
https://github.com/LibreDWG/libredwg/issues/763
| 1,756,527,489 | 763 |
[
"LibreDWG",
"libredwg"
] |
Hello, I was testing some dwg files and found entities are splitted into different parts in dwg2dxf.
### case 1
weiken@B-M71PMD6M-1836 libredwg-0.12.5.5759 % programs/dwg2dxf -o ~/Downloads/test_021.dxf ~/Downloads/test_021.dwg
Reading DWG file /Users/weiken/Downloads/test_021.dwg
Warning: checksum: 0x2cc512c3 (calculated) mismatch
Warning: Invalid sections: 0 != numgaps: 0 + numsections: 22
ERROR: Invalid .props x 9576
Warning: Ignore invalid handleoff (@4072)
Warning: Ignore invalid handleoff (@6107)
Warning: Ignore invalid handleoff (@7705)
Warning: Unstable Class object 511 MATERIAL (0x400) 4105/0
Warning: Unstable Class object 511 MATERIAL (0x400) 4106/0
Warning: Unstable Class object 511 MATERIAL (0x400) 4107/0
Warning: Unstable Class object 513 TABLESTYLE (0xfff) 4127/0
ERROR: Invalid .files x 349500452
Warning: Skip empty section 0 AcDb:Template
Writing DXF file /Users/weiken/Downloads/test_021.dxf
Warning: Unstable Class object 511 MATERIAL (0x400) 4105/2C5F2
Warning: Unstable Class object 511 MATERIAL (0x400) 4106/2C5F3
Warning: Unstable Class object 511 MATERIAL (0x400) 4107/2C5F4
Warning: Unstable Class object 513 TABLESTYLE (0xfff) 4127/2C608
origin dwg file open with AutoCAD:

converted dxf file open with LibreCAD:

### case 2
weiken@B-M71PMD6M-1836 libredwg-0.12.5.5759 % programs/dwg2dxf -o ~/Downloads/test1.dxf ~/Downloads/test1.dwg -y
Reading DWG file /Users/weiken/Downloads/test1.dwg
Warning: checksum: 0x26ef124d (calculated) mismatch
Warning: Invalid sections: 0 != numgaps: 0 + numsections: 388
ERROR: Invalid .props x 9581
ERROR: Invalid LWPOLYLINE.num_points 38737
ERROR: bit_read_RC buffer overflow at 4996.0 + 1 > 4996
Warning: Ignore invalid handleoff (@136343)
Warning: Ignore invalid handleoff (@138378)
Warning: Ignore invalid handleoff (@140412)
Warning: Ignore invalid handleoff (@142448)
Warning: Ignore invalid handleoff (@144482)
Warning: Ignore invalid handleoff (@146518)
Warning: Ignore invalid handleoff (@148552)
Warning: Ignore invalid handleoff (@150586)
Warning: Ignore invalid handleoff (@152624)
Warning: Ignore invalid handleoff (@154660)
Warning: Ignore invalid handleoff (@156694)
Warning: Ignore invalid handleoff (@158728)
Warning: Ignore invalid handleoff (@160763)
Warning: Ignore invalid handleoff (@162798)
Warning: Ignore invalid handleoff (@164832)
Warning: Ignore invalid handleoff (@166866)
Warning: Ignore invalid handleoff (@168901)
Warning: Ignore invalid handleoff (@170936)
Warning: Ignore invalid handleoff (@172970)
Warning: Ignore invalid handleoff (@175004)
Warning: Ignore invalid handleoff (@177040)
Warning: Ignore invalid handleoff (@179074)
Warning: Ignore invalid handleoff (@181108)
Warning: Ignore invalid handleoff (@183142)
Warning: Ignore invalid handleoff (@185176)
Warning: Ignore invalid handleoff (@187213)
Warning: Ignore invalid handleoff (@189248)
Warning: Ignore invalid handleoff (@191282)
Warning: Ignore invalid handleoff (@193316)
Warning: Ignore invalid handleoff (@195350)
Warning: Ignore invalid handleoff (@197385)
Warning: Ignore invalid handleoff (@199420)
Warning: Ignore invalid handleoff (@201454)
Warning: Ignore invalid handleoff (@203489)
Warning: Ignore invalid handleoff (@205524)
Warning: Ignore invalid handleoff (@207559)
Warning: Ignore invalid handleoff (@209593)
Warning: Ignore invalid handleoff (@211628)
Warning: Ignore invalid handleoff (@213663)
Warning: Ignore invalid handleoff (@215697)
Warning: Ignore invalid handleoff (@217731)
Warning: Ignore invalid handleoff (@219766)
ERROR: bit_read_RC buffer overflow at 4995.0 + 1 > 4995
Warning: Ignore invalid handleoff (@221800)
Warning: Ignore invalid handleoff (@223835)
Warning: Ignore invalid handleoff (@225869)
Warning: Ignore invalid handleoff (@227904)
Warning: Ignore invalid handleoff (@229938)
Warning: Ignore invalid handleoff (@231973)
Warning: Ignore invalid handleoff (@234007)
Warning: Ignore invalid handleoff (@236041)
Warning: Ignore invalid handleoff (@238075)
Warning: Ignore invalid handleoff (@240110)
Warning: Ignore invalid handleoff (@242146)
Warning: Ignore invalid handleoff (@244183)
Warning: Ignore invalid handleoff (@246220)
ERROR: bit_read_RC buffer overflow at 4995.0 + 1 > 4995
Warning: Ignore invalid handleoff (@248254)
Warning: Ignore invalid handleoff (@250288)
Warning: Ignore invalid handleoff (@252322)
Warning: Ignore invalid handleoff (@254356)
Warning: Ignore invalid handleoff (@256394)
Warning: Ignore invalid handleoff (@258430)
Warning: Ignore invalid handleoff (@260465)
Warning: Ignore invalid handleoff (@262500)
Warning: Ignore invalid handleoff (@264535)
Warning: Ignore invalid handleoff (@266570)
Warning: Ignore invalid handleoff (@268605)
Warning: Ignore invalid handleoff (@270642)
Warning: Ignore invalid handleoff (@272679)
Warning: Ignore invalid handleoff (@274714)
Warning: Ignore invalid handleoff (@276749)
Warning: Ignore invalid handleoff (@278787)
Warning: Ignore invalid handleoff (@280822)
Warning: Ignore invalid handleoff (@282857)
Warning: Ignore invalid handleoff (@284892)
Warning: Ignore invalid handleoff (@286928)
Warning: Unstable Class object 559 MATERIAL (0x400) 112842/0
Warning: Unstable Class object 559 MATERIAL (0x400) 112843/0
Warning: Unstable Class object 559 MATERIAL (0x400) 112844/0
Warning: Unstable Class object 561 TABLESTYLE (0xfff) 112863/0
Warning: Ignore invalid handleoff (@288963)
ERROR: Invalid .files x 3709541268
Warning: Skip empty section 0 AcDb:Template
Writing DXF file /Users/weiken/Downloads/test1.dxf
ERROR: Invalid SAB
Warning: Empty REGION.history_id
ERROR: Invalid SAB
Warning: Empty REGION.history_id
ERROR: Invalid SAB
Warning: Empty REGION.history_id
Warning: Unstable Class object 559 MATERIAL (0x400) 112842/74D36
Warning: Unstable Class object 559 MATERIAL (0x400) 112843/74D37
Warning: Unstable Class object 559 MATERIAL (0x400) 112844/74D38
Warning: Unstable Class object 561 TABLESTYLE (0xfff) 112863/74D4B
origin dwg file open with AutoCAD:

converted dxf file open with LibreCAD:

### attachment
[samples.tar.gz](https://github.com/LibreDWG/libredwg/files/11720823/samples.tar.gz)
|
To dxf entities are splitted into different parts
|
https://api.github.com/repos/LibreDWG/libredwg/issues/762/comments
| 1 |
2023-06-12T09:30:59Z
|
2024-02-26T15:52:46Z
|
https://github.com/LibreDWG/libredwg/issues/762
| 1,752,320,774 | 762 |
[
"LibreDWG",
"libredwg"
] |
In postR13 is in the header handle for these default LTYPE values.
But in preR13 it quietly does not find a handle for these types.
```
...
if (vars->LTYPE_BYLAYER)
return vars->LTYPE_BYLAYER;
...
```
in https://github.com/LibreDWG/libredwg/blob/master/src/dwg.c#L2580-L2581
In the case of CONTINUOUS, there is the process of creating this LTYPE before this setting. Then there is the possibility to set vars->LTYPE_CONTINUOUS after creating.
|
Question: What about default LTYPE values like BYLAYER, BYBLOCK, CONTINUOUS in preR13?
|
https://api.github.com/repos/LibreDWG/libredwg/issues/761/comments
| 4 |
2023-06-10T09:12:09Z
|
2023-08-18T07:11:21Z
|
https://github.com/LibreDWG/libredwg/issues/761
| 1,750,886,537 | 761 |
[
"LibreDWG",
"libredwg"
] |
Hello, I was testing some dwg files and found segmentation fault in dwg2dxf.
### environment
macOS big sur 11.5.2 , Apple clang version 12.0.5 (clang-1205.0.22.9),GNU Make 3.81, libredwg latest [commit](https://github.com/LibreDWG/libredwg/commit/c3ccd2227d2af3343b0818f6b888d7873a16df55)
compile with
./autogen.sh && ./configure --disable-bindings && make && sudo make install
### segmentation fault 1
weiken@B-M71PMD6M-1836 libredwg-0.12.5.5745 % dwg2dxf -y -o ~/Downloads/test1.dxf ~/Downloads/test1.dwg
Reading DWG file /Users/weiken/Downloads/test1.dwg
Warning: checksum: 0x26ef124d (calculated) mismatch
Warning: Invalid sections: 0 != numgaps: 0 + numsections: 388
ERROR: Invalid .props x 9581
ERROR: Invalid LWPOLYLINE.num_points 38737
ERROR: bit_read_RC buffer overflow at 4996.0 + 1 > 4996
Warning: Ignore invalid handleoff (@136343)
Warning: Ignore invalid handleoff (@138378)
Warning: Ignore invalid handleoff (@140412)
Warning: Ignore invalid handleoff (@142448)
Warning: Ignore invalid handleoff (@144482)
Warning: Ignore invalid handleoff (@146518)
Warning: Ignore invalid handleoff (@148552)
Warning: Ignore invalid handleoff (@150586)
Warning: Ignore invalid handleoff (@152624)
Warning: Ignore invalid handleoff (@154660)
Warning: Ignore invalid handleoff (@156694)
Warning: Ignore invalid handleoff (@158728)
Warning: Ignore invalid handleoff (@160763)
Warning: Ignore invalid handleoff (@162798)
Warning: Ignore invalid handleoff (@164832)
Warning: Ignore invalid handleoff (@166866)
Warning: Ignore invalid handleoff (@168901)
Warning: Ignore invalid handleoff (@170936)
Warning: Ignore invalid handleoff (@172970)
Warning: Ignore invalid handleoff (@175004)
Warning: Ignore invalid handleoff (@177040)
Warning: Ignore invalid handleoff (@179074)
Warning: Ignore invalid handleoff (@181108)
Warning: Ignore invalid handleoff (@183142)
Warning: Ignore invalid handleoff (@185176)
Warning: Ignore invalid handleoff (@187213)
Warning: Ignore invalid handleoff (@189248)
Warning: Ignore invalid handleoff (@191282)
Warning: Ignore invalid handleoff (@193316)
Warning: Ignore invalid handleoff (@195350)
Warning: Ignore invalid handleoff (@197385)
Warning: Ignore invalid handleoff (@199420)
Warning: Ignore invalid handleoff (@201454)
Warning: Ignore invalid handleoff (@203489)
Warning: Ignore invalid handleoff (@205524)
Warning: Ignore invalid handleoff (@207559)
Warning: Ignore invalid handleoff (@209593)
Warning: Ignore invalid handleoff (@211628)
Warning: Ignore invalid handleoff (@213663)
Warning: Ignore invalid handleoff (@215697)
Warning: Ignore invalid handleoff (@217731)
Warning: Ignore invalid handleoff (@219766)
ERROR: bit_read_RC buffer overflow at 4995.0 + 1 > 4995
Warning: Ignore invalid handleoff (@221800)
Warning: Ignore invalid handleoff (@223835)
Warning: Ignore invalid handleoff (@225869)
Warning: Ignore invalid handleoff (@227904)
Warning: Ignore invalid handleoff (@229938)
Warning: Ignore invalid handleoff (@231973)
Warning: Ignore invalid handleoff (@234007)
Warning: Ignore invalid handleoff (@236041)
Warning: Ignore invalid handleoff (@238075)
Warning: Ignore invalid handleoff (@240110)
Warning: Ignore invalid handleoff (@242146)
Warning: Ignore invalid handleoff (@244183)
Warning: Ignore invalid handleoff (@246220)
ERROR: bit_read_RC buffer overflow at 4995.0 + 1 > 4995
Warning: Ignore invalid handleoff (@248254)
Warning: Ignore invalid handleoff (@250288)
Warning: Ignore invalid handleoff (@252322)
Warning: Ignore invalid handleoff (@254356)
Warning: Ignore invalid handleoff (@256394)
Warning: Ignore invalid handleoff (@258430)
Warning: Ignore invalid handleoff (@260465)
Warning: Ignore invalid handleoff (@262500)
Warning: Ignore invalid handleoff (@264535)
Warning: Ignore invalid handleoff (@266570)
Warning: Ignore invalid handleoff (@268605)
Warning: Ignore invalid handleoff (@270642)
Warning: Ignore invalid handleoff (@272679)
Warning: Ignore invalid handleoff (@274714)
Warning: Ignore invalid handleoff (@276749)
Warning: Ignore invalid handleoff (@278787)
Warning: Ignore invalid handleoff (@280822)
Warning: Ignore invalid handleoff (@282857)
Warning: Ignore invalid handleoff (@284892)
Warning: Ignore invalid handleoff (@286928)
Warning: Unstable Class object 559 MATERIAL (0x400) 112842/0
Warning: Unstable Class object 559 MATERIAL (0x400) 112843/0
Warning: Unstable Class object 559 MATERIAL (0x400) 112844/0
Warning: Unstable Class object 561 TABLESTYLE (0xfff) 112863/0
Warning: Ignore invalid handleoff (@288963)
ERROR: Invalid .files x 3709541268
Warning: Skip empty section 0 AcDb:Template
Writing DXF file /Users/weiken/Downloads/test1.dxf
ERROR: Invalid SAB
Warning: Empty REGION.history_id
ERROR: Invalid SAB
Warning: Empty REGION.history_id
ERROR: Invalid SAB
Warning: Empty REGION.history_id
zsh: segmentation fault dwg2dxf -y -o ~/Downloads/test1.dxf ~/Downloads/test1.dwg
### segmentation fault 2
weiken@B-M71PMD6M-1836 libredwg-0.12.5.5745 % dwg2dxf -y -o ~/Downloads/test2.dxf ~/Downloads/test2.dwg
Reading DWG file /Users/weiken/Downloads/test2.dwg
Warning: checksum: 0x2614123c (calculated) mismatch
Warning: Invalid sections: 0 != numgaps: 0 + numsections: 98
ERROR: Skip section AcDb:RevHistory with size 12 > 0 * 29696
ERROR: Invalid DICTIONARY.numitems 22660
ERROR: Failed to read uncompressed AppInfo section
ERROR: Invalid .files x 1381774384
Warning: Object handle not found, 22891/0x596B in 31557 objects
Warning: Object handle not found, 22892/0x596C in 31557 objects
Warning: Object handle not found, 23342/0x5B2E in 31557 objects
Warning: Object handle not found, 23343/0x5B2F in 31557 objects
Warning: Object handle not found, 23355/0x5B3B in 31557 objects
Warning: Object handle not found, 23356/0x5B3C in 31557 objects
Warning: Object handle not found, 23368/0x5B48 in 31557 objects
Warning: Object handle not found, 23369/0x5B49 in 31557 objects
Warning: Object handle not found, 23381/0x5B55 in 31557 objects
Warning: Object handle not found, 23382/0x5B56 in 31557 objects
Warning: Object handle not found, 25434/0x635A in 31557 objects
Warning: Object handle not found, 25435/0x635B in 31557 objects
Warning: Object handle not found, 25684/0x6454 in 31557 objects
Warning: Object handle not found, 25685/0x6455 in 31557 objects
Warning: Object handle not found, 25697/0x6461 in 31557 objects
Warning: Object handle not found, 25698/0x6462 in 31557 objects
Warning: Object handle not found, 25710/0x646E in 31557 objects
Warning: Object handle not found, 25711/0x646F in 31557 objects
Warning: Object handle not found, 25723/0x647B in 31557 objects
Warning: Object handle not found, 25724/0x647C in 31557 objects
Warning: Object handle not found, 25736/0x6488 in 31557 objects
Warning: Object handle not found, 25737/0x6489 in 31557 objects
Warning: Object handle not found, 25749/0x6495 in 31557 objects
Warning: Object handle not found, 25750/0x6496 in 31557 objects
Warning: Object handle not found, 25762/0x64A2 in 31557 objects
Warning: Object handle not found, 25763/0x64A3 in 31557 objects
Warning: Object handle not found, 25775/0x64AF in 31557 objects
Warning: Object handle not found, 25776/0x64B0 in 31557 objects
Warning: Object handle not found, 25788/0x64BC in 31557 objects
Warning: Object handle not found, 25789/0x64BD in 31557 objects
Warning: Object handle not found, 25900/0x652C in 31557 objects
Warning: Object handle not found, 25901/0x652D in 31557 objects
Warning: Object handle not found, 25913/0x6539 in 31557 objects
Warning: Object handle not found, 25914/0x653A in 31557 objects
Warning: Object handle not found, 25926/0x6546 in 31557 objects
Warning: Object handle not found, 25927/0x6547 in 31557 objects
Warning: Object handle not found, 25939/0x6553 in 31557 objects
Warning: Object handle not found, 25940/0x6554 in 31557 objects
Warning: Object handle not found, 25952/0x6560 in 31557 objects
Warning: Object handle not found, 25953/0x6561 in 31557 objects
Warning: Object handle not found, 25965/0x656D in 31557 objects
Warning: Object handle not found, 25966/0x656E in 31557 objects
Warning: Object handle not found, 25978/0x657A in 31557 objects
Warning: Object handle not found, 25979/0x657B in 31557 objects
Warning: Object handle not found, 25991/0x6587 in 31557 objects
Warning: Object handle not found, 25992/0x6588 in 31557 objects
Warning: Object handle not found, 26004/0x6594 in 31557 objects
Warning: Object handle not found, 26005/0x6595 in 31557 objects
Warning: Object handle not found, 26055/0x65C7 in 31557 objects
Warning: Object handle not found, 26056/0x65C8 in 31557 objects
Warning: Object handle not found, 26068/0x65D4 in 31557 objects
Warning: Object handle not found, 26069/0x65D5 in 31557 objects
Warning: Object handle not found, 26081/0x65E1 in 31557 objects
Warning: Object handle not found, 26082/0x65E2 in 31557 objects
Warning: Object handle not found, 26094/0x65EE in 31557 objects
Warning: Object handle not found, 26095/0x65EF in 31557 objects
Warning: Object handle not found, 26107/0x65FB in 31557 objects
Warning: Object handle not found, 26108/0x65FC in 31557 objects
Warning: Object handle not found, 26120/0x6608 in 31557 objects
Warning: Object handle not found, 26121/0x6609 in 31557 objects
Warning: Object handle not found, 26157/0x662D in 31557 objects
Warning: Object handle not found, 26158/0x662E in 31557 objects
Warning: Object handle not found, 26170/0x663A in 31557 objects
Warning: Object handle not found, 26171/0x663B in 31557 objects
Warning: Object handle not found, 26183/0x6647 in 31557 objects
Warning: Object handle not found, 26184/0x6648 in 31557 objects
Warning: Object handle not found, 26196/0x6654 in 31557 objects
Warning: Object handle not found, 26197/0x6655 in 31557 objects
Warning: Object handle not found, 26209/0x6661 in 31557 objects
Warning: Object handle not found, 26210/0x6662 in 31557 objects
Warning: Object handle not found, 26222/0x666E in 31557 objects
Warning: Object handle not found, 26223/0x666F in 31557 objects
Warning: Object handle not found, 26235/0x667B in 31557 objects
Warning: Object handle not found, 26236/0x667C in 31557 objects
Warning: Object handle not found, 26248/0x6688 in 31557 objects
Warning: Object handle not found, 26249/0x6689 in 31557 objects
Warning: Object handle not found, 26341/0x66E5 in 31557 objects
Warning: Object handle not found, 26342/0x66E6 in 31557 objects
Warning: Object handle not found, 26354/0x66F2 in 31557 objects
Warning: Object handle not found, 26355/0x66F3 in 31557 objects
Warning: Object handle not found, 26367/0x66FF in 31557 objects
Warning: Object handle not found, 26368/0x6700 in 31557 objects
Warning: Object handle not found, 26380/0x670C in 31557 objects
Warning: Object handle not found, 26381/0x670D in 31557 objects
Warning: Object handle not found, 26393/0x6719 in 31557 objects
Warning: Object handle not found, 26394/0x671A in 31557 objects
Warning: Object handle not found, 26406/0x6726 in 31557 objects
Warning: Object handle not found, 26407/0x6727 in 31557 objects
Warning: Object handle not found, 26419/0x6733 in 31557 objects
Warning: Object handle not found, 26420/0x6734 in 31557 objects
Warning: Object handle not found, 26432/0x6740 in 31557 objects
Warning: Object handle not found, 26433/0x6741 in 31557 objects
Warning: Object handle not found, 26445/0x674D in 31557 objects
Warning: Object handle not found, 26446/0x674E in 31557 objects
Warning: Object handle not found, 26490/0x677A in 31557 objects
Warning: Object handle not found, 26491/0x677B in 31557 objects
Warning: Object handle not found, 26503/0x6787 in 31557 objects
Warning: Object handle not found, 26504/0x6788 in 31557 objects
Warning: Object handle not found, 26516/0x6794 in 31557 objects
Warning: Object handle not found, 26517/0x6795 in 31557 objects
Warning: Object handle not found, 26529/0x67A1 in 31557 objects
Warning: Object handle not found, 26530/0x67A2 in 31557 objects
Warning: Object handle not found, 26542/0x67AE in 31557 objects
Warning: Object handle not found, 26543/0x67AF in 31557 objects
Warning: Object handle not found, 26555/0x67BB in 31557 objects
Warning: Object handle not found, 26556/0x67BC in 31557 objects
Warning: Object handle not found, 26568/0x67C8 in 31557 objects
Warning: Object handle not found, 26569/0x67C9 in 31557 objects
Warning: Object handle not found, 26581/0x67D5 in 31557 objects
Warning: Object handle not found, 26582/0x67D6 in 31557 objects
Warning: Object handle not found, 26618/0x67FA in 31557 objects
Warning: Object handle not found, 26619/0x67FB in 31557 objects
Warning: Object handle not found, 26631/0x6807 in 31557 objects
Warning: Object handle not found, 26632/0x6808 in 31557 objects
Warning: Object handle not found, 26644/0x6814 in 31557 objects
Warning: Object handle not found, 26645/0x6815 in 31557 objects
Warning: Object handle not found, 26657/0x6821 in 31557 objects
Warning: Object handle not found, 26658/0x6822 in 31557 objects
Warning: Object handle not found, 26670/0x682E in 31557 objects
Warning: Object handle not found, 26671/0x682F in 31557 objects
Warning: Object handle not found, 26683/0x683B in 31557 objects
Warning: Object handle not found, 26684/0x683C in 31557 objects
Warning: Object handle not found, 26732/0x686C in 31557 objects
Warning: Object handle not found, 26733/0x686D in 31557 objects
Warning: Object handle not found, 26745/0x6879 in 31557 objects
Warning: Object handle not found, 26746/0x687A in 31557 objects
Warning: Object handle not found, 26758/0x6886 in 31557 objects
Warning: Object handle not found, 26759/0x6887 in 31557 objects
Warning: Object handle not found, 26771/0x6893 in 31557 objects
Warning: Object handle not found, 26772/0x6894 in 31557 objects
Warning: Object handle not found, 26784/0x68A0 in 31557 objects
Warning: Object handle not found, 26785/0x68A1 in 31557 objects
Warning: Object handle not found, 26797/0x68AD in 31557 objects
Warning: Object handle not found, 26798/0x68AE in 31557 objects
Warning: Object handle not found, 26810/0x68BA in 31557 objects
Warning: Object handle not found, 26811/0x68BB in 31557 objects
Warning: Object handle not found, 26823/0x68C7 in 31557 objects
Warning: Object handle not found, 26824/0x68C8 in 31557 objects
Warning: Object handle not found, 26836/0x68D4 in 31557 objects
Warning: Object handle not found, 26837/0x68D5 in 31557 objects
Writing DXF file /Users/weiken/Downloads/test2.dxf
zsh: segmentation fault dwg2dxf -y -o ~/Downloads/test2.dxf ~/Downloads/test2.dwg
### segmentation fault 3
weiken@B-M71PMD6M-1836 libredwg-0.12.5.5745 % dwg2dxf -y -o ~/Downloads/test3.dxf ~/Downloads/test3.dwg
Reading DWG file /Users/weiken/Downloads/test3.dwg
Warning: checksum: 0x2fb1131d (calculated) mismatch
Warning: Invalid sections: 0 != numgaps: 0 + numsections: 438
ERROR: Invalid .props x 9583
ERROR: Invalid DICTIONARY.numitems 35189
Warning: Unknown Class object 587 TCH_PSCONFIG (0x1is_zombie)
Warning: Unstable Class object 596 MATERIAL (0x400) 65876/0
Warning: Unstable Class object 596 MATERIAL (0x400) 65877/0
Warning: Unstable Class object 596 MATERIAL (0x400) 65878/0
Warning: Unstable Class object 586 TABLESTYLE (0xfffis_zombie) 65897/0
Warning: Ignore invalid handleoff (@252349)
Warning: Ignore invalid handleoff (@254383)
ERROR: Invalid .files x 3709541268
Warning: Skip empty section 0 AcDb:Template
Writing DXF file /Users/weiken/Downloads/test3.dxf
zsh: segmentation fault dwg2dxf -y -o ~/Downloads/test3.dxf ~/Downloads/test3.dwg
### attachment
[samples.tar.gz](https://github.com/LibreDWG/libredwg/files/11684962/samples.tar.gz)
|
segmentation fault in dwg2dxf
|
https://api.github.com/repos/LibreDWG/libredwg/issues/759/comments
| 1 |
2023-06-08T07:02:21Z
|
2023-06-08T13:54:05Z
|
https://github.com/LibreDWG/libredwg/issues/759
| 1,747,214,645 | 759 |
[
"LibreDWG",
"libredwg"
] |
I am going to improve flags_r11 setting.
I created PR https://github.com/LibreDWG/libredwg/pull/757 which:
* Describe these numbers precisely
* Added flags_r11 from the structure if is defined
One thing is TODO, which I am not able to set now:
* Add ```dwg->header.section[id].flags_r11 = __FROM_CONTROL__``` in https://github.com/LibreDWG/libredwg/blob/master/src/in_json.c#L3264 It helps conversions from JSON to DWG and better ability to test conversion from DWG to JSON and back.
|
Improve flags_r11 setting in preR13 encoding
|
https://api.github.com/repos/LibreDWG/libredwg/issues/758/comments
| 2 |
2023-06-07T23:52:00Z
|
2023-08-26T12:32:27Z
|
https://github.com/LibreDWG/libredwg/issues/758
| 1,746,837,833 | 758 |
[
"LibreDWG",
"libredwg"
] |
Example:
[BLANK.DWG.gz](https://github.com/LibreDWG/libredwg/files/11677294/BLANK.DWG.gz)
Convert to JSON:
```dwgread -o BLANK.json BLANK.DWG```
In JSON is:
```
...
"MENU": "acad\u0000e\u0000g\offic\u0000",
...
```
Conversion back:
```dwgwrite BLANK.json```
returns:
```
ERROR: Invalid json. jsmn error at pos: 1608 (... "MENU": "acad\u000 ...)
ERROR 0x800
```
Probably missing escape for ```\```
|
Wrong conversion to JSON for MENU header variable
|
https://api.github.com/repos/LibreDWG/libredwg/issues/756/comments
| 9 |
2023-06-07T13:14:15Z
|
2023-06-08T15:50:08Z
|
https://github.com/LibreDWG/libredwg/issues/756
| 1,745,876,211 | 756 |
[
"LibreDWG",
"libredwg"
] |
and values
set elevation_r11 from z
set proper flags and flag_r11, opts_r11 are mostly ok.
|
wrong polyline/vertex r11 add flags
|
https://api.github.com/repos/LibreDWG/libredwg/issues/754/comments
| 0 |
2023-06-05T07:33:02Z
|
2023-06-08T13:54:38Z
|
https://github.com/LibreDWG/libredwg/issues/754
| 1,741,160,050 | 754 |
[
"LibreDWG",
"libredwg"
] |
Example of 3d point:
```
HEADER.INSBASE=(1.0 2.0 3.0)
```
There are another situations like:
```
PLIMMIN: (0.000000, 0.000000) [2RD 10]
PLIMMAX: (12.000000, 9.000000) [2RD 10]
```
where it's 2d point
|
Add support for dwgadd HEADER setting for point or multiple float values in variable
|
https://api.github.com/repos/LibreDWG/libredwg/issues/750/comments
| 2 |
2023-06-02T12:04:52Z
|
2023-06-03T05:36:38Z
|
https://github.com/LibreDWG/libredwg/issues/750
| 1,738,080,826 | 750 |
[
"LibreDWG",
"libredwg"
] |
In doc is construct like:
```
line (0 0 0) (100 0 100)
line.layer = "1"
```
But output is:
```
ERROR: dwg_dynapi_entity_set_value: Invalid LINE field layer
```
in ```dwgadd -v9 --as r11 -o line.dwg foo.dwgadd```
|
dwgadd: set table by name
|
https://api.github.com/repos/LibreDWG/libredwg/issues/749/comments
| 5 |
2023-06-02T09:53:50Z
|
2023-07-17T10:49:10Z
|
https://github.com/LibreDWG/libredwg/issues/749
| 1,737,863,496 | 749 |
[
"LibreDWG",
"libredwg"
] |
I have example:
```
#include <dwg.h>
#include <dwg_api.h>
#include <string.h>
#include <stdio.h>
#define DWG_LOGLEVEL DWG_LOGLEVEL_ALL
/* Main. */
int
main(int argc, char **argv) {
Dwg_Data *dwg = NULL;
int opts = 9;
static int tracelevel = 9;
char *filename = "out.dwg";
int ret;
char text[120] = "foo";
memset(&dwg, 0, sizeof(dwg));
dwg = dwg_new_Document(
R_2000,
0, /* metric/iso */
tracelevel
);
dwg->opts = opts;
dwg_dynapi_header_set_value (dwg, "MENU", text, 1);
ret = dwg_write_file(filename, dwg);
if (ret) {
printf("Write status: %d\n", ret);
return 1;
}
/* Free memory. */
dwg_free(dwg);
return 0;
}
```
Compile: ```gcc -std=c99 -Wall `pkg-config --cflags libredwg` -o foo foo.c `pkg-config --libs libredwg```
Gets Segmentation fault
|
Issue in setting MENU header variable
|
https://api.github.com/repos/LibreDWG/libredwg/issues/747/comments
| 4 |
2023-06-02T09:39:51Z
|
2023-06-02T12:18:08Z
|
https://github.com/LibreDWG/libredwg/issues/747
| 1,737,837,616 | 747 |
[
"LibreDWG",
"libredwg"
] |
blocks might be in between normal entities, see dwgadd.example_r11
instead pass an enum arg for entities, blocks or extras, and decide there then, what to emit.
|
refactor encode_preR13_entities
|
https://api.github.com/repos/LibreDWG/libredwg/issues/746/comments
| 0 |
2023-06-01T08:42:05Z
|
2023-06-02T08:24:17Z
|
https://github.com/LibreDWG/libredwg/issues/746
| 1,735,789,572 | 746 |
[
"LibreDWG",
"libredwg"
] |
Example:
[FOO.DWG.gz](https://github.com/LibreDWG/libredwg/files/11618479/FOO.DWG.gz)
```dwgread -o FOO.json FOO.DWG```
There is bad output:
```
...
{
"object": "VIEW",
"index": 26,
"type": 61,
"handle": [0, 0, 26],
"size": 91,
"flag": 0,
"name": "WIDE\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
"VIEWSIZE": 1.10429447852761,
"VIEWCTR": [ 3.18915918684925, 6.99386503067485 ],
"view_width": 6.62682428436208,
"VIEWDIR": [ 0.0, 0.0, 1.0 ],
"flag_3d": 0
}
...
```
Interesting is, that it's one of name fields in DWG file.
As I understand, this is regression from last month
|
Regression: Conversions from DWG to JSON in case of FIELD_TFv
|
https://api.github.com/repos/LibreDWG/libredwg/issues/745/comments
| 5 |
2023-05-31T20:07:33Z
|
2023-06-02T12:28:11Z
|
https://github.com/LibreDWG/libredwg/issues/745
| 1,734,935,152 | 745 |
[
"LibreDWG",
"libredwg"
] |
When I have input "HEADER.VIEWSIZE = 1.2345"
Actual code
```
...
else if (2 == SSCANF_S (p, "HEADER." FMT_NAME " = %d\n", s1 SZ, &i1))
dwg_dynapi_header_set_value (dwg, s1, &i1, 0);
else if (2 == SSCANF_S (p, "HEADER." FMT_NAME " = %lf\n", s1 SZ, &f1))
dwg_dynapi_header_set_value (dwg, s1, &f1, 0);
...
```
couldn't detect float.
The code matches the first rule, the value of VIEWSIZE will be 1, and dwg_dynapi_header_set_value() set nothing.
|
Wrong dwgadd parsing of float/int in HEADER variables
|
https://api.github.com/repos/LibreDWG/libredwg/issues/741/comments
| 5 |
2023-05-25T12:12:09Z
|
2023-06-01T08:40:55Z
|
https://github.com/LibreDWG/libredwg/issues/741
| 1,725,701,619 | 741 |
[
"LibreDWG",
"libredwg"
] |
32bit writes wrong handle, and then fails on --verify
also on linux, not just mingw32
|
32bit dwgadd CMLSTYLE: (5.8.950C49F00000018) abs:671252531657048088 [H 2] @390.4
|
https://api.github.com/repos/LibreDWG/libredwg/issues/731/comments
| 1 |
2023-05-19T20:24:58Z
|
2023-05-30T07:01:22Z
|
https://github.com/LibreDWG/libredwg/issues/731
| 1,717,781,648 | 731 |
[
"LibreDWG",
"libredwg"
] |
src file: [huafei.zip](https://github.com/LibreDWG/libredwg/files/11514535/huafei.zip)
code:
auto dwg_ = new Dwg_Data;
int success;
dwg_->num_objects = 0;
success = dwg_read_file(file_path_.string().c_str(), dwg_);
return val:
success = 68
dwg_errstrings shows: UNHANDLEDCLASS VALUEOUTOFBOUNDS
version: latest master
|
error code 68
|
https://api.github.com/repos/LibreDWG/libredwg/issues/729/comments
| 6 |
2023-05-19T07:29:46Z
|
2023-06-02T08:29:23Z
|
https://github.com/LibreDWG/libredwg/issues/729
| 1,716,780,050 | 729 |
[
"LibreDWG",
"libredwg"
] |
Input is:
[test.json.gz](https://github.com/LibreDWG/libredwg/files/11471899/test.json.gz)
The command is ```dwgwrite test.json```
In a result are some entities in the extra entities section, which are not in the original JSON/DWG file.
|
Wrong encoding of POLYLINE in preR13 from JSON to DWG
|
https://api.github.com/repos/LibreDWG/libredwg/issues/728/comments
| 1 |
2023-05-14T12:17:37Z
|
2023-06-02T12:33:15Z
|
https://github.com/LibreDWG/libredwg/issues/728
| 1,708,924,403 | 728 |
[
"LibreDWG",
"libredwg"
] |
I have dwgadd code:
```
HEADER.codepage=28
point (0.0 0.0 0.0)
```
```dwgadd -v9 --as r11 -o out.dwg code.dwgadd```
generates DWG file with:
```
...
codepage: 30 [RS 0]
...
```
I think that code in src/header_variables_r11.spec:
```
...
ENCODER {
FIELD_VALUE (codepage) = dwg->header.codepage;
}
FIELD_RS (codepage, 0);
DECODER {
dwg->header.codepage = FIELD_VALUE (codepage);
}
...
```
is bad
|
Wrong setting of header codepage in dwgadd in preR13
|
https://api.github.com/repos/LibreDWG/libredwg/issues/727/comments
| 3 |
2023-05-14T11:30:55Z
|
2023-08-15T14:57:24Z
|
https://github.com/LibreDWG/libredwg/issues/727
| 1,708,910,857 | 727 |
[
"LibreDWG",
"libredwg"
] |
In https://github.com/LibreDWG/libredwg/issues/713 we discussed that PR is ugly and we need common POLYLINE and VERTEX entities.
|
Add common preR13 POLYLINE and VERTEX entities
|
https://api.github.com/repos/LibreDWG/libredwg/issues/722/comments
| 12 |
2023-05-10T19:33:24Z
|
2023-06-05T11:07:56Z
|
https://github.com/LibreDWG/libredwg/issues/722
| 1,704,518,232 | 722 |
[
"LibreDWG",
"libredwg"
] |
move the duplicate table fields from the code to dwg_encode_`<tablerecord>`, as with decode.
see the prev. VPORT problem e57255da5160cf7f4b418db704332eb1a702ccef of table mismatches between the code and the spec.
|
encode_preR13_section with spec tables
|
https://api.github.com/repos/LibreDWG/libredwg/issues/720/comments
| 1 |
2023-05-07T08:35:24Z
|
2023-05-08T09:16:55Z
|
https://github.com/LibreDWG/libredwg/issues/720
| 1,698,958,414 | 720 |
[
"LibreDWG",
"libredwg"
] |
when I run these [code](https://github.com/as010101/as010101.github.io/blob/master/img/dwg2svg.cpp)
```
/// part of code
int main(int argc, int ** argv) {
int error = 0;
Dwg_Data dwg;
memset(&dwg, 0, sizeof(Dwg_Data));
g_dwg.opts = 3;
// (iconv_t cd, const char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
//libiconv(nullptr, nullptr, nullptr, nullptr, nullptr );
error = dwg_read_file("sample_2000.dwg", &dwg);
if (!error) {
output_SVG(&dwg);} // a function in dwg2svg.c
return 0;
}
```
I get error output on terminal. [dwg source file and the svg result file](https://github.com/as010101/as010101.github.io/blob/master/img/test1.zip), the svg file is very different with dwg file.
Is there any problem with the use of `output_SVG` , How can I get the correct svg file?
**update 20230505**
output_SVG cant get correct result
[example_2018 dwg + dxf](https://github.com/as010101/as010101.github.io/blob/master/img/example_2018.rar)
|
output_SVG function can't get the correct result
|
https://api.github.com/repos/LibreDWG/libredwg/issues/718/comments
| 10 |
2023-05-04T08:44:30Z
|
2023-06-11T17:39:54Z
|
https://github.com/LibreDWG/libredwg/issues/718
| 1,695,547,546 | 718 |
[
"LibreDWG",
"libredwg"
] |
Very similar to #521, except that installing python3.10-dev doesn't help - it's already installed. I tried ./configure LIBS="-L/usr/non-standard-path/python/lib" with every possible path to python 3.10 or 3.8 and every library in /usr/lib/python3.x, and /usr/local/lib/python3.x, and /usr/include/pythonx3.x.
```
configure: error:
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LIBS environment variable.
Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
============================================================================
ERROR!
You probably have to install the development version of the Python package
for your distribution. The exact name of this package varies among them.
============================================================================
```
config.log doesn't seem to throw an error, per se, but it also seems to think python is in /usr/local/include/python2.7, irrespective of which version I specify in -L and even though the current version is 3.10.
This is Ubuntu 22.04
|
Failed to install with python3.10: Could not link test program to Python
|
https://api.github.com/repos/LibreDWG/libredwg/issues/717/comments
| 2 |
2023-04-30T00:09:58Z
|
2023-05-02T22:20:03Z
|
https://github.com/LibreDWG/libredwg/issues/717
| 1,689,725,758 | 717 |
[
"LibreDWG",
"libredwg"
] |
I have dwgadd code:
```
layer "foo"
layer.color=7
```
Command ```dwgadd -v9 --as r11 -o foo.dwg ex2.dwgadd``` exits with ```Segmentation fault```
It's same for all versions which I tested.
|
Segfault in dwgadd with layer.color=7
|
https://api.github.com/repos/LibreDWG/libredwg/issues/716/comments
| 6 |
2023-04-27T11:12:20Z
|
2023-05-02T06:21:12Z
|
https://github.com/LibreDWG/libredwg/issues/716
| 1,686,632,921 | 716 |
[
"LibreDWG",
"libredwg"
] |
There is an infinite loop in the dwgread on file which I generated by the libredwg.
File:
[test.dwg.gz](https://github.com/LibreDWG/libredwg/files/11341524/test.dwg.gz)
|
dwgread infinite loop in DWG file generated by libredwg
|
https://api.github.com/repos/LibreDWG/libredwg/issues/715/comments
| 4 |
2023-04-27T08:53:10Z
|
2023-05-04T07:39:49Z
|
https://github.com/LibreDWG/libredwg/issues/715
| 1,686,417,551 | 715 |
[
"LibreDWG",
"libredwg"
] |
The actual situation with parsing of POLYLINE and VERTEX entities in preR13 is this:
* In preR13 is one entity for all POLYLINE and VERTEX types. This means, that the DWG file contains a flag for the (un)presence of variables in the entity and an optional flag (default without this flag is POLYLINE_2D, VERTEX_2D) which means which entity type is present (3D, MESH, PFACE)
* We have naive parsing (polyline - https://github.com/LibreDWG/libredwg/blob/master/src/decode.c#L6614, vertex - https://github.com/LibreDWG/libredwg/blob/master/src/decode.c#L6630) based on entity variables which is not valid for detection.
* There are issues like the entity is presented as POLYLINE_3D, but it's POLYLINE_MESH. Same with VERTEX.
I created [PR](https://github.com/LibreDWG/libredwg/pull/711) for a fix of the polyline, but the issue is with the naivety of parsing.
What about this?
Possibilities:
* Add better detection in the actual block - this means adding parsing of entity flag, which is after elevation, handle, and other common entity things, and will create detection based on this flag.
* Add code for common parsing of preR13 POLYLINE and VERTEX entities - different that POLYLINE_3D (and others) in dwg.spec. And we do some convert to concrete entities.
Example of failing POLYLINE MESH:
[PFACE.DXF.gz](https://github.com/LibreDWG/libredwg/files/11341290/PFACE.DXF.gz)
[PFACE.DWG.gz](https://github.com/LibreDWG/libredwg/files/11341291/PFACE.DWG.gz)
There are other failing situations.
|
Wrong POLYLINE and VERTEX parsing in preR13
|
https://api.github.com/repos/LibreDWG/libredwg/issues/713/comments
| 7 |
2023-04-27T08:32:06Z
|
2023-05-08T09:17:14Z
|
https://github.com/LibreDWG/libredwg/issues/713
| 1,686,381,600 | 713 |
[
"LibreDWG",
"libredwg"
] |
This commit https://github.com/LibreDWG/libredwg/commit/b0af2cc31fb7a1b4099a804e1729344befc77f14 is wrong.
We need to parse sentinels each time.
Example:
[BLANK.DWG.gz](https://github.com/LibreDWG/libredwg/files/11312586/BLANK.DWG.gz)
Bad output:
```
...
entities: (0x6cf-0x6cf (0), size 0)
==========================================
DWG_SENTINEL_R11_ENTITIES_BEGIN: C46E6854F86E3330633EC1852ADC9401
DWG_SENTINEL_R11_ENTITIES_END: 3B9197AB0791CCCF9CC13E7AD5236BFE
==========================================
entities: end
contents table BLOCK [ 1]: size:45 num:0 (0x6ef-0x6ef)
contents table LAYER [ 2]: size:41 num:1 (0x70f-0x738)
Warning:
@0x6df => start 0x6ff
unknown (32): DBEFB3F0C73E6DA6C9B6245C4C6F32CB24104C0F38C192593649DBA3B390CD34
DWG_SENTINEL_R11_LAYERS_BEGIN: 0EC4646FBB1DD38B0049C2EF18EA6FFB
...
```
In unknown (32) are begin and end sentinels of BLOCK table.
|
Wrong parsing of R11 tables without items in them
|
https://api.github.com/repos/LibreDWG/libredwg/issues/709/comments
| 2 |
2023-04-24T16:27:14Z
|
2023-04-25T14:02:09Z
|
https://github.com/LibreDWG/libredwg/issues/709
| 1,681,643,752 | 709 |
[
"LibreDWG",
"libredwg"
] |
[bit_read_fixed.zip](https://github.com/LibreDWG/libredwg/files/11304306/bit_read_fixed.zip)
```
user@debian:~/libredwg$ valgrind ./dwgread bit_read_fixed.dwg
==10557== Memcheck, a memory error detector
==10557== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==10557== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==10557== Command: ./dwgread bit_read_fixed.dwg
==10557==
==10557== Invalid read of size 4
==10557== at 0x403B56D: memcpy (vg_replace_strmem.c:1034)
==10557== by 0x426F92B: bit_read_fixed (bits.c:1585)
==10557== by 0x426F9FA: bit_read_TF (bits.c:1614)
==10557== by 0x42CDE7E: decode_preR13_sentinel (decode.c:6223)
==10557== by 0x4384061: decode_preR13_section (decode_r11.c:0)
==10557== by 0x43809C8: decode_preR13 (decode_r11.c:752)
==10557== by 0x427BB22: dwg_decode (decode.c:217)
==10557== by 0x439018F: dwg_read_file (dwg.c:261)
==10557== by 0x804ACDA: main (dwgread.c:0)
==10557== Address 0x54d92a8 is 16 bytes before a block of size 4,849 alloc'd
==10557== at 0x4038A16: calloc (vg_replace_malloc.c:760)
==10557== by 0x438FAEB: dat_read_file (dwg.c:95)
==10557== by 0x4390093: dwg_read_file (dwg.c:254)
==10557== by 0x804ACDA: main (dwgread.c:0)
==10557==
==10557== Invalid read of size 4
==10557== at 0x403B57B: memcpy (vg_replace_strmem.c:1034)
==10557== by 0x426F92B: bit_read_fixed (bits.c:1585)
==10557== by 0x426F9FA: bit_read_TF (bits.c:1614)
==10557== by 0x42CDE7E: decode_preR13_sentinel (decode.c:6223)
==10557== by 0x4384061: decode_preR13_section (decode_r11.c:0)
==10557== by 0x43809C8: decode_preR13 (decode_r11.c:752)
==10557== by 0x427BB22: dwg_decode (decode.c:217)
==10557== by 0x439018F: dwg_read_file (dwg.c:261)
==10557== by 0x804ACDA: main (dwgread.c:0)
==10557== Address 0x54d92ac is 12 bytes before a block of size 4,849 alloc'd
==10557== at 0x4038A16: calloc (vg_replace_malloc.c:760)
==10557== by 0x438FAEB: dat_read_file (dwg.c:95)
==10557== by 0x4390093: dwg_read_file (dwg.c:254)
==10557== by 0x804ACDA: main (dwgread.c:0)
...
```
|
Invalid read of size 4 memcpy bit_read_fixed
|
https://api.github.com/repos/LibreDWG/libredwg/issues/708/comments
| 2 |
2023-04-23T16:57:54Z
|
2023-04-24T12:33:42Z
|
https://github.com/LibreDWG/libredwg/issues/708
| 1,680,093,898 | 708 |
[
"LibreDWG",
"libredwg"
] |
[dwg_decode_POLYLINE_2D_private.zip](https://github.com/LibreDWG/libredwg/files/11304278/dwg_decode_POLYLINE_2D_private.zip)
```
user@debian:~/libredwg$ valgrind ./dwgread dwg_decode_POLYLINE_2D_private.dwg
==10493== Memcheck, a memory error detector
==10493== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==10493== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==10493== Command: ./dwgread dwg_decode_POLYLINE_2D_private.dwg
==10493==
==10493== Invalid write of size 4
==10493== at 0x42DDB14: dwg_decode_POLYLINE_2D_private (dwg.spec:0)
==10493== by 0x42C09C7: dwg_decode_POLYLINE_2D (dwg.spec:0)
==10493== by 0x42BDC9E: dwg_decode_add_object (decode.c:5252)
==10493== by 0x428015D: read_2004_section_handles (decode.c:2541)
==10493== by 0x428015D: decode_R2004 (decode.c:3426)
==10493== by 0x427BE40: dwg_decode (decode.c:0)
==10493== by 0x439018F: dwg_read_file (dwg.c:261)
==10493== by 0x804ACDA: main (dwgread.c:0)
==10493== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==10493==
==10493==
==10493== Process terminating with default action of signal 11 (SIGSEGV)
==10493== Access not within mapped region at address 0x0
==10493== at 0x42DDB14: dwg_decode_POLYLINE_2D_private (dwg.spec:0)
==10493== by 0x42C09C7: dwg_decode_POLYLINE_2D (dwg.spec:0)
==10493== by 0x42BDC9E: dwg_decode_add_object (decode.c:5252)
==10493== by 0x428015D: read_2004_section_handles (decode.c:2541)
==10493== by 0x428015D: decode_R2004 (decode.c:3426)
==10493== by 0x427BE40: dwg_decode (decode.c:0)
==10493== by 0x439018F: dwg_read_file (dwg.c:261)
==10493== by 0x804ACDA: main (dwgread.c:0)
==10493== If you believe this happened as a result of a stack
==10493== overflow in your program's main thread (unlikely but
==10493== possible), you can try to increase the size of the
==10493== main thread stack using the --main-stacksize= flag.
==10493== The main thread stack size used in this run was 8388608.
==10493==
==10493== HEAP SUMMARY:
==10493== in use at exit: 6,600,247 bytes in 59,109 blocks
==10493== total heap usage: 66,513 allocs, 7,404 frees, 16,519,170 bytes allocated
==10493==
==10493== LEAK SUMMARY:
==10493== definitely lost: 0 bytes in 0 blocks
==10493== indirectly lost: 0 bytes in 0 blocks
==10493== possibly lost: 0 bytes in 0 blocks
==10493== still reachable: 6,600,247 bytes in 59,109 blocks
==10493== suppressed: 0 bytes in 0 blocks
==10493== Rerun with --leak-check=full to see details of leaked memory
==10493==
==10493== For lists of detected and suppressed errors, rerun with: -s
==10493== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault
```
|
Invalid write of size 4 dwg_decode_POLYLINE_2D_private
|
https://api.github.com/repos/LibreDWG/libredwg/issues/707/comments
| 2 |
2023-04-23T16:40:29Z
|
2023-04-24T12:32:50Z
|
https://github.com/LibreDWG/libredwg/issues/707
| 1,680,088,441 | 707 |
[
"LibreDWG",
"libredwg"
] |
[dwg_decode_MINSERT_private.zip](https://github.com/LibreDWG/libredwg/files/11304268/dwg_decode_MINSERT_private.zip)
I think this could be related to #705 as I see some similarity on the call stack.
```
user@debian:~/libredwg$ valgrind ./dwgread dwg_decode_MINSERT_private.dwg
==10452== Memcheck, a memory error detector
==10452== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==10452== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==10452== Command: ./dwgread dwg_decode_MINSERT_private.dwg
==10452==
==10452== Invalid write of size 4
==10452== at 0x42DBDF4: dwg_decode_MINSERT_private (dwg.spec:0)
==10452== by 0x42C0187: dwg_decode_MINSERT (dwg.spec:0)
==10452== by 0x42BDB9F: dwg_decode_add_object (decode.c:5234)
==10452== by 0x428015D: read_2004_section_handles (decode.c:2541)
==10452== by 0x428015D: decode_R2004 (decode.c:3426)
==10452== by 0x427BE40: dwg_decode (decode.c:0)
==10452== by 0x439018F: dwg_read_file (dwg.c:261)
==10452== by 0x804ACDA: main (dwgread.c:0)
==10452== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==10452==
==10452==
==10452== Process terminating with default action of signal 11 (SIGSEGV)
==10452== Access not within mapped region at address 0x0
==10452== at 0x42DBDF4: dwg_decode_MINSERT_private (dwg.spec:0)
==10452== by 0x42C0187: dwg_decode_MINSERT (dwg.spec:0)
==10452== by 0x42BDB9F: dwg_decode_add_object (decode.c:5234)
==10452== by 0x428015D: read_2004_section_handles (decode.c:2541)
==10452== by 0x428015D: decode_R2004 (decode.c:3426)
==10452== by 0x427BE40: dwg_decode (decode.c:0)
==10452== by 0x439018F: dwg_read_file (dwg.c:261)
==10452== by 0x804ACDA: main (dwgread.c:0)
==10452== If you believe this happened as a result of a stack
==10452== overflow in your program's main thread (unlikely but
==10452== possible), you can try to increase the size of the
==10452== main thread stack using the --main-stacksize= flag.
==10452== The main thread stack size used in this run was 8388608.
==10452==
==10452== HEAP SUMMARY:
==10452== in use at exit: 546,478 bytes in 704 blocks
==10452== total heap usage: 1,115 allocs, 411 frees, 658,870 bytes allocated
==10452==
==10452== LEAK SUMMARY:
==10452== definitely lost: 0 bytes in 0 blocks
==10452== indirectly lost: 0 bytes in 0 blocks
==10452== possibly lost: 0 bytes in 0 blocks
==10452== still reachable: 546,478 bytes in 704 blocks
==10452== suppressed: 0 bytes in 0 blocks
==10452== Rerun with --leak-check=full to see details of leaked memory
==10452==
==10452== For lists of detected and suppressed errors, rerun with: -s
==10452== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault
```
|
Invalid write of size 4 dwg_decode_MINSERT_private
|
https://api.github.com/repos/LibreDWG/libredwg/issues/706/comments
| 2 |
2023-04-23T16:37:40Z
|
2023-04-24T12:34:17Z
|
https://github.com/LibreDWG/libredwg/issues/706
| 1,680,087,624 | 706 |
[
"LibreDWG",
"libredwg"
] |
[dwg_decode_INSERT_private.zip](https://github.com/LibreDWG/libredwg/files/11304246/dwg_decode_INSERT_private.zip)
```
user@debian:~/libredwg$ valgrind ./dwgread dwg_decode_INSERT_private.dwg
==10412== Memcheck, a memory error detector
==10412== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==10412== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==10412== Command: ./dwgread dwg_decode_INSERT_private.dwg
==10412==
==10412== Invalid write of size 4
==10412== at 0x42DAD84: dwg_decode_INSERT_private (dwg.spec:0)
==10412== by 0x42C0027: dwg_decode_INSERT (dwg.spec:0)
==10412== by 0x42BDB75: dwg_decode_add_object (decode.c:5231)
==10412== by 0x428015D: read_2004_section_handles (decode.c:2541)
==10412== by 0x428015D: decode_R2004 (decode.c:3426)
==10412== by 0x427BE40: dwg_decode (decode.c:0)
==10412== by 0x439018F: dwg_read_file (dwg.c:261)
==10412== by 0x804ACDA: main (dwgread.c:0)
==10412== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==10412==
==10412==
==10412== Process terminating with default action of signal 11 (SIGSEGV)
==10412== Access not within mapped region at address 0x0
==10412== at 0x42DAD84: dwg_decode_INSERT_private (dwg.spec:0)
==10412== by 0x42C0027: dwg_decode_INSERT (dwg.spec:0)
==10412== by 0x42BDB75: dwg_decode_add_object (decode.c:5231)
==10412== by 0x428015D: read_2004_section_handles (decode.c:2541)
==10412== by 0x428015D: decode_R2004 (decode.c:3426)
==10412== by 0x427BE40: dwg_decode (decode.c:0)
==10412== by 0x439018F: dwg_read_file (dwg.c:261)
==10412== by 0x804ACDA: main (dwgread.c:0)
==10412== If you believe this happened as a result of a stack
==10412== overflow in your program's main thread (unlikely but
==10412== possible), you can try to increase the size of the
==10412== main thread stack using the --main-stacksize= flag.
==10412== The main thread stack size used in this run was 8388608.
==10412==
==10412== HEAP SUMMARY:
==10412== in use at exit: 8,736,970 bytes in 76,745 blocks
==10412== total heap usage: 84,987 allocs, 8,242 frees, 24,663,830 bytes allocated
==10412==
==10412== LEAK SUMMARY:
==10412== definitely lost: 0 bytes in 0 blocks
==10412== indirectly lost: 0 bytes in 0 blocks
==10412== possibly lost: 0 bytes in 0 blocks
==10412== still reachable: 8,736,970 bytes in 76,745 blocks
==10412== suppressed: 0 bytes in 0 blocks
==10412== Rerun with --leak-check=full to see details of leaked memory
==10412==
==10412== For lists of detected and suppressed errors, rerun with: -s
==10412== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault
```
|
Invalid write of size 4 dwg_decode_INSERT_private
|
https://api.github.com/repos/LibreDWG/libredwg/issues/705/comments
| 2 |
2023-04-23T16:29:35Z
|
2023-04-24T12:35:54Z
|
https://github.com/LibreDWG/libredwg/issues/705
| 1,680,085,092 | 705 |
[
"LibreDWG",
"libredwg"
] |
Tested on a 32 bit machine.
[dwg_decode_POLYLINE_3D_private.zip](https://github.com/LibreDWG/libredwg/files/11304235/dwg_decode_POLYLINE_3D_private.zip)
```
user@debian:~/libredwg$ valgrind ./dwgread dwg_decode_POLYLINE_3D_private.dwg
==10391== Memcheck, a memory error detector
==10391== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==10391== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==10391== Command: ./dwgread dwg_decode_POLYLINE_3D_private.dwg
==10391==
==10391== Invalid write of size 4
==10391== at 0x42DE333: dwg_decode_POLYLINE_3D_private (dwg.spec:0)
==10391== by 0x42C0DE7: dwg_decode_POLYLINE_3D (dwg.spec:0)
==10391== by 0x42BDCD1: dwg_decode_add_object (decode.c:5257)
==10391== by 0x428015D: read_2004_section_handles (decode.c:2541)
==10391== by 0x428015D: decode_R2004 (decode.c:3426)
==10391== by 0x427BE40: dwg_decode (decode.c:0)
==10391== by 0x439018F: dwg_read_file (dwg.c:261)
==10391== by 0x804ACDA: main (dwgread.c:0)
==10391== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==10391==
==10391==
==10391== Process terminating with default action of signal 11 (SIGSEGV)
==10391== Access not within mapped region at address 0x0
==10391== at 0x42DE333: dwg_decode_POLYLINE_3D_private (dwg.spec:0)
==10391== by 0x42C0DE7: dwg_decode_POLYLINE_3D (dwg.spec:0)
==10391== by 0x42BDCD1: dwg_decode_add_object (decode.c:5257)
==10391== by 0x428015D: read_2004_section_handles (decode.c:2541)
==10391== by 0x428015D: decode_R2004 (decode.c:3426)
==10391== by 0x427BE40: dwg_decode (decode.c:0)
==10391== by 0x439018F: dwg_read_file (dwg.c:261)
==10391== by 0x804ACDA: main (dwgread.c:0)
==10391== If you believe this happened as a result of a stack
==10391== overflow in your program's main thread (unlikely but
==10391== possible), you can try to increase the size of the
==10391== main thread stack using the --main-stacksize= flag.
==10391== The main thread stack size used in this run was 8388608.
==10391==
==10391== HEAP SUMMARY:
==10391== in use at exit: 614,149 bytes in 2,757 blocks
==10391== total heap usage: 2,832 allocs, 75 frees, 732,560 bytes allocated
==10391==
==10391== LEAK SUMMARY:
==10391== definitely lost: 0 bytes in 0 blocks
==10391== indirectly lost: 0 bytes in 0 blocks
==10391== possibly lost: 0 bytes in 0 blocks
==10391== still reachable: 614,149 bytes in 2,757 blocks
==10391== suppressed: 0 bytes in 0 blocks
==10391== Rerun with --leak-check=full to see details of leaked memory
==10391==
==10391== For lists of detected and suppressed errors, rerun with: -s
==10391== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault
```
|
Invalid write of size 4 dwg_decode_POLYLINE_3D_private
|
https://api.github.com/repos/LibreDWG/libredwg/issues/704/comments
| 2 |
2023-04-23T16:24:43Z
|
2023-04-24T12:36:49Z
|
https://github.com/LibreDWG/libredwg/issues/704
| 1,680,083,499 | 704 |
[
"LibreDWG",
"libredwg"
] |
Tested this on a 32 bits VM.
[dwg_free_BLOCK_CONTROL_private.zip](https://github.com/LibreDWG/libredwg/files/11304223/dwg_free_BLOCK_CONTROL_private.zip)
```
user@debian:~/libredwg$ valgrind ./dwgread dwg_free_BLOCK_CONTROL_private.dwg
==9269== Memcheck, a memory error detector
==9269== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==9269== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==9269== Command: ./dwgread dwg_free_BLOCK_CONTROL_private.dwg
==9269==
==9269== Conditional jump or move depends on uninitialised value(s)
==9269== at 0x44301BA: dwg_free_BLOCK_CONTROL_private (dwg.spec:3473)
==9269== by 0x43E35D4: dwg_free_BLOCK_CONTROL (dwg.spec:3461)
==9269== by 0x444AF3F: free_preR13_object (free.c:803)
==9269== by 0x444AF3F: dwg_free_object (free.c:911)
==9269== by 0x4451A20: dwg_free (free.c:1619)
==9269== by 0x804B140: main (dwgread.c:336)
==9269==
ERROR 0x801
==9269==
==9269== HEAP SUMMARY:
==9269== in use at exit: 0 bytes in 0 blocks
==9269== total heap usage: 47 allocs, 47 frees, 110,885 bytes allocated
==9269==
==9269== All heap blocks were freed -- no leaks are possible
==9269==
==9269== Use --track-origins=yes to see where uninitialised values come from
==9269== For lists of detected and suppressed errors, rerun with: -s
==9269== ERROR SUMMARY: 37 errors from 1 contexts (suppressed: 0 from 0)
```
|
Conditional jump or move depends on uninitialised value dwg_free_BLOCK_CONTROL_private
|
https://api.github.com/repos/LibreDWG/libredwg/issues/703/comments
| 3 |
2023-04-23T16:21:39Z
|
2023-04-26T04:39:26Z
|
https://github.com/LibreDWG/libredwg/issues/703
| 1,680,082,536 | 703 |
[
"LibreDWG",
"libredwg"
] |
Input JSON file:
[test.json.gz](https://github.com/LibreDWG/libredwg/files/11300931/test.json.gz)
command: ```dwgwrite test.json```
Output:
```
...
Entities from 10 to 12 from 0x465
===========================
Entity BLOCK, number: 10, Addr: 1125 (0x465)
type: 12 [RC]
Encode entity BLOCK
flag_r11: 0x0 [RC 0] @2.0
size: 24 [RS] @4.0
layer: 0 [RSd 8]
opts_r11: 0x0 [RSx 0] @8.0
base_pt: (0.000000, 0.000000) [2RD 10] @24.0
===========================
Entity LINE, number: 11, Addr: 1149 (0x47d)
type: 1 [RC]
Encode entity LINE
flag_r11: 0x0 [RC 0] @2.0
size: 40 [RS] @4.0
layer: 0 [RSd 8]
opts_r11: 0x0 [RSx 0] @8.0
start: (0.000000, 0.000000) [2RD 10] @24.0
end: (1.000000, 1.000000) [2RD 11] @40.0
block_entities 0x465 - 0x4a5 (0x40)
@0x14:
entities_start: 0x2e5 [RLx]
entities_end: 0x2e5 [RLx]
blocks_start: 0x465 [RLx]
blocks_size: 0x40 [RLx]
extras_start: 0x0 [RLx]
extras_size: 0x80000000 [RLx]
numentities: 0 [RS]
Wrote 0 bytes
...
```
**There is missing last ENDBLK entity.**
Output file has block entities like:
```
...
blocks entities: (0x465-0x4a5 (0), size 64)
==========================================
Warning:
@0x46c => start 0x465
==========================================
blocks entities: end
...
```
|
Missing ENDBLK from JSON to DWG in r1.x
|
https://api.github.com/repos/LibreDWG/libredwg/issues/702/comments
| 7 |
2023-04-22T09:29:01Z
|
2023-05-08T10:16:29Z
|
https://github.com/LibreDWG/libredwg/issues/702
| 1,679,441,141 | 702 |
[
"LibreDWG",
"libredwg"
] |
e.g.:
```
$ LD_LIBRARY_PATH=../src/.libs valgrind .libs/dwggrep -i tekst ../../test/test-data/example_r13.dwg
==1418971== Memcheck, a memory error detector
==1418971== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1418971== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==1418971== Command: .libs/dwggrep -i tekst ../../test/test-data/example_r13.dwg
==1418971==
==1418971== Invalid read of size 16
==1418971== at 0x657ACD9: ???
==1418971== by 0x6A9741F: ???
==1418971== Address 0x6a9742f is 15 bytes inside a block of size 18 alloc'd
==1418971== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==1418971== by 0x48DDA5C: bit_read_TV (bits.c:1705)
==1418971== by 0x4A71D90: dwg_decode_DICTIONARY_private (dwg.spec:3111)
==1418971== by 0x4A713DD: dwg_decode_DICTIONARY (dwg.spec:3028)
==1418971== by 0x4EB6A58: dwg_decode_add_object (decode.c:5341)
==1418971== by 0x48ED654: decode_R13_R2000 (decode.c:799)
==1418971== by 0x48E411F: dwg_decode (decode.c:225)
==1418971== by 0x48CF18B: dwg_read_file (dwg.c:261)
==1418971== by 0x11C3BA: main (dwggrep.c:2013)
==1418971== Invalid read of size 16
==1418971== at 0x657ACD9: ???
==1418971== by 0x6A9747F: ???
==1418971== Address 0x6a9748f is 15 bytes inside a block of size 28 alloc'd
==1418971== at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==1418971== by 0x48DDA5C: bit_read_TV (bits.c:1705)
==1418971== by 0x4A71D90: dwg_decode_DICTIONARY_private (dwg.spec:3111)
==1418971== by 0x4A713DD: dwg_decode_DICTIONARY (dwg.spec:3028)
==1418971== by 0x4EB6A58: dwg_decode_add_object (decode.c:5341)
==1418971== by 0x48ED654: decode_R13_R2000 (decode.c:799)
==1418971== by 0x48E411F: dwg_decode (decode.c:225)
==1418971== by 0x48CF18B: dwg_read_file (dwg.c:261)
==1418971== by 0x11C3BA: main (dwggrep.c:2013)
```
but many more.
|
valgrind errors in decode
|
https://api.github.com/repos/LibreDWG/libredwg/issues/701/comments
| 1 |
2023-04-21T08:42:42Z
|
2023-04-24T10:21:52Z
|
https://github.com/LibreDWG/libredwg/issues/701
| 1,678,132,423 | 701 |
[
"LibreDWG",
"libredwg"
] | null |
add libiconv-2.dll to the nightly windows zips
|
https://api.github.com/repos/LibreDWG/libredwg/issues/700/comments
| 1 |
2023-04-21T08:33:33Z
|
2023-04-21T10:12:40Z
|
https://github.com/LibreDWG/libredwg/issues/700
| 1,678,117,728 | 700 |
[
"LibreDWG",
"libredwg"
] |
python demand-loads libxml2, but for the wrong architecture resp. doesn't understand LD_LIBRARY_PATH arch hints, nor static LDFLAGS="-L/usr/lib/i386-linux-gnu"
libxml2:i386 is installed and can be linked to.
installing python3-libxml2:i386 would remove too many needed packages
|
skip test/xmlsuite on cross
|
https://api.github.com/repos/LibreDWG/libredwg/issues/698/comments
| 0 |
2023-04-18T05:29:33Z
|
2023-04-18T10:21:36Z
|
https://github.com/LibreDWG/libredwg/issues/698
| 1,672,377,749 | 698 |
[
"LibreDWG",
"libredwg"
] |
[4.zip](https://github.com/LibreDWG/libredwg/files/11244876/4.zip)
```
(gdb) r -v9 /home/user/out/default/crashes/4*
The program being debugged has been started already.
Start it from the beginning? (y or n)
Please answer y or n.
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/user/libredwg/dwgread -v9 /home/user/out/default/crashes/4*
Reading DWG file /home/user/out/default/crashes/4.dwg
Program received signal SIGSEGV, Segmentation fault.
0xb6cdc655 in read_2004_compressed_section (dat=<optimized out>, dwg=dwg@entry=0xbfffe578,
sec_dat=0xbfffe330, type=SECTION_HEADER) at src/decode.c:2018
2018 if (dwg->header.section_info[i].fixedtype == type)
```
|
Segmentation fault in read_2004_compressed_section
|
https://api.github.com/repos/LibreDWG/libredwg/issues/697/comments
| 1 |
2023-04-16T23:01:11Z
|
2023-04-18T10:21:36Z
|
https://github.com/LibreDWG/libredwg/issues/697
| 1,670,184,623 | 697 |
[
"LibreDWG",
"libredwg"
] |
[3.zip](https://github.com/LibreDWG/libredwg/files/11244866/3.zip)
```
(gdb) r -v9 /home/user/out/default/crashes/3*
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/user/libredwg/dwgread -v9 /home/user/out/default/crashes/3*
Reading DWG file /home/user/out/default/crashes/3.dwg
Program received signal SIGSEGV, Segmentation fault.
0xb6c8b647 in filedeplist_private (dat=0xbfffe330, dwg=0xbfffe578) at src/filedeplist.spec:26
26 FIELD_T32 (files[rcount1].filename, 0);
```
|
Segmentation fault in filedeplist_private
|
https://api.github.com/repos/LibreDWG/libredwg/issues/696/comments
| 2 |
2023-04-16T22:57:39Z
|
2023-04-18T10:21:35Z
|
https://github.com/LibreDWG/libredwg/issues/696
| 1,670,182,844 | 696 |
[
"LibreDWG",
"libredwg"
] |
[2.zip](https://github.com/LibreDWG/libredwg/files/11244857/2.zip)
```
(gdb)
(gdb) r -v9 /home/user/out/default/crashes/2*
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/user/libredwg/dwgread -v9 /home/user/out/default/crashes/2*
Reading DWG file /home/user/out/default/crashes/2.dwg
Program received signal SIGSEGV, Segmentation fault.
0xb6c8eb26 in acds_private (dat=0xbfffe330, dwg=0xbfffe578) at src/acds.spec:215
215 SUB_FIELD_RL (schidx.props[rcount2],index, 0);
(gdb)
```
|
Segmentation fault in acds_private
|
https://api.github.com/repos/LibreDWG/libredwg/issues/695/comments
| 2 |
2023-04-16T22:53:18Z
|
2023-04-18T10:21:35Z
|
https://github.com/LibreDWG/libredwg/issues/695
| 1,670,181,746 | 695 |
[
"LibreDWG",
"libredwg"
] |
Attached file cases a segmentation fault on Debian 11 x86 with the current GIT release.
[1.zip](https://github.com/LibreDWG/libredwg/files/11244854/1.zip)
```
user@debian:~/libredwg$ gdb ./dwgread
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
(gdb)
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./dwgread...
(gdb) r -v9 /home/user/out/default/crashes/1*
Starting program: /home/user/libredwg/dwgread -v9 /home/user/out/default/crashes/1*
Reading DWG file /home/user/out/default/crashes/1.dwg
Program received signal SIGSEGV, Segmentation fault.
0xb6cfb56d in dwg_decode__3DSOLID_private (dat=<optimized out>, hdl_dat=<optimized out>, str_dat=0xbfffdd48, obj=0x825bab0) at src/dwg.spec:3001
3001 ACTION_3DSOLID;
(gdb)
```
|
Segmentation fault in dwg_decode__3DSOLID_private
|
https://api.github.com/repos/LibreDWG/libredwg/issues/694/comments
| 4 |
2023-04-16T22:52:03Z
|
2023-04-18T10:21:34Z
|
https://github.com/LibreDWG/libredwg/issues/694
| 1,670,181,443 | 694 |
[
"LibreDWG",
"libredwg"
] |
Example:
[test.json.gz](https://github.com/LibreDWG/libredwg/files/11202163/test.json.gz)
Command: ```dwgwrite test.json```
Output:
```
...
Skip object BLOCK_HEADER, number: 5, Fixedtype: 49, Addr: 0 (0x2e5)
Skip object LAYER, number: 6, Fixedtype: 51, Addr: 0 (0x2e5)
Skip object STYLE, number: 7, Fixedtype: 53, Addr: 0 (0x2e5)
Skip object LTYPE, number: 8, Fixedtype: 57, Addr: 0 (0x2e5)
entities 0 0x2e5 - 0x2e5
ctrl BLOCK_CONTROL [0]: num:0
ctrl LAYER_CONTROL [0]: num:1
contents table LAYER [0]: size:37 (0x0, 0x2e5)
ERROR: Wrong type BLOCK_CONTROL, expected DWG_TYPE_LAYER
ctrl STYLE_CONTROL [0]: num:1
contents table STYLE [0]: size:37 (0x0, 0x2e5)
ERROR: Wrong type BLOCK_CONTROL, expected DWG_TYPE_STYLE
ctrl LTYPE_CONTROL [0]: num:1
contents table LTYPE [0]: size:37 (0x0, 0x2e5)
ERROR: Wrong type BLOCK_CONTROL, expected DWG_TYPE_LTYPE
ctrl VIEW_CONTROL [0]: num:0
block_entities 0x2e5 - 0x2e5 (0x40000000)
@0x14:
entities_start: 0x2e5 [RLx]
...
```
|
Wrong encoding of tables from json to DWG in preR13
|
https://api.github.com/repos/LibreDWG/libredwg/issues/693/comments
| 4 |
2023-04-11T15:24:25Z
|
2023-04-15T04:12:20Z
|
https://github.com/LibreDWG/libredwg/issues/693
| 1,662,742,125 | 693 |
[
"LibreDWG",
"libredwg"
] |
Hello,
I am attaching a new file that causes the following segfault with ASAN enabled on dwgread:
[0.zip](https://github.com/LibreDWG/libredwg/files/11186172/0.zip)
This was tested on x86 Debian 11 vm.
```
=================================================================
==1738==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xb09014d0 at pc 0xb301276d bp 0xbf9e3b08 sp 0xbf9e3afc
WRITE of size 2 at 0xb09014d0 thread T0
#0 0xb301276c in bit_read_T32 /home/user/gcc/libredwg/src/bits.c:2248
#1 0xb34cbf66 in filedeplist_private /home/user/gcc/libredwg/src/filedeplist.spec:29
#2 0xb34cbf66 in read_2004_section_filedeplist /home/user/gcc/libredwg/src/decode.c:2759
#3 0xb34cbf66 in decode_R2004 /home/user/gcc/libredwg/src/decode.c:3414
#4 0xb34d2c31 in dwg_decode /home/user/gcc/libredwg/src/decode.c:231
#5 0xb3544642 in dwg_read_file /home/user/gcc/libredwg/src/dwg.c:261
#6 0x49b71e in main /home/user/gcc/libredwg/programs/dwgread.c:256
#7 0xb77fee45 in __libc_start_main ../csu/libc-start.c:308
#8 0x49cf00 in _start (/home/user/gcc/libredwg/dwgread+0x4f00)
0xb09014d1 is located 0 bytes to the right of 1-byte region [0xb09014d0,0xb09014d1)
allocated by thread T0 here:
#0 0xb7a794bb in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0xb3012655 in bit_read_T32 /home/user/gcc/libredwg/src/bits.c:2240
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/user/gcc/libredwg/src/bits.c:2248 in bit_read_T32
Shadow bytes around the buggy address:
0x36120240: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36120250: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36120260: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36120270: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x36120280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x36120290: fa fa fa fa fa fa fa fa fa fa[01]fa fa fa 02 fa
0x361202a0: fa fa 00 00 fa fa 02 fa fa fa 02 fa fa fa 02 fa
0x361202b0: fa fa 02 fa fa fa 02 fa fa fa 02 fa fa fa 00 04
0x361202c0: fa fa 00 06 fa fa fd fd fa fa 00 02 fa fa fd fd
0x361202d0: fa fa 00 00 fa fa 00 06 fa fa fd fd fa fa 00 07
0x361202e0: fa fa fd fd fa fa 00 03 fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==1738==ABORTING
```
|
AddressSanitizer: heap-buffer-overflow on bit_read_T32 libredwg/src/bits.c:2248
|
https://api.github.com/repos/LibreDWG/libredwg/issues/692/comments
| 5 |
2023-04-09T19:36:33Z
|
2023-04-12T06:51:57Z
|
https://github.com/LibreDWG/libredwg/issues/692
| 1,659,980,378 | 692 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.