Bug 386527 - kdevelop crashes on startup -- "Failed to create OpenGL context"
Summary: kdevelop crashes on startup -- "Failed to create OpenGL context"
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 5.0.3
Platform: Debian stable Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2017-11-04 16:18 UTC by Joachim Reichel
Modified: 2018-04-09 18:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.2.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Reichel 2017-11-04 16:18:20 UTC
Application: kdevelop (5.0.3)

Qt Version: 5.7.1
Frameworks Version: 5.28.0
Operating System: Linux 4.9.0-3-amd64 x86_64
Distribution: Debian GNU/Linux 9.1 (stretch)

-- Information about the crash:
- What I was doing when the application crashed:

I simply started kdevelop. Console output:

Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 1, profile  0) 
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kdevelop path = /usr/bin pid = 26329
KCrash: Arguments: /usr/bin/kdevelop 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f8d460b3080 (LWP 25890))]

Thread 5 (Thread 0x7f8d2ced9700 (LWP 25914)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f8d63c4dc6b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f8d59785dd6 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#3  0x00007f8d5975b382 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#4  0x00007f8d5975c53c in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#5  0x00007f8d5975d0b6 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#6  0x00007f8d5975d2fe in QQmlImports::addLibraryImport(QQmlImportDatabase*, QString const&, QString const&, int, int, QString const&, QString const&, bool, QList<QQmlError>*) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#7  0x00007f8d59728c2e in QQmlTypeLoader::Blob::addImport(QV4::CompiledData::Import const*, QList<QQmlError>*) () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#8  0x00007f8d597293d3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#9  0x00007f8d59729a68 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#10 0x00007f8d59723379 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#11 0x00007f8d59723b21 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#12 0x00007f8d59724c6e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#13 0x00007f8d59724cbd in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#14 0x00007f8d59785a04 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#15 0x00007f8d5978606a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#16 0x00007f8d646ffb8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007f8d64707341 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f8d63e1c9e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007f8d63e1f16d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007f8d63e70c43 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007f8d5ae9a7f7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007f8d5ae9aa60 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007f8d5ae9ab0c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f8d63e7104f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007f8d63e1a9ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007f8d63c480f3 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007f8d597856a5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#28 0x00007f8d63c4cda8 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007f8d5d3a0494 in start_thread (arg=0x7f8d2ced9700) at pthread_create.c:333
#30 0x00007f8d63565aff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 4 (Thread 0x7f8d40ccf700 (LWP 25894)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
#1  0x00007f8d63c4dba6 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007f8d61667518 in KDevelop::DUChainPrivate::CleanupThread::run (this=0x55a098712e80) at ./language/duchain/duchain.cpp:282
#3  0x00007f8d63c4cda8 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f8d5d3a0494 in start_thread (arg=0x7f8d40ccf700) at pthread_create.c:333
#5  0x00007f8d63565aff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 3 (Thread 0x7f8d42050700 (LWP 25893)):
#0  0x00007f8d5ae9a56a in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f8d5ae9aa60 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f8d5ae9ab0c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f8d63e7106b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f8d63e1a9ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f8d63c480f3 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f8d65f1f6d5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007f8d63c4cda8 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f8d5d3a0494 in start_thread (arg=0x7f8d42050700) at pthread_create.c:333
#9  0x00007f8d63565aff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 2 (Thread 0x7f8d43a21700 (LWP 25891)):
#0  0x00007f8d6355c6ad in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f8d54e89150 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f8d54e8aee9 in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f8d45b76b69 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007f8d63c4cda8 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f8d5d3a0494 in start_thread (arg=0x7f8d43a21700) at pthread_create.c:333
#6  0x00007f8d63565aff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 1 (Thread 0x7f8d460b3080 (LWP 25890)):
[KCrash Handler]
#6  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#7  0x00007f8d634b13fa in __GI_abort () at abort.c:89
#8  0x00007f8d63c33561 in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f8d65eaa559 in QQuickWidgetPrivate::handleContextCreationFailure (this=this@entry=0x55a098e22010, format=..., isEs=isEs@entry=false) at qquickwidget.cpp:714
#10 0x00007f8d65eaa8aa in QQuickWidgetPrivate::createContext (this=this@entry=0x55a098e22010) at qquickwidget.cpp:742
#11 0x00007f8d65eab725 in QQuickWidget::resizeEvent (this=0x55a098e21a50, e=<optimized out>) at qquickwidget.cpp:1043
#12 0x00007f8d647476ce in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007f8d646ffb8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007f8d64707341 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007f8d63e1c9e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007f8d6473ff72 in QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007f8d64743e23 in QWidgetPrivate::show_helper() () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f8d64746c75 in QWidget::setVisible(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007f8d6115e3c1 in Sublime::MainWindowPrivate::setBackgroundVisible (this=0x55a097532ed0, v=<optimized out>) at ./sublime/mainwindow_p.cpp:274
#20 0x00007f8d6115e87f in Sublime::MainWindowPrivate::setBackgroundCentralWidget (this=0x55a097532ed0, w=w@entry=0x55a098e21a50) at ./sublime/mainwindow_p.cpp:266
#21 0x00007f8d61158839 in Sublime::MainWindow::setBackgroundCentralWidget (this=this@entry=0x55a0975382d0, w=w@entry=0x55a098e21a50) at ./sublime/mainwindow.cpp:427
#22 0x00007f8d2c4c7ba3 in KDevWelcomePagePlugin::KDevWelcomePagePlugin (this=<optimized out>, parent=<optimized out>) at ./plugins/welcomepage/welcomepageplugin.cpp:37
#23 0x00007f8d2c4c7e0f in KPluginFactory::createInstance<KDevWelcomePagePlugin, QObject> (parentWidget=<optimized out>, parent=<optimized out>, args=...) at /usr/include/KF5/KCoreAddons/kpluginfactory.h:477
#24 0x00007f8d64c4db8b in KPluginFactory::create (this=0x55a098e215f0, iface=0x7f8d65378d08 <qt_meta_stringdata_KDevelop__IPlugin+168> "KDevelop::IPlugin", parentWidget=0x0, parent=0x55a0974f6000, args=..., keyword=...) at ./src/lib/plugin/kpluginfactory.cpp:145
#25 0x00007f8d65a80a9c in KPluginFactory::create<KDevelop::IPlugin> (args=..., parent=0x55a0974f6000, this=0x55a098e215f0) at /usr/include/KF5/KCoreAddons/kpluginfactory.h:495
#26 KDevelop::PluginController::loadPluginInternal (this=0x55a0976f49f0, pluginId=...) at ./shell/plugincontroller.cpp:552
#27 0x000055a096639159 in ?? ()
#28 0x00007f8d6349d2b1 in __libc_start_main (main=0x55a096633040, argc=1, argv=0x7fffc0aea758, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffc0aea748) at ../csu/libc-start.c:291
#29 0x000055a09663938a in _start ()

Possible duplicates by query: bug 384983, bug 382788, bug 378240, bug 377996, bug 377986.

Reported using DrKonqi
Comment 1 Sven Brauch 2017-11-04 17:14:45 UTC
Your OpenGL setup is broken. Try export KDEV_DISABLE_PLUGINS=KDevWelcomePage to work around this.

I think I'll leave this open, it would be good to not crash since this functionality is really not required ...
Comment 2 Joachim Reichel 2017-11-04 18:32:53 UTC
Indeed, this prevents the crash. Thanks for the quick response. Now looking into
the OpenGL setup ...
Comment 3 Joachim Reichel 2017-11-17 17:00:07 UTC
Wasn't the plan to keep this bug open to implement a proper error message and/or prevent the crash if possible?
Comment 4 Kevin Funk 2017-11-17 17:06:07 UTC
Well, right. Reopened.
Comment 5 Sven Brauch 2017-11-17 19:00:36 UTC
Git commit 49b5df418539b97137c2a9c63fa3ce139908e420 by Sven Brauch.
Committed on 17/11/2017 at 19:00.
Pushed by brauch into branch '5.2'.

Use Software scene graph backend for welcome page
Differential Revision: https://phabricator.kde.org/D8872

M  +2    -0    app/CMakeLists.txt
M  +9    -0    app/main.cpp

https://commits.kde.org/kdevelop/49b5df418539b97137c2a9c63fa3ce139908e420