Select to view content in your preferred language

App is crashing on windows

2841
6
Jump to solution
05-15-2018 12:45 PM
MarekFlorianczyk
Occasional Contributor

Hi

I have an app working on Linux, tried to compile for windows and it is crashing as soon as I open qml page with maps.

I have compiled with Qt 5.10.1 and MSVC2017 64Bit on Windows 10 also I have Visual 2017 community and openssl 1.0.2g

The compiler in Qt kit is set for 15.0 x86_amd64.  I know that in system requirements for windows there is 15.3 but this Visual Studio I have installed 2 days ago and this compiler is from VS

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat x86_amd64

What can be the problem ?

Below there is debug output.

Best Regards,

Marek

Stopped in thread 19 by Exception at 0x0 write access violation at 0x8

debug is:

1
2 RT_KMLDataset_destroy runtimecore 0x7ffa57f682eb
3 RT_KMLDataset_destroy runtimecore 0x7ffa57ec364a
4 RT_KMLDataset_destroy runtimecore 0x7ffa57f997ea
5 RT_KMLDataset_destroy runtimecore 0x7ffa57f16e5c
6 RT_KMLDataset_destroy runtimecore 0x7ffa57eb7f68
7 RT_KMLDataset_destroy runtimecore 0x7ffa57ef233d
8 RT_KMLDataset_destroy runtimecore 0x7ffa5ada4d8f
9 _C_specific_handler VCRUNTIME140D 0x7ffa927914f0
10 _BuildCatchObjectHelper VCRUNTIME140D 0x7ffa92795639
11 _unDNameEx VCRUNTIME140D 0x7ffa927a5bfe
12 _BuildCatchObjectHelper VCRUNTIME140D 0x7ffa92795912
13 _CxxFrameHandler3 VCRUNTIME140D 0x7ffa927a6107
14 RT_KMLDataset_destroy runtimecore 0x7ffa58c8cc00
15 _chkstk ntdll 0x7ffaaec6513d
16 RtlUnwindEx ntdll 0x7ffaaebde525
17 FindAndUnlinkFrame VCRUNTIME140D 0x7ffa927a6005
18 is_exception_typeof VCRUNTIME140D 0x7ffa92793c89
19 is_exception_typeof VCRUNTIME140D 0x7ffa92794306
20 _BuildCatchObjectHelper VCRUNTIME140D 0x7ffa92795b25
21 _CxxFrameHandler3 VCRUNTIME140D 0x7ffa927a6107
22 _chkstk ntdll 0x7ffaaec650bd
23 RtlWalkFrameChain ntdll 0x7ffaaebdd278
24 KiUserExceptionDispatcher ntdll 0x7ffaaec63fee
25 RaiseException KERNELBASE 0x7ffaab344008
26 CxxThrowException VCRUNTIME140D 0x7ffa92797e2d
27 RT_KMLDataset_destroy runtimecore 0x7ffa57fa92e8
28 RT_KMLDataset_destroy runtimecore 0x7ffa569a3aec
29 RT_KMLDataset_destroy runtimecore 0x7ffa5474176f
30 RT_KMLDataset_destroy runtimecore 0x7ffa53918dbe
31 QRTImpl::RendererImpl::toJson EsriCommonQtd 0x7ffa60ba7bad
32 QRTImpl::RendererImpl::toJson EsriCommonQtd 0x7ffa607beca7
33 qt_plugin_instance ArcGISRuntimePlugind 0x7ffa627f4386
34 QSGFramebufferObjectNode::render qquickframebufferobject.cpp 235 0x7ffa7623aa51
35 QSGFramebufferObjectNode::qt_static_metacall qquickframebufferobject.moc 74 0x7ffa762399aa
36 QMetaObject::activate qobject.cpp 3769 0x7ffa644c0648
37 QMetaObject::activate qobject.cpp 3630 0x7ffa644bfd98
38 QQuickWindow::beforeRendering moc_qquickwindow.cpp 507 0x7ffa7601a454
39 QQuickWindowPrivate::renderSceneGraph qquickwindow.cpp 457 0x7ffa76027255
40 QSGRenderThread::syncAndRender qsgthreadedrenderloop.cpp 646 0x7ffa75f80daf
41 QSGRenderThread::run qsgthreadedrenderloop.cpp 732 0x7ffa75f804f7
42 QThreadPrivate::start qthread_win.cpp 378 0x7ffa640afb3f
43 BaseThreadInitThunk KERNEL32 0x7ffaae091fe4
44 RtlUserThreadStart ntdll 0x7ffaaec2f061

application output is:

Esri.ArcGISRuntime.Plugin: void __cdecl ArcGISRuntimePlugin::registerTypes(const char *) Esri.ArcGISRuntime

Esri.ArcGISRuntime.Plugin: void __cdecl QmlUtils::registerTypes(const char *) Esri.ArcGISRuntime

Esri.ArcGISRuntime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) Esri.ArcGISRuntime

Esri.ArcGISRuntime.Core: void __cdecl QmlUtils::initializeRuntimeLicense(void) licenseStatus 3

Esri.ArcGISRuntime.Core: void __cdecl QmlUtils::initializeRuntimeLicense(void) licenseLevel 0

Esri.ArcGISRuntime.Core: void __cdecl QmlUtils::initializeRuntimeLicense(void) licenseType 0

Esri.ArcGISRuntime.Core: void __cdecl QmlUtils::initializeImageProvider(class QQmlEngine *)

Esri.ArcGISRuntime.Core: void __cdecl QmlUtils::initializeImageProvider(class QQmlEngine *) Setting global image provider QVariant(void*, 0x21a16d1ac40)

Esri.ArcGISExtras.Plugin: void __cdecl ArcGISExtrasPlugin::registerTypes(const char *) Esri.ArcGISExtras

Esri.ArcGISExtras.Plugin: void __cdecl ArcGISExtrasPlugin::registerTypes(const char *) Registering Singleton Types

Esri.ArcGISExtras.Core: void __cdecl TkTypes::registerTypes(const char *) Esri.ArcGISExtras

Esri.ArcGISExtras.Plugin: void __cdecl ArcGISExtrasPlugin::initializeEngine(class QQmlEngine *,const char *) Esri.ArcGISExtras

Exception at 0x7ffaab344008, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in runtimecore!RT_KMLDataset_destroy

0 Kudos
1 Solution

Accepted Solutions
JamesBallard1
Esri Regular Contributor

Hi Marek Florianczyk. Thanks for the small project, that helped a lot. The issue is that for Windows, we require ANGLE rendering instead of OpenGL. This code block should do the trick.

int main(int argc, char *argv[])
{
#ifdef Q_OS_WIN
  // Force usage of OpenGL ES through ANGLE on Windows
  QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
#endif

...

That would normally be part of our SDK templates but it's missing from your project. Please give that a try and let us know if that helps.

Regards,

-James

View solution in original post

6 Replies
JamesBallard1
Esri Regular Contributor

Hi Marek Florianczyk.

   Are you able to post any code snippets or a small sample project so we can get an idea of what your app is trying to do? It's difficult to troubleshoot without a reproducible test case.

0 Kudos
MarekFlorianczyk
Occasional Contributor

Hi

In that case I'n using map display and geocode, I will prepare example, just need a bit more time.

Best,

Marek

0 Kudos
MarekFlorianczyk
Occasional Contributor

Hi 

I have prepared minimal example it is crashing in the same way.

I don't think this is code issue, example is simple, something with environment.

QML debugging is enabled. Only use this in a safe environment.

QML Debugger: Waiting for connection on port 50533...

Esri.ArcGISRuntime.Plugin: void __cdecl ArcGISRuntimePlugin::registerTypes(const char *) Esri.ArcGISRuntime

Esri.ArcGISRuntime.Plugin: void __cdecl QmlUtils::registerTypes(const char *) Esri.ArcGISRuntime

Esri.ArcGISRuntime.Plugin: void __cdecl ArcGISRuntimePlugin::initializeEngine(class QQmlEngine *,const char *) Esri.ArcGISRuntime

Esri.ArcGISRuntime.Core: void __cdecl QmlUtils::initializeRuntimeLicense(void) licenseStatus 3

Esri.ArcGISRuntime.Core: void __cdecl QmlUtils::initializeRuntimeLicense(void) licenseLevel 0

Esri.ArcGISRuntime.Core: void __cdecl QmlUtils::initializeRuntimeLicense(void) licenseType 0

Esri.ArcGISRuntime.Core: void __cdecl QmlUtils::initializeImageProvider(class QQmlEngine *)

Esri.ArcGISRuntime.Core: void __cdecl QmlUtils::initializeImageProvider(class QQmlEngine *) Setting global image provider QVariant(void*, 0x1c5d8b924a0)

Esri.ArcGISExtras.Plugin: void __cdecl ArcGISExtrasPlugin::registerTypes(const char *) Esri.ArcGISExtras

Esri.ArcGISExtras.Plugin: void __cdecl ArcGISExtrasPlugin::registerTypes(const char *) Registering Singleton Types

Esri.ArcGISExtras.Core: void __cdecl TkTypes::registerTypes(const char *) Esri.ArcGISExtras

Esri.ArcGISExtras.Plugin: void __cdecl ArcGISExtrasPlugin::initializeEngine(class QQmlEngine *,const char *) Esri.ArcGISExtras

Exception at 0x7ff993414008, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in runtimecore!RT_KMLDataset_destroy

1
2 RT_KMLDataset_destroy runtimecore 0x7ff946d882eb
3 RT_KMLDataset_destroy runtimecore 0x7ff946ce364a
4 RT_KMLDataset_destroy runtimecore 0x7ff946db97ea
5 RT_KMLDataset_destroy runtimecore 0x7ff946d36e5c
6 RT_KMLDataset_destroy runtimecore 0x7ff946cd7f68
7 RT_KMLDataset_destroy runtimecore 0x7ff946d1233d
8 RT_KMLDataset_destroy runtimecore 0x7ff949bc4d8f
9 _C_specific_handler VCRUNTIME140D 0x7ff97ef114f0
10 _BuildCatchObjectHelper VCRUNTIME140D 0x7ff97ef15639
11 _unDNameEx VCRUNTIME140D 0x7ff97ef25bfe
12 _BuildCatchObjectHelper VCRUNTIME140D 0x7ff97ef15912
13 _CxxFrameHandler3 VCRUNTIME140D 0x7ff97ef26107
14 RT_KMLDataset_destroy runtimecore 0x7ff947aacc00
15 _chkstk ntdll 0x7ff99624513d
16 RtlUnwindEx ntdll 0x7ff9961be525
17 FindAndUnlinkFrame VCRUNTIME140D 0x7ff97ef26005
18 is_exception_typeof VCRUNTIME140D 0x7ff97ef13c89
19 is_exception_typeof VCRUNTIME140D 0x7ff97ef14306
20 _BuildCatchObjectHelper VCRUNTIME140D 0x7ff97ef15b25
21 _CxxFrameHandler3 VCRUNTIME140D 0x7ff97ef26107
22 _chkstk ntdll 0x7ff9962450bd
23 RtlWalkFrameChain ntdll 0x7ff9961bd278
24 KiUserExceptionDispatcher ntdll 0x7ff996243fee
25 RaiseException KERNELBASE 0x7ff993414008
26 CxxThrowException VCRUNTIME140D 0x7ff97ef17e2d
27 RT_KMLDataset_destroy runtimecore 0x7ff946dc92e8
28 RT_KMLDataset_destroy runtimecore 0x7ff9457c3aec
29 RT_KMLDataset_destroy runtimecore 0x7ff94356176f
30 RT_KMLDataset_destroy runtimecore 0x7ff942738dbe
31 QRTImpl::RendererImpl::toJson EsriCommonQtd 0x7ff9579f7bad
32 QRTImpl::RendererImpl::toJson EsriCommonQtd 0x7ff95760eca7
33 qt_plugin_instance ArcGISRuntimePlugind 0x7ff959644386
34 QSGFramebufferObjectNode::render qquickframebufferobject.cpp 235 0x7ff95a60aa51
35 QSGFramebufferObjectNode::qt_static_metacall qquickframebufferobject.moc 74 0x7ff95a6099aa
36 QMetaObject::activate qobject.cpp 3769 0x7ff95b030648
37 QMetaObject::activate qobject.cpp 3630 0x7ff95b02fd98
38 QQuickWindow::beforeRendering moc_qquickwindow.cpp 507 0x7ff95a3ea454
39 QQuickWindowPrivate::renderSceneGraph qquickwindow.cpp 457 0x7ff95a3f7255
40 QSGRenderThread::syncAndRender qsgthreadedrenderloop.cpp 646 0x7ff95a350daf
41 QSGRenderThread::run qsgthreadedrenderloop.cpp 732 0x7ff95a3504f7
42 QThreadPrivate::start qthread_win.cpp 378 0x7ff95ac1fb3f
43 BaseThreadInitThunk KERNEL32 0x7ff994311fe4
44 RtlUserThreadStart ntdll 0x7ff99620f061

Best,

Marek

0 Kudos
JamesBallard1
Esri Regular Contributor

Hi Marek Florianczyk. Thanks for the small project, that helped a lot. The issue is that for Windows, we require ANGLE rendering instead of OpenGL. This code block should do the trick.

int main(int argc, char *argv[])
{
#ifdef Q_OS_WIN
  // Force usage of OpenGL ES through ANGLE on Windows
  QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
#endif

...

That would normally be part of our SDK templates but it's missing from your project. Please give that a try and let us know if that helps.

Regards,

-James

MarekFlorianczyk
Occasional Contributor

Hi.

Many thanks, it works.

I'm not sure about templates, because I'm using runtime integration so it might be useful to put this information here

https://developers.arcgis.com/qt/latest/qml/guide/arcgis-runtime-sdk-for-qt-system-requirements.htm

or here

https://developers.arcgis.com/qt/latest/qml/guide/qt-sdk-best-practices.htm#ESRI_SECTION1_6719D9F044...

Best Regards,

Marek

0 Kudos
JamesBallard1
Esri Regular Contributor

Marek Florianczyk‌, yes, you're right. Thank you for pointing this out. We'll make sure this is better documented in the future.

0 Kudos