AnsweredAssumed Answered

Why am I  getting "QQmlApplicationEngine failed to load component" during ArcGIS initialization whenever I have a mistake in my QML?

Question asked by jon.g@39dn.com on Mar 7, 2016
Latest reply on Mar 11, 2016 by tdunn-esristaff

Lucas Danzinger

 

Hello again, I'm in the process of learning QT and building a simple ArcGIS driven app. The entire time I've been working on it, I periodically attempt to run my app and it gives me back something like the below in application output:

 

ArcGIS.Runtime.Core: void __cdecl QmlUtils::registerTypes(const char *) ArcGIS.Runtime

ArcGIS.Runtime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) ArcGIS.Runtime

ArcGIS.Runtime.Core: void __cdecl QmlUtils::initializeRuntimeLicense(void) Invalid clientId QVariant(QString, "39DN") status 1

ArcGIS.Runtime.Core: void __cdecl QmlUtils::initializeImageProvider(class QQmlEngine *)

ArcGIS.Runtime.Core: void __cdecl QmlUtils::initializeImageProvider(class QQmlEngine *) Setting global image provider QVariant(void*, 0x29ce2d516f0)

ArcGIS.Extras.Plugin: void __cdecl ArcGISExtrasPlugin::registerTypes(const char *) ArcGIS.Extras

ArcGIS.Extras.Plugin: void __cdecl ArcGISExtrasPlugin::registerTypes(const char *) Registering Singleton Types

ArcGIS.Extras.Core: void __cdecl TkTypes::registerTypes(const char *) ArcGIS.Extras

ArcGIS.Extras.Plugin: void __cdecl ArcGISExtrasPlugin::initializeEngine(class QQmlEngine *,const char *) ArcGIS.Extras

QQmlApplicationEngine failed to load component

C:\projects\Qt\build-Test-Desktop_Qt_5_5_1_MSVC2013_64bit-Debug\debug\Test.exe exited with code -1

 

It never gives an actual error of any useful variety, it always just says "exited with code 1", and usually that line is preceded by "QqmlApplicationEngine failed to load component". This always seems to happen in the middle of the ArcGIS initializers.

 

Until today, I just assumed that QT creator was terrible at detecting errors in my code, because the solution was always some mistake I'd made in regards to general QT Quick types. However, I am wondering now if it might be possible that it normally gives a real error message, and somehow ArcGIS SDK is hiding that from me?

 

This does not happen with any one specific error, it happens at least whenever I make a mistake with QML Types, like putting a Rectangle inside of a ListModel's ListElement.   Because it happens and gives the exact same error for almost every mistake I ever make, I have spent countless hours manually tracking down my mistakes over the course of this project.

 

It's possible I'm using the wrong kit for my system or something, but unless I make a mistake like the one mentioned above, the application compiles and runs flawlessly on my desktop as well as my phone, so I don't really know, maybe you can help me figure it out.

 

The ArcGIS portion of my app runs fine when I finally figure out what QML mistake I made and fix it.

 

I'm running QTQuick 2.4 and ArcGIS Runtime SDK 10.2.6

 

I'm building for Desktop Qt 5.5.1 MSVC2013 64bit, I'm on Windows 10, 64bit.

 

 

Outcomes