minorua / Qgis2threejs

3D map visualization and web export plugin for QGIS
http://minorua.github.io/Qgis2threejs/docs/
GNU General Public License v2.0
512 stars 91 forks source link

Qgis2threejs causes QGIS to crash during export 3d file (ubuntu 16.04) #90

Open hpella opened 7 years ago

hpella commented 7 years ago

I have problem when I try to create a html 3d view with Qgis2threejs systematically, Qgis crash during export phase

the plugin begin to create a file (.js type) with the code

// Qgis2threejs Project project = new Q3D.Project({crs:"EPSG:2154",wgs84Center:{lat:45.9456388959,lon:5.25294007162},proj:"+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs",title:"ain",baseExtent:[873585.264755,6540007.62411,875435.210047,6541845.87569],rotation:0,zShift:0.0,width:100.0,zExaggeration:1.5});

// Layer 0 lyr = project.addLayer(new Q3D.DEMLayer({q:1,shading:true,type:"dem",name:"diff_q60"}));

and no more (no html file created) I have this problem on 2 differents computers with the same configuration

System : ubuntu 16.04 Qgis 2.18.3 Qgis2threejs : 1.4

This problem doesn't exist under ubuntu 14.04. Do you know a solution for this problem ? Thanks for this plugin

tomchadwin commented 7 years ago

Is this the same QtWebkit issue that other plugins have faced? See eg https://github.com/tomchadwin/qgis2web/issues/309

minorua commented 7 years ago

@tomchadwin This plugin version doesn't use QtWebkit.

Say-no commented 7 years ago

Hi Akagi-san,

I met the same problem last Saturday. The problem occurred on QGIS 2.18.12 and Qgis2threejs 1.4.2, Ubuntu 16.04. The "segmentation fault" message was displayed in the terminal. It worked well when I use the same DEM data on QGIS 2.18.12 from OSGeo4W and Qgis2threejs 1.4.2, Windows10 pro 64bit.

Thank you for this plugin.

Best Regards, Say-no

TheDude005 commented 7 years ago

I have the same issue with running it on Ubuntu 16.04, it worked well with the previous version of Ubuntu so something must have changed with this version.

GKestel commented 7 years ago

I'm facing the same problems; QGis 2.18.11 and 2.18.13 is aborting, after starting the export of a 3D-View, using a DEM (qgis2threejs v. 1.4.2, Ubuntu 16.04, 64bit); Export of "flat plane" works. Former versions of QGis worked fine.

marlin-mixon commented 7 years ago

I've got the same problem. Like GKestel, I am able to export a flat plane but exporting a DEM results in a seg fault. QGis is 2.18.13, qgis2threejs is 1.4.2. I'm using Linux Mint 18 which is based on Ubuntu Xenial, i.e. 16.04. Running ScyPy v0.17.

I'm currently running python 2.7. I ran a stack trace and not totally sure how to interpret it but it seems to suggest that the problem is related to a SciPy operation. Prior to the crash I see a preliminary 5% processed being displayed (actual processing or is that what the display gets initialized to?)

I am using ubuntu's apport tools to generate the stack trace: https://wiki.ubuntu.com/Apport

I did get some output written to my output file: project and lyr lines:

// Qgis2threejs Project project = new Q3D.Project({crs:"EPSG:4326",wgs84Center:{lat:34.3375,lon:-117.921527778},proj:"+proj=longlat +datum=WGS84 +no_defs",title:"xyz",baseExtent:[-118.434861111,34.0460657371,-117.408194444,34.6289342629],rotation:0,zShift:0.0,width:100.0,zExaggeration:1.5});

// Layer 0 lyr = project.addLayer(new Q3D.DEMLayer({q:1,shading:true,type:"dem",name:"20171015005117_400674754"}));

benhur07b commented 6 years ago

Hi @minorua. First of all, thank you for this plugin. I just wanted to update you on the status of the plugin on Ubuntu 16.04 and QGIS 2.18.14.

Same issues as the rest of them. The plugin crashes when exporting a DEM. OS: Ubuntu 16.04 QGIS 2.18.14 Qgis2threejs 1.4.2

Here's the stack trace of the crash.

#0  0x00007fff528d5f30 in GDALRasterBand::ReportError(CPLErr, int, char const*, ...) () from /usr/lib/libgdal.so.20
#1  0x00007fff528d774d in GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int, int, GDALDataType, long long, long long, GDALRasterIOExtraArg*) () from /usr/lib/libgdal.so.20
#2  0x00007fff5337b0ff in ?? () from /usr/lib/python2.7/dist-packages/osgeo/_gdal.x86_64-linux-gnu.so
#3  0x00007fff5c5f2751 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#4  0x00007fff5c71b01c in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#5  0x00007fff5c5f0cfd in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#6  0x00007fff5c5f0e24 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#7  0x00007fff5c5f0e24 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#8  0x00007fff5c71b01c in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#9  0x00007fff5c5f0cfd in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#10 0x00007fff5c71b01c in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#11 0x00007fff5c5f0cfd in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#12 0x00007fff5c71b01c in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#13 0x00007fff5c6712e0 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#14 0x00007fff5c6441e3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#15 0x00007fff5c6b831c in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#16 0x00007fff5c6441e3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#17 0x00007fff5c71a447 in PyEval_CallObjectWithKeywords () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#18 0x00007fff5c0a3280 in sip_api_invoke_slot_ex () from /usr/lib/python2.7/dist-packages/sip.x86_64-linux-gnu.so
#19 0x00007fff5bdafba2 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
#20 0x00007fff5bdaff3d in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
#21 0x00007fff5bdb0b9d in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
#22 0x00007ffff5a4d166 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#23 0x00007ffff5423d12 in QAbstractButton::clicked(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#24 0x00007ffff51592b3 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#25 0x00007ffff515a664 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#26 0x00007ffff515a774 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#27 0x00007fff5b6894cb in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
#28 0x00007ffff4dd58d0 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#29 0x00007fff5b6e609b in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
#30 0x00007ffff4d7efdc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#31 0x00007ffff4d860d6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#32 0x00007ffff60b8e6b in QgsApplication::notify(QObject*, QEvent*) () from /usr/lib/libqgis_core.so.2.18.14
#33 0x00007ffff5a3890d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#34 0x00007ffff4d856dd in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#35 0x00007ffff4e033f2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#36 0x00007ffff4e02c83 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#37 0x00007ffff4e2c542 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#38 0x00007fffed790197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007fffed7903f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007fffed79049c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007ffff5a692ae in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#42 0x00007ffff4e2c616 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#43 0x00007ffff5a3718f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#44 0x00007ffff5a374f5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#45 0x00007ffff5261a3c in QDialog::exec() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#46 0x00007fff5b6aac45 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
#47 0x00007fff5c5f2751 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#48 0x00007fff5c71b01c in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#49 0x00007fff5c6712e0 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
---Type <return> to continue, or q <return> to quit---
#50 0x00007fff5c6441e3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#51 0x00007fff5c6b831c in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#52 0x00007fff5c6441e3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#53 0x00007fff5c71a447 in PyEval_CallObjectWithKeywords () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#54 0x00007fff5c0a3280 in sip_api_invoke_slot_ex () from /usr/lib/python2.7/dist-packages/sip.x86_64-linux-gnu.so
#55 0x00007fff5bdafba2 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
#56 0x00007fff5bdaff3d in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
#57 0x00007fff5bdb0b9d in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
#58 0x00007ffff5a4d166 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#59 0x00007ffff4d78d62 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#60 0x00007ffff4d7a0b3 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#61 0x00007ffff51db9fd in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#62 0x00007ffff51dfde9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#63 0x00007ffff4dd58d0 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#64 0x00007ffff51e3ffb in QMenu::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#65 0x00007ffff4d7efdc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#66 0x00007ffff4d860d6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#67 0x00007ffff60b8e6b in QgsApplication::notify(QObject*, QEvent*) () from /usr/lib/libqgis_core.so.2.18.14
#68 0x00007ffff5a3890d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#69 0x00007ffff4d856dd in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#70 0x00007ffff4e03d7c in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#71 0x00007ffff4e02c83 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#72 0x00007ffff4e2c542 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#73 0x00007fffed790197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#74 0x00007fffed7903f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#75 0x00007fffed79049c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#76 0x00007ffff5a692ce in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#77 0x00007ffff4e2c616 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#78 0x00007ffff5a3718f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#79 0x00007ffff5a374f5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#80 0x00007ffff5a3d4b9 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#81 0x000055555555aa9b in ?? ()
#82 0x00007ffff4278830 in __libc_start_main (main=0x555555558ee0, argc=1, argv=0x7fffffffd998, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd988)
    at ../csu/libc-start.c:291
#83 0x000055555555eba9 in _start ()

Any ideas how to solve the issue or what causes it? I can try to help/implement them if you do.

I'll try to check on Windows if the same issue occurs. I see that you've started updating the plugin for QGIS 3. Is the plugin working on the nightly builds? I can check if the same issue also occurs there.

Thanks!

UPDATE: Plugin is working on Windows 10, QGIS 2.18.13 and qgis2threejs 1.4.2. This seems like an Ubuntu problem (IDK about other distros yet).

mrksgit commented 6 years ago

Any solution for this issue? I have Xubuntu Xenial 16.04 LTS, QGIS 2.18.16 and qgis2threejs v. 1.4.2 and same crash (terminal says segmentation fault) when processing a DEM.

mrksgit commented 6 years ago

I managed to get rid of the seg fault crash of QGIS2ThreeJS-plugin under Xenial 16.04 LTS and QGIS 2.18.16.

my steps

  1. uninstall qgis and remove all packages with apt-get autoremove and apt-get autoclean (you might check with a package-manager like synaptic for any left over packages related to qgis)
  2. removed the ppa: http://ppa.launchpad.net/ubuntugis/ppa/ubuntu
  3. added the ppa: https://qgis.org/debian
  4. installed qgis from the qgis.org/debian ppa result: no more crashing when using the plugin on 2.18.16 with a custom DEM on xubuntu 16.04

anyone can confirm this?

cubarro commented 6 years ago

Dear @mrksgit I removed & purged Qgis, updated system, upgraded, changed repository to qgis.org/debian, updated system, installed Qgis 2.18.16 and segmentation problem persists in Linux Mint 18.3 64 bits LTS. Two days ago it was working just perfect, now only fault. Did I missed something?

mrksgit commented 6 years ago

I can reproduce this/another segfault error with xubuntu 18.04.1 and qgis 3.2 when I have a certain Symbology activated. I guess it's a combination of the data and the rule-based symbology (somethin with "IS NOT NULL AND FIELD1 IS NULL" etc. Didn't checked out what exactly is the reason, but when i replace my rule-based layer-symbology with just a single symbol the segfault with the same data does not appear. So give it a try and reduce "the complexity". ;-)