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

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules
Always indicate Operating system, QCAD version
Attach Drawing files, Screenshots
Post Reply
t.ogawa
Junior Member
Posts: 14
Joined: Fri May 03, 2019 4:04 am

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

Post by t.ogawa » Fri May 17, 2019 10:37 am

Hello.
 
When I used dwg2pdf, I confirmed the following problem

・Command

Code: Select all

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

Code: Select all

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" "[email protected]"
 

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.
Attachments
sample.dxf.sjis.dxf
(102.25 KiB) Downloaded 76 times

User avatar
andrew
Site Admin
Posts: 6355
Joined: Fri Mar 30, 2007 6:07 am

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

Post by andrew » Fri May 17, 2019 2:51 pm

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?

t.ogawa
Junior Member
Posts: 14
Joined: Fri May 03, 2019 4:04 am

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

Post by t.ogawa » Sun May 19, 2019 9:31 am

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.
Attachments
sample.dxf.utf8.dxf
(102.25 KiB) Downloaded 77 times

t.ogawa
Junior Member
Posts: 14
Joined: Fri May 03, 2019 4:04 am

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

Post by t.ogawa » Mon May 20, 2019 5:10 am

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]
https://tools.m-bsys.com/development_to ... uption.php

thank you.

Post Reply

Return to “QCAD Troubleshooting and Problems”