Qml works fine on dev machine, crashes on others.



  • Using vs2010 qt5.2.1

    i copied my release dir to a flashdrive and tried running it on another windows machine, but on execution it fails every time. I have the qml access through qrc, along with every resource access done through qrc in the qml code.

    relevant CPP code:

    @ m_view = new QQuickView;
    Q_CHECK_PTR(m_view);

    m_view->setSource(QUrl("qrc:/ControlPanel.qml"));
    m_container = QWidget::createWindowContainer(m_view);

    Q_CHECK_PTR(m_container);

    m_uiRoot = m_view->rootObject(); //root object here gets set to NULL

    Q_CHECK_PTR(m_uiRoot); // fails
    @



  • Did you copied the binaries with your flashdrive, or your source files? Because when you copy your binaries, you need to copy all relevant dll files with it (asuming your "another windows machine" does not have qt installed on it).

    To automate this you can use windeployqt. More information here: http://qt-project.org/doc/qt-5/windows-deployment.html#the-windows-deployment-tool

    If this doesn't solve your problem, could you post the error message?



  • I got "Unable to locate ICU library icuin51.dll" which is really weird because the dll is in both my target binary's directory and windeployqt's directory.

    NO LONGER ISSUE: fixed by adding my qt dir to %PATH%.



  • After running windeployqt, and trying copying the directory after that, still the same error.

    Error message:

    Problem Event Name: APPCRASH
    Fault Module Name: MSVCR100.dll
    Fault module version: 10.0.40219.1
    Fault Module timestamp:4d5f0c22
    Exception Code: 40000015
    Exception Offset: 0008d6fd



  • You may be missing some plugins and qml directory.
    @1. Please go to your installation take plugins like platform etc.

    1. Go to qml directory and get some directories like QtQml, QtQuick.2 etc. @

    These need to be there in the directory where you are placing your executable. This should fix your issue.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.