webengine part

René J.V. Bertin rjvbertin at gmail.com
Fri Jan 6 18:10:01 UTC 2017


On Friday January 6 2017 18:42:22 Kevin Funk wrote:

>> among the internal options to open an SVG file. That's Konqueror's
>> webengine KPart. Sure enough KDevelop crashed immediately when I tried to
>> use it because of a shared OpenGL context issue that requires setting

I didn't have the exact terminal message earlier: this is what I see (on Linux):
Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication.
QWidget(0x0) KDevelop::PartController(0x1b5bfc0, name = "PartController")
QObject::connect: Cannot connect (null)::destroyed(QObject*) to WebEngineFactory::slotDestroyed(QObject*)
WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
[0106/185838:ERROR:nss_util.cc(839)] After loading Root Certs, loaded==false: NSS error code: -8018
QUrl("file:///home/bertin/work/src/Scratch/KDE/KF5/kvantum-git/Kvantum/themes/kvthemes/KvAmbiance/KvAmbiance.svg")
Part ' "" ' has a widget  "webenginepart"  with a focus policy of NoFocus. It should have at least a ClickFocus policy, for part activation to work well. 

KCrash: Application 'kdevelop5' crashing...
KCrash: Attempting to start /opt/local/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit
sock_file=/run/user/505/kdeinit5__0

See also https://bugs.kde.org/show_bug.cgi?id=374258

>
>... backtrace?

https://paste.kde.org/plrkruven/sf518e
Looks the same as the backtrace on BKO above.

>> QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
>
>Shouldn't be our job to set this, right?

See the above message which AFAIK comes from QtWebEngine itself. The only alternative would be to set the attribute in a load handler of the KParts framework (hoping it will indeed always be loaded before creating a QGuiApplication). Or patch Qt to set it globally.

Cheers,
R.


More information about the KDevelop-devel mailing list