Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMTS/WCS + 3D mapcanvas crash #28800

Closed
qgib opened this issue Jan 12, 2019 · 5 comments · Fixed by #30013
Closed

WMTS/WCS + 3D mapcanvas crash #28800

qgib opened this issue Jan 12, 2019 · 5 comments · Fixed by #30013
Assignees
Labels
3D Relates to QGIS' 3D engine or rendering Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Regression Something which used to work, but doesn't anymore

Comments

@qgib
Copy link
Contributor

qgib commented Jan 12, 2019

Author Name: Richard Duivenvoorde (@rduivenvoorde)
Original Redmine Issue: 20981
Affected QGIS version: 3.5(master)
Redmine category:3d


In current master QGIS crashes when you open the 3D mapcanvas.
This worked earlier, as stated here:
(via Google Translation)
https://translate.google.com/translate?hl=nl&sl=auto&tl=en&u=http%3A%2F%2Fwww.qgis.nl%2F2018%2F03%2F18%2Fje-eerste-3-d-kaart-in-qgis-3-0%2F

To reproduce:

  • open attached 3dproject.qgz (it is a epsg:28992 project, zoomed in to the south of Zuid Limburg)
  • after some time (till the dem ahn2_5m actually is showing) open the 3D mapcanvas
  • QGIS Crashes
  • Both in Linux and in Window.

I fail to get a gdb stacktrace, trying to run QGIS via gdb (even with an fresh profile) ends with:

src/core/qgsproviderregistry.cpp: 539: (createProviderLibrary) [0ms] Library name is /home/richard/bin/qgis/master/debug/lib/qgis/plugins/libwmsprovider.so
src/core/qgsdataitemproviderregistry.cpp: 103: (QgsDataItemProviderRegistry) [0ms] /home/richard/bin/qgis/master/debug/lib/qgis/plugins/libwmsprovider.so does not have dataCapabilities
src/core/auth/qgsauthmanager.cpp: 177: (init) [0ms] Initializing QCA...

Thread 3 "QXcbEventReader" received signal SIG33, Real-time event 33.
[Switching to Thread 0x7fffe04e0700 (LWP 3422)]
0x00007fffec78cbd9 in __GI___poll (fds=0x7fffe04deef8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
29	../sysdeps/unix/sysv/linux/poll.c: No such file or directory.

WINDOWS STACKTRACE is:

Crash ID: d220c048a99a358a432a786e0a8c66b7a6dbb108
Stack Trace
QgsWindow3DEngine::trUtf8 :
QgsWindow3DEngine::trUtf8 :
QgsWindow3DEngine::trUtf8 :
QgsWindow3DEngine::trUtf8 :
Qgs3DMapScene::onFrameTriggered :
QgsPhongMaterialSettings::ambient :
Qgs3DMapScene::updateCameraNearFarPlanes :
QgsCameraPose::headingAngle :
QMetaObject::activate :
Qt3DLogic::QFrameAction::triggered :
Qt3DLogic::QFrameAction::onTriggered :
Qt3DLogic::QFrameAction::onTriggered :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
DispatchMessageW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
dataItem :
dataItem :
dataItem :
dataItem :
dataItem :
dataItem :
dataItem :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsTerrainGenerator::typeToString :
QgsTerrainGenerator::typeToString :
QgsDemTerrainGenerator::updateGenerator :
QgsFlatTerrainGenerator::createChunkLoader :
QgsWindow3DEngine::trUtf8 :
QgsWindow3DEngine::trUtf8 :
QgsWindow3DEngine::trUtf8 :
QgsWindow3DEngine::trUtf8 :
QgsWindow3DEngine::trUtf8 :
QMetaObject::activate :
QgsWindow3DEngine::qt_static_metacall :
QgsTerrainGenerator::typeToString :
QgsTerrainGenerator::typeToString :
QgsTerrainGenerator::typeToString :
QgsTerrainGenerator::typeToString :
QMetaObject::activate :
Qgs3DAlgorithms::qt_static_metacall :
QgsTerrainGenerator::typeToString :
QgsTerrainGenerator::typeToString :
QgsTerrainGenerator::typeToString :
QgsTerrainGenerator::typeToString :
QMetaObject::activate :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QMetaObject::activate :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QMetaObject::activate :
QFutureWatcherBase::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsLayerTreeGroup::updateChildVisibilityMutuallyExclusive :
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
DispatchMessageW :
DispatchMessageW :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
QgisApp::actionLayerSaveAs :
BaseThreadInitThunk :
RtlUserThreadStart :


@qgib
Copy link
Contributor Author

qgib commented Mar 5, 2019

Author Name: Roberto Uhlig (@uhliro26)


User Feedback

Here a hopefully "better" stack trace from windows with current master.
Hope it gives you a clue.

Report Details

Crash ID: 00cc099c5a349c9d50a4c17af5fc127297a51255

Stack Trace

QgsChunkList::takeEntry qgschunklist_p.cpp:90
QgsChunkedEntity::requestResidency qgschunkedentity_p.cpp:296
QgsChunkedEntity::update qgschunkedentity_p.cpp:273
QgsChunkedEntity::update qgschunkedentity_p.cpp:130
Qgs3DMapScene::onFrameTriggered qgs3dmapscene.cpp:348
QtPrivate::FunctorCall<QtPrivate::IndexesList<0>,QtPrivate::List<float>,void,void (__cdecl Qgs3DMapScene::*)(float) __ptr64>::call qobjectdefs_impl.h:134
QtPrivate::FunctionPointer<void (__cdecl Qgs3DMapScene::*)(float) __ptr64>::call<QtPrivate::List<float>,void> qobjectdefs_impl.h:168
QtPrivate::QSlotObject<void (__cdecl Qgs3DMapScene::*)(float) __ptr64,QtPrivate::List<float>,void>::impl qobjectdefs_impl.h:397
QMetaObject::activate :
Qt3DLogic::QFrameAction::triggered :
Qt3DLogic::QFrameAction::onTriggered :
Qt3DLogic::QFrameAction::onTriggered :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:366
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QgsWcsCapabilities::sendRequest qgswcscapabilities.cpp:162
QgsWcsCapabilities::retrieveServerCapabilities qgswcscapabilities.cpp:252
QgsWcsCapabilities::retrieveServerCapabilities qgswcscapabilities.cpp:237
QgsWcsCapabilities::setUri qgswcscapabilities.cpp:86
QgsWcsProvider::QgsWcsProvider qgswcsprovider.cpp:94
QgsWcsProvider::clone qgswcsprovider.cpp:434
QgsWcsProvider::clone :
QgsRasterPipe::QgsRasterPipe qgsrasterpipe.cpp:37
QgsRasterLayerRenderer::QgsRasterLayerRenderer qgsrasterlayerrenderer.cpp:230
QgsRasterLayer::createMapRenderer qgsrasterlayer.cpp:246
QgsMapRendererJob::prepareJobs qgsmaprendererjob.cpp:348
QgsMapRendererCustomPainterJob::start qgsmaprenderercustompainterjob.cpp:85
QgsMapRendererSequentialJob::start qgsmaprenderersequentialjob.cpp:72
QgsTerrainTextureGenerator::render qgsterraintexturegenerator_p.cpp:43
QgsTerrainTileLoader::loadTexture qgsterraintileloader_p.cpp:64
FlatTerrainChunkLoader::FlatTerrainChunkLoader qgsflatterraingenerator.cpp:34
QgsFlatTerrainGenerator::createChunkLoader qgsflatterraingenerator.cpp:83
QgsChunkedEntity::startJob qgschunkedentity_p.cpp:382
QgsChunkedEntity::onActiveJobFinished qgschunkedentity_p.cpp:365
QtPrivate::FunctorCall<QtPrivate::IndexesList<>,QtPrivate::List<>,void,void (__cdecl QgsChunkedEntity::*)(void) __ptr64>::call qobjectdefs_impl.h:134
QtPrivate::FunctionPointer<void (__cdecl QgsChunkedEntity::*)(void) __ptr64>::call<QtPrivate::List<>,void> qobjectdefs_impl.h:168
QtPrivate::QSlotObject<void (__cdecl QgsChunkedEntity::*)(void) __ptr64,QtPrivate::List<>,void>::impl qobjectdefs_impl.h:397
QMetaObject::activate :
QgsChunkQueueJob::finished moc_qgschunkqueuejob_p.cpp:127
QgsTerrainTileLoader::onImageReady qgsterraintileloader_p.cpp:105
QtPrivate::FunctorCall<QtPrivate::IndexesList<0,1>,QtPrivate::List<int,QImage const & __ptr64>,void,void (__cdecl QgsTerrainTileLoader::*)(int,QImage const & __ptr64) __ptr64>::call qobjectdefs_impl.h:134
QtPrivate::FunctionPointer<void (__cdecl QgsTerrainTileLoader::*)(int,QImage const & __ptr64) __ptr64>::call<QtPrivate::List<int,QImage const & __ptr64>,void> qobjectdefs_impl.h:168
QtPrivate::QSlotObject<void (__cdecl QgsTerrainTileLoader::*)(int,QImage const & __ptr64) __ptr64,QtPrivate::List<int,QImage const & __ptr64>,void>::impl qobjectdefs_impl.h:397
QMetaObject::activate :
QgsTerrainTextureGenerator::tileReady moc_qgsterraintexturegenerator_p.cpp:138
QgsTerrainTextureGenerator::onRenderingFinished qgsterraintexturegenerator_p.cpp:125
QtPrivate::FunctorCall<QtPrivate::IndexesList<>,QtPrivate::List<>,void,void (__cdecl QgsTerrainTextureGenerator::*)(void) __ptr64>::call qobjectdefs_impl.h:134
QtPrivate::FunctionPointer<void (__cdecl QgsTerrainTextureGenerator::*)(void) __ptr64>::call<QtPrivate::List<>,void> qobjectdefs_impl.h:168
QtPrivate::QSlotObject<void (__cdecl QgsTerrainTextureGenerator::*)(void) __ptr64,QtPrivate::List<>,void>::impl qobjectdefs_impl.h:397
QMetaObject::activate :
QgsMapRendererJob::finished moc_qgsmaprendererjob.cpp:145
QgsMapRendererSequentialJob::internalFinished qgsmaprenderersequentialjob.cpp:150
QtPrivate::FunctorCall<QtPrivate::IndexesList<>,QtPrivate::List<>,void,void (__cdecl QgsMapRendererSequentialJob::*)(void) __ptr64>::call qobjectdefs_impl.h:134
QtPrivate::FunctionPointer<void (__cdecl QgsMapRendererSequentialJob::*)(void) __ptr64>::call<QtPrivate::List<>,void> qobjectdefs_impl.h:168
QtPrivate::QSlotObject<void (__cdecl QgsMapRendererSequentialJob::*)(void) __ptr64,QtPrivate::List<>,void>::impl qobjectdefs_impl.h:397
QMetaObject::activate :
QgsMapRendererJob::finished moc_qgsmaprendererjob.cpp:145
QgsMapRendererCustomPainterJob::futureFinished qgsmaprenderercustompainterjob.cpp:212
QtPrivate::FunctorCall<QtPrivate::IndexesList<>,QtPrivate::List<>,void,void (__cdecl QgsMapRendererCustomPainterJob::*)(void) __ptr64>::call qobjectdefs_impl.h:134
QtPrivate::FunctionPointer<void (__cdecl QgsMapRendererCustomPainterJob::*)(void) __ptr64>::call<QtPrivate::List<>,void> qobjectdefs_impl.h:168
QtPrivate::QSlotObject<void (__cdecl QgsMapRendererCustomPainterJob::*)(void) __ptr64,QtPrivate::List<>,void>::impl qobjectdefs_impl.h:397
QMetaObject::activate :
QFutureWatcherBase::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify qgsapplication.cpp:366
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
TranslateMessageEx :
TranslateMessage :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main main.cpp:1524
WinMain mainwin.cpp:170
__scrt_common_main_seh exe_common.inl:253
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info
QGIS Version: 3.7.0-Master
QGIS code revision: 34a0650
Compiled against Qt: 5.11.2
Running against Qt: 5.11.2
Compiled against GDAL: 2.4.0
Running against GDAL: 2.4.0

System Info
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 6.1.7601

@qgib
Copy link
Contributor Author

qgib commented Mar 5, 2019

Author Name: Roberto Uhlig (@uhliro26)


  • 14523 was configured as 3dproject.qgz

  • 3dproject.qgz (Roberto Uhlig) - debug output from windows dbgview

@qgib
Copy link
Contributor Author

qgib commented Mar 5, 2019

Author Name: Roberto Uhlig (@uhliro26)


  • 14524 was configured as 3dproject_dbgview.LOG

  • 3dproject_dbgview.LOG (Roberto Uhlig) - debug output from windows dbgview (previous I took the wrong file)

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority 3D Relates to QGIS' 3D engine or rendering Regression Something which used to work, but doesn't anymore labels May 25, 2019
@wonder-sk
Copy link
Member

Probably the same issue as #26706

wonder-sk added a commit to wonder-sk/QGIS that referenced this issue May 29, 2019
Redering of WCS layers has been quite inefficient since introduction
of multi-threaded rendering in QGIS 2.4: whenever map rendering was
starting, copying of WCS provider involved running full initialization
of WCS provider which typically does three(!) network requests
in the constructor (get capabilities + 2x check to work around some
incompatibilities of WCS servers). This was both slow and potentially
dangerous because of embedded QEventLoop for the network requests.

This is now gone and when WCS provider gets cloned (e.g. when starting
map rendering), it just gets copy of data without any extra work.

Avoiding embedded QEventLoop fixes a crash in 3D view when loading tiles.
Fixes qgis#28800
Fixes qgis#26706
@wonder-sk
Copy link
Member

With 8x vertical scaling of terrain, Netherlands looks like a hilly country :-)

image

@wonder-sk wonder-sk self-assigned this May 29, 2019
wonder-sk added a commit that referenced this issue May 30, 2019
Redering of WCS layers has been quite inefficient since introduction
of multi-threaded rendering in QGIS 2.4: whenever map rendering was
starting, copying of WCS provider involved running full initialization
of WCS provider which typically does three(!) network requests
in the constructor (get capabilities + 2x check to work around some
incompatibilities of WCS servers). This was both slow and potentially
dangerous because of embedded QEventLoop for the network requests.

This is now gone and when WCS provider gets cloned (e.g. when starting
map rendering), it just gets copy of data without any extra work.

Avoiding embedded QEventLoop fixes a crash in 3D view when loading tiles.
Fixes #28800
Fixes #26706
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3D Relates to QGIS' 3D engine or rendering Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants