Page 1 of 1

qcad-3.1.6 dwg2svg segmentation fault [solved]

Posted: Wed Jul 31, 2013 9:18 pm
by bilal
Hello there,
First i would like to congratulate on the work you have been doing. I have been looking for such solution when i come across QCad.
I tried to run qcad-3.1.6 in headless mode for converting dwg. I tried to execute dwg2svg script for converting dwg to svg. I executed

Code: Select all

./dwg2svg ../budweiser.dwg
but i got a segmentation fault, and svg was not created successfully.

Code: Select all

./qcad: line 18: 18567 Segmentation fault      LD_LIBRARY_PATH="$DIR" "$binary" -style plastique "$@"
Let me know if there is any document available for running QCad in headless mode.

I also tried compiling qcad, i cloned the latest code but got an error in that as well, i followed http://www.qcad.org/en/component/conten ... om-sources . The error was

Code: Select all

g++ -c -m64 -pipe -O2 -w -D_REENTRANT -fPIC -DQT_WEBKIT -DQCAD_DLL -DPTHREADS -DHAVE_PTHREAD_H -DQCADECMAAPI_LIBRARY -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WEBKIT_LIB -DQT_SCRIPT_LIB -DQT_SCRIPTTOOLS_LIB -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtHelp -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtScriptTools -I/usr/include/qt4/QtScript -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -I../../core -I../../core/math -I../../grid -I../../snap -I../../gui -I../../entity -I../../operations -I../../scripting -I../../stemmer -I. -Igenerated -Iadapters -I../../io/dxf -I../../spatialindex -I../../3rdparty -I/usr/X11R6/include -Irelease -o release/REcmaCircle.o generated/REcmaCircle.cpp
generated/REcmaCircle.cpp: In static member function ‘static QScriptValue REcmaCircle::touchesCircleInternally(QScriptContext*, QScriptEngine*)’:
generated/REcmaCircle.cpp:1838:22: error: ‘class RCircle’ has no member named ‘touchesCircleInternally’
make[4]: *** [release/REcmaCircle.o] Error 1
make[4]: Leaving directory `/work/dev-work/cad/qcad/src/scripting/ecmaapi'
make[3]: *** [release] Error 2
make[3]: Leaving directory `/work/dev-work/cad/qcad/src/scripting/ecmaapi'
make[2]: *** [sub-ecmaapi-make_default-ordered] Error 2
make[2]: Leaving directory `/work/dev-work/cad/qcad/src/scripting'
make[1]: *** [sub-scripting-make_default-ordered] Error 2
make[1]: Leaving directory `/work/dev-work/cad/qcad/src'
make: *** [sub-src-make_default-ordered] Error 2
I am willing to purchase but before that i want to make sure it fulfills my requirements. Add to that let me know does QCad supports latest dwg,dxf etc standards.
Wish: I am not sure if QCad supports this or not but can i get all the layers in separate svg and some how gets all the views (if presents).

Regards,
Mirza Bilal

Re: qcad-3.1.6 segmentation fault

Posted: Wed Jul 31, 2013 9:28 pm
by andrew
bilal wrote:I executed

Code: Select all

./dwg2svg ../budweiser.dwg
but i got a segmentation fault, and svg was not created successfully.
Thanks for your report.
Do you also get a segfault when trying to convert any other file, e.g. the example files included with QCAD in ./examples?
bilal wrote:I also tried compiling qcad, i cloned the latest code but got an error in that as well
Thanks, I've committed updated script wrappers.

Please note that checking out master is cutting edge and might not always work. Please check out the latest tagged version if you want to make sure that you have something stable.

Re: qcad-3.1.6 segmentation fault

Posted: Wed Jul 31, 2013 9:56 pm
by bilal
tried it with colors.dxf, and conversion worked.
Is it something like it does not support the file provided.

And is it possible to get separate svgs for each layer?

Re: qcad-3.1.6 segmentation fault

Posted: Wed Jul 31, 2013 10:03 pm
by andrew
bilal wrote:tried it with colors.dxf, and conversion worked.
Is it something like it does not support the file provided.
That is possible. Maybe you can also try to load the file in the QCAD application or send me the file by e-mail for testing.
bilal wrote:And is it possible to get separate svgs for each layer?
Not out of the box. Using the script interface, it is certainly doable without too much effort.

Re: qcad-3.1.6 segmentation fault

Posted: Thu Aug 01, 2013 9:16 am
by bilal
I have sent you the file. The file opened properly but crashed with the same message on svg export.

Any pointers on qcad scripting where to start?

Re: qcad-3.1.6 segmentation fault

Posted: Fri Aug 02, 2013 6:46 pm
by bilal
Any update?

Re: qcad-3.1.6 segmentation fault

Posted: Fri Aug 02, 2013 6:59 pm
by andrew
I haven't had a chance to look into this problem yet. Probably next week. Thanks for your patience.

Re: qcad-3.1.6 segmentation fault

Posted: Fri Aug 02, 2013 8:54 pm
by bilal
Thanks Andrew, sor far QCAD looks good to me and will fulfill my requirements though i just need some pointers where to start with QCAD scripting and documentations etc.

Re: qcad-3.1.6 segmentation fault

Posted: Sun Aug 04, 2013 9:30 pm
by bilal
For anyone who could not find help, can look into http://www.ribbonsoft.com/doc/qcad/3.0/ ... rials.html

Re: qcad-3.1.6 dwg2svg segmentation fault

Posted: Tue Aug 06, 2013 2:51 pm
by andrew

Re: qcad-3.1.6 dwg2svg segmentation fault

Posted: Thu Aug 08, 2013 1:26 pm
by andrew
This issue should be fixed in the latest QCAD release (3.2.0).

Re: qcad-3.1.6 dwg2svg segmentation fault [solved]

Posted: Thu Aug 22, 2013 10:47 pm
by bilal
Thanks Just tested it on 3.2.2, and it has been fixed.