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

Crashes on QGIS 2.16 in Xenial #309

Closed
ebrelsford opened this issue Jul 13, 2016 · 88 comments
Closed

Crashes on QGIS 2.16 in Xenial #309

ebrelsford opened this issue Jul 13, 2016 · 88 comments
Labels

Comments

@ebrelsford
Copy link

On upgrading to QGIS 2.16, QGIS now crashes when I open the qgis2web dialog (Web > qgis2web > Create web map). I've tried uninstalling and re-installing the plugin but it hasn't improved the situation.

@tomchadwin
Copy link
Collaborator

Hrm - not good. Can you follow the steps for "Reporting bugs" listed in the README. Specifically, can you narrow it down to a single layer which causes the problem? I'f you can, then upload the layer so I can try it - I've not had a QGIS crash on 2.16 myself.

@ebrelsford
Copy link
Author

Sorry I missed the instructions in the README.

  • Installed qgis2web: v1.11.0
  • I'm not sure how to see the stack trace when QGIS crashes outright, glad to get that though. Is there a log file I'm not aware of?

This happens for any data that I use, and I've tried a variety of file types and CRSs. Please let me know if there is anything else I can try.

@tomchadwin
Copy link
Collaborator

What OS are you on?

@ebrelsford
Copy link
Author

Ubuntu 16.04.

@tomchadwin
Copy link
Collaborator

OK, in a terminal, try:

gdb qgis 
run

Cause the crash, and then in that same terminal, type bt. Can you paste the output here?

@boesiii
Copy link
Contributor

boesiii commented Jul 13, 2016

I think most of these types of problems result from q2w not handling a layer properly . Would it be possible to wrap the preview code in a "try" statement and if it fails try to catch which layer it failed on. I don't have much time at the moment to look at the preview code.

@tomchadwin
Copy link
Collaborator

tomchadwin commented Jul 13, 2016

Will a Python try trap a QGIS crash?

@boesiii
Copy link
Contributor

boesiii commented Jul 13, 2016

Woops. Probably not.

@ebrelsford
Copy link
Author

Okay here's a stack trace from gdb, immediately after selecting the Create web map menu item:

Thread 1 "qgis.bin" received signal SIGSEGV, Segmentation fault.
0x00007ffff5b3a265 in QString::remove(QChar, Qt::CaseSensitivity) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4

#0  0x00007ffff5b3a265 in QString::remove(QChar, Qt::CaseSensitivity) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#1  0x00007fffab6c48d2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#2  0x00007fffabcc5789 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#3  0x00007fffabcc58f4 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#4  0x00007fffabcff205 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#5  0x00007fffabcfc59d in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#6  0x00007fffabce38b6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#7  0x00007fffabce298f in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#8  0x00007fffabcb5615 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#9  0x00007fffabccf5b8 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#10 0x00007fffabccf62e in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#11 0x00007fffabceac28 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#12 0x00007fffabcf23f3 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#13 0x00007fffab6cfcb1 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#14 0x00007fffabcf0d71 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#15 0x00007fffabcd075d in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#16 0x00007fffabcd09ac in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#17 0x00007fffabcd11b1 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#18 0x00007fffab6802e5 in QWebFrame::load(QNetworkRequest const&, QNetworkAccessManager::Operation, QByteArray const&) () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#19 0x00007fffab68136b in QWebFrame::load(QUrl const&) () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#20 0x00007fffab68151b in QWebFrame::setUrl(QUrl const&) () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#21 0x00007fffad7ad7e5 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtWebKit.so
#22 0x00007fffb270c5b9 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#23 0x00007fffb283527c in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#24 0x00007fffb2799060 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#25 0x00007fffb276bf03 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#26 0x00007fffb27d27ec in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#27 0x00007fffb276bf03 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#28 0x00007fffb2708f7c in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#29 0x00007fffb270ac69 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#30 0x00007fffb283527c in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#31 0x00007fffb2799060 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#32 0x00007fffb276bf03 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#33 0x00007fffb27d27ec in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#34 0x00007fffb276bf03 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#35 0x00007fffb277efad in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#36 0x00007fffb274018f in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#37 0x00007fffb276bf03 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#38 0x00007fffb2708f7c in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#39 0x00007fffb283527c in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#40 0x00007fffb2799060 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#41 0x00007fffb276bf03 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#42 0x00007fffb27d27ec in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#43 0x00007fffb276bf03 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#44 0x00007fffb28346a7 in PyEval_CallObjectWithKeywords () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#45 0x00007fffb2340280 in sip_api_invoke_slot_ex () from /usr/lib/python2.7/dist-packages/sip.x86_64-linux-gnu.so
#46 0x00007fffb204cba2 in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
#47 0x00007fffb204cf3d in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
#48 0x00007fffb204db9d in ?? () from /usr/lib/python2.7/dist-packages/PyQt4/QtCore.so
#49 0x00007ffff5c0d166 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#50 0x00007ffff4f38d62 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#51 0x00007ffff4f3a0b3 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#52 0x00007ffff539b9fd in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#53 0x00007ffff539fde9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#54 0x00007ffff4f958d0 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#55 0x00007ffff53a3ffb in QMenu::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#56 0x00007ffff4f3efdc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#57 0x00007ffff4f460d6 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#58 0x00007ffff626f32b in QgsApplication::notify(QObject*, QEvent*) () from /usr/lib/libqgis_core.so.2.16.0
#59 0x00007ffff5bf890d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#60 0x00007ffff4f456dd in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#61 0x00007ffff4fc3d7c in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#62 0x00007ffff4fc2c83 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#63 0x00007ffff4fec542 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#64 0x00007fffefe431a7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#65 0x00007fffefe43400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#66 0x00007fffefe434ac in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#67 0x00007ffff5c292ae in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#68 0x00007ffff4fec616 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#69 0x00007ffff5bf718f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#70 0x00007ffff5bf74f5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#71 0x00007ffff5bfd4b9 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#72 0x000055555555a69b in ?? ()
#73 0x00007ffff4439830 in __libc_start_main (main=0x555555558ae0, argc=1, argv=0x7fffffffc698, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffc688) at ../csu/libc-start.c:291
#74 0x000055555555e7a9 in _start ()

@tomchadwin
Copy link
Collaborator

Perfect - thanks. The bad news is that I don't know how to decipher one of these. The good news is that there have been other plugin segfaults involving QtWebKit. The bad news is that there has been no fix or workaround suggested yet. I'll report this on the QGIS developer mailing list, and see what comes of it.

@ebrelsford
Copy link
Author

Thanks @tomchadwin. FWIW, I have tried wiping out ~/.qgis2 and ~/.config/QGIS to no avail. I can look into Qt a little more.

@tomchadwin
Copy link
Collaborator

@tomchadwin
Copy link
Collaborator

Notice that the other reports are also 2.16 on 16.04. I hope one of the QGIS devs can help (nudge: @m-kuhn).

@ebrelsford
Copy link
Author

At least we're not alone! I've looked into all the libqt packages I might upgrade but they were all at their latest versions, so not sure what else I might do there. Thanks again for taking a look.

@tomchadwin
Copy link
Collaborator

You're not on Qt5, are you?

@ebrelsford
Copy link
Author

Nope, Qt4.

@tomchadwin
Copy link
Collaborator

OK, good. Let's see if we get any suggestions. Thanks for your patience.

@lucacasagrande
Copy link
Contributor

Just as feedback, I have compiled QGIS 2.16 on Ubuntu 16.04 and there is no error.

@m-kuhn
Copy link
Contributor

m-kuhn commented Jul 13, 2016

@lucacasagrande if you compile with -DWITH_QTWEBKIT=OFF also?

@tomchadwin
Copy link
Collaborator

@ebrelsford How did you upgrade QGIS? Which repository did you get it from?

@ebrelsford
Copy link
Author

@lucacasagrande
Copy link
Contributor

@m-kuhn Yes with -DWITH_QTWEBKIT=OFF it crashes.

@m-kuhn
Copy link
Contributor

m-kuhn commented Jul 13, 2016

Looks like 2 issues then

  • Ubuntu packaging needs not be done without QtWebkit
  • Something strange happens without webkit (but that's only for the 2 debian testing users out there anyway)

@tomchadwin
Copy link
Collaborator

@ebrelsford Are you still getting this crash? @m-kuhn Any idea if 2.16 has been repackaged to fix this? @jef-n?

@jef-n
Copy link
Contributor

jef-n commented Jul 22, 2016

Fix what?

@tomchadwin
Copy link
Collaborator

tomchadwin commented Jul 22, 2016

See this issue (above), or this thread on the dev list:

https://lists.osgeo.org/pipermail/qgis-developer/2016-July/043733.html

Summary (maybe incorrect - I'm very much not an expert in this):

  • Ubuntu 16.04 users get crashes in 2.16 with plugins which use QtWebKit
  • @lucacasagrande has confirmed that the crash occurs when 2.16 is built -DWITH_QTWEBKIT=OFF
  • Does a repackaged version need to be built without -DWITH_QTWEBKIT=OFF for the 16.04 repo(s)?

Thanks

@tomchadwin
Copy link
Collaborator

No, not occurring to @lucacasagrande, above:

"Yes with -DWITH_QTWEBKIT=OFF it crashes."
(#309 (comment))

@robinpaulson
Copy link

@robinpaulson
Copy link

I wonder if this is related to header files at build time. If python-qt4-dev (or whatever the package is) doesn't have a .h file for pyqt4 webkit, QGIs won't be built for it. If QGIS is built on Stretch, then no matter whether the library is there or not (as in Ubuntu Xenial), QGIS won't reference it.

@tomchadwin tomchadwin changed the title Crashes on QGIS 2.16 Crashes on QGIS 2.16 in Xenial Sep 13, 2016
@robinpaulson
Copy link

I got the new release today, it's still crashing on Xenial.

@tomchadwin
Copy link
Collaborator

@tudorbarascu @jef-n @m-kuhn

@robinpaulson is still getting crashes with QtWebkit with the latest nightly. Any ideas why?

@robinpaulson
Copy link

robinpaulson commented Sep 15, 2016

Oh, sorry, I wasn't clear. I'm using the new release of qgis2web, I'm still using QGIS 2.16.2, not the nightly.

@tomchadwin
Copy link
Collaborator

@robinpaulson OK, got it. It's still an issue, though. Nothing I can do in qgis2web will fix this. So, apologies, but new qgis2web releases won't help. It can only be solved at the QGIS level.

@robinpaulson
Copy link

OK, which nigtly do I need, the one for 2.16.3, or for 2.17?

http://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu

@dpsspatial
Copy link

All: I've upgraded to 2.14.5 and things are back working again - can anyone else verify?

@tomchadwin
Copy link
Collaborator

I thought 2.14 was never affected, and this was only an issue with 2.16.

@dpsspatial
Copy link

AARGH sorry my mistake... confusing versions...

@boesiii
Copy link
Contributor

boesiii commented Nov 4, 2016

Why not just wrap the preview window and update button in a python TRY statement?

@tomchadwin
Copy link
Collaborator

I can have a go at that, but because the error is not a Python error, I'm not sure it will work.

@mbernasocchi
Copy link
Contributor

well it is sort of a python error, if you don't ask in python for a webkit then you don't have any problems. the important thing, is to wrap the imports.

BTW yakety is also affected, but the next nightly should fix this thanks to @jef-n

@mbernasocchi
Copy link
Contributor

implemented the above in #360

@tomchadwin
Copy link
Collaborator

I've merged @mbernasocchi's PR. Can Xenial/Yakkety users please test master, and let us know how things work? I'd appreciate a couple of screenshots so I can see how it all holds together. Thanks for the contribution, Marco!

@tomchadwin
Copy link
Collaborator

And thanks to @boesiii for suggesting the same solution - you were right and I was wrong, so many thanks, Ed!

@dpsspatial
Copy link

Just tested on Linux Mint 18 (xenial) w/ QGIS 2.18 and things are working fine!!! Great work!

@tomchadwin
Copy link
Collaborator

I accidentally deleted @mbernasocchi's fix for this by using the .ui file to regenerate the Python GUI. I think it's fixed now.

@mbernasocchi did you fix the .ui file as well, or just the Python files?

@tomchadwin tomchadwin reopened this Jan 16, 2017
@tomchadwin
Copy link
Collaborator

I'll close this off - I made some tweaks to get the preview and dev bar working again. I don't know if the .ui is now outdated, and we will have to edit the generated python ui file instead from now on.

@mbernasocchi
Copy link
Contributor

mbernasocchi commented Mar 15, 2017

hi @tomchadwin I don't think I changed the UI, https://github.com/tomchadwin/qgis2web/pull/360/files

@tomchadwin
Copy link
Collaborator

No, that's what I mean. We can't generate the Python UI from the .ui now.

@andreaordonselli
Copy link
Collaborator

I have just released version 3.19.0, which excluded WIKI and Preview functionality for Linux users who are unable to install and use QtWebKit, so the plugin will launch and be usable without these features

Shortly, the update will be available within the QGIS plugin repository.

Thank you for using the plugin.

I would greatly appreciate it if you would consider donating a virtual coffee through the button on the homepage to support the development of qgis2web.

Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests