Successfully compile QCAD, but could't startup

Discussion forum for contributors and developers who are using the QCAD ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Post Reply
xuyan505
Registered Member
Posts: 1
Joined: Sat Jul 22, 2017 7:51 am

Successfully compile QCAD, but could't startup

Post by xuyan505 » Mon May 21, 2018 8:45 am

System : windows 7 x64 sp1
Qt : 5.4.1 msvc-opengl 64
Compiler: visual studio 2013 community

Successfully compile QCAD, but once I run the application, When executed to the above code segment, the exception is thrown
(the autostart.js script is loaded correctly). Thank you very much for your reply. :D :D :D :lol:

Code: Select all

QVariant RScriptHandlerEcma::eval(const QString& script, const QString& fileName) {
    QScriptValue err = engine->evaluate(script, fileName);
    if (engine->hasUncaughtException()) {
        qWarning()
                << "RScriptHandlerEcma::eval: script engine exception: "
                << err.toString();
        qWarning() << engine->uncaughtExceptionBacktrace().join("\n");
    }
    return err.toVariant();
}
after execute "qcad.exe 2>log", the generated log file is as follow:

Code: Select all

[36mRDxfPlugin.cpp:9, bool __cdecl RDxfPlugin::init(void):[0m
15:47:54: Debug:    RDxfPlugin::init
[31mRScriptHandlerEcma.cpp:1024, class QVariant __cdecl RScriptHandlerEcma::eval(const class QString &,const class QString &):[0m
Warning:  RScriptHandlerEcma::eval: script engine exception:  "ReferenceError: Can't find variable: QPlainTextEdit"
[31mRScriptHandlerEcma.cpp:1027, class QVariant __cdecl RScriptHandlerEcma::eval(const class QString &,const class QString &):[0m
Warning:  "<eval>() at E:/backup/qcad/scripts\library.js:2339
<native>('library.js') at -1
<global>() at scripts\autostart.js:20"
[31mRScriptHandlerEcma.cpp:950, __cdecl RScriptHandlerEcma::~RScriptHandlerEcma(void):[0m
Warning:  At least one uncaught exception:
[31mRScriptHandlerEcma.cpp:951, __cdecl RScriptHandlerEcma::~RScriptHandlerEcma(void):[0m
Warning:  "<eval>() at E:/backup/qcad/scripts\library.js:2339
<native>('library.js') at -1
<global>() at scripts\autostart.js:20"
[36mREcmaHelper.cpp:748, void __cdecl REcmaHelper::printStackTrace(class QScriptContext *):[0m
15:47:54: Debug:    "<global>() at 2339"

WesternWorld
Registered Member
Posts: 1
Joined: Wed May 23, 2018 2:56 am

Re: Successfully compile QCAD, but could't startup

Post by WesternWorld » Wed May 23, 2018 3:17 am

Hi , Did you find the reason?

Yeah
Registered Member
Posts: 1
Joined: Mon Jun 04, 2018 7:29 am

Re: Successfully compile QCAD, but could't startup

Post by Yeah » Tue Jun 05, 2018 3:12 am

因为qcad与界面相关的功能都是用JavaScript脚本实现,所以还需要编译Qt的脚本实现。找到源码的src目录中的3rdparty文件夹中与Qt版本对应的qt-labs-qtscriptgenerator,里面会已经生成了VS的解决方案。直接用VS打开解决方案,全部编译即可。

Post Reply

Return to “QCAD Developers and Contributors”