[Mac]dwg2pdf Qcad Crash And "Segmentation fault: 11" Error.

Hello.

When I used dwg2pdf, I confirmed the following problem

・Command

/Applications/QCAD-Pro.app/Contents/Resources/dwg2pdf -l -a -n -fs standard Arial -paper=A3 -outfile=out.pdf sample.dxf.sjis.dxf

・Terminal

18:32:10: Debug:    RDwgPlugin::init
18:32:10: Debug:    RDxfPlugin::init
18:32:10: Debug:    RHelpPlugin::init
18:32:10: Debug:    RPolygonPlugin::init
18:32:10: Debug:    RProScriptsPlugin::init
18:32:10: Debug:    RScriptsPlugin::init
18:32:10: Debug:    RSpatialIndexProPlugin::init
18:32:10: Debug:    RTriangulationPlugin::init
18:32:10: Debug:    calling odInitialize
18:32:10: Debug:    dropped global XDATA (no res buf):  "ViewportCenter"
/Applications/QCAD-Pro.app/Contents/Resources/qcad: line 18: 32033 Segmentation fault: 11  DYLD_LIBRARY_PATH="$DIR" "$binary" "$@"

According to the examination, it is generated when “±” is used in SJIS DXF file, and R21 or higher DXF format.
It did not occur in UTF-8.But, UTF-8 can not be used because it is garbled…

I have attached the file in question.Please confirm.

Thank you.
sample.dxf.sjis.dxf (102 KB)

As far as I can tell, the attached file does not contain “±” but the characters 0x81 (not printable) and a “}”, the latter which is causing the crash:
“}” is ending a formatting group without previously starting a formatting group with “{”.

The crash will be fixed for the next release, but the text will not show anything as 0x81 is not a printable character and “}” is part of the formatting. Do you have a more complete example with more context?

Hi Andrew.

Thank you for reply.

The crash will be fixed for the next release,
Thank you. We look forward to waiting

Do you have a more complete example with more context?
I’m sorry. Since this occurred on the client’s file, There is no file that can be attached.

So,I will add the methods and results I have investigated.


1:It worked when the problem file was changed from sjis to utf8.
(※ I have attached. “sample.dxf.utf8.dxf”)

2:This problem was confirmed as follows.

[Original file]
ACADVER : AC1015
File character code : sjis
→ File Open and Convert(dwg2pdf) Success.

[Until the problem file is created.]
1.Open Original file with QCAD
2.Select format and save → select over R21 → output dxf File(UTF8) → File Open and Convert(dwg2pdf) Success.
3.Change the dxf file (utf8) output in step 2 to sjis with a text editor or PHP. → Crash.

[How to investigate the problem area]
1.Investigate the problem while erasing the entities one by one.
2.The content of the last entity is “± 1.0”
3.Execute 2 patterns leaving only “±” or “1.0”.
“1.0” → File Open and Convert(dwg2pdf) Success.
“±” → Crash


I hope this information helps.
thank you.
sample.dxf.utf8.dxf (102 KB)

It is additional information.

the attached file does not contain “±” but the characters 0x81 (not printable) and a “}”, the latter which is causing the crash:

SJIS:± → Open with UTF8:?}

[check tool]

thank you.