当我在KDE的QT中打开项目时,我遇到了seg错误。 错误是:
QtCreator(20093)/ findLibraryInternal: plugins should not have a 'lib' prefix: "libkfilemodule.so"
QtCreator(20093)/ KPluginLoader::load: The plugin "libkfilemodule" doesn't contain a kde_plugin_verification_data structure
kdeinit4: Communication error with launcher. Exiting!
kdeinit4: Communication error with launcher. Exiting!
Segmentation fault (core dumped)
Stack is:
(gdb) where
#0 0x00007ffff66eaec1 in QDataStream::operator>>(int&) () from /opt/QtSDK/QtCreator/bin/../lib/qtcreator/libQtCore.so.4
#1 0x0000003112d18840 in KMimeTypeFactory::KMimeTypeFactory() () from /usr/lib64/libkdecore.so.5
#2 0x0000003112d18cda in KMimeTypeFactory::self() () from /usr/lib64/libkdecore.so.5
#3 0x0000003112d1f3b2 in KMimeType::buildDefaultType() () from /usr/lib64/libkdecore.so.5
#4 0x0000003112d1fc9d in KMimeType::checkEssentialMimeTypes() () from /usr/lib64/libkdecore.so.5
#5 0x0000003112d218de in KMimeType::findByUrlHelper(KUrl const&, unsigned int, bool, QIODevice*, int*) () from /usr/lib64/libkdecore.so.5
#6 0x0000003112d2234b in KMimeType::findByUrl(KUrl const&, unsigned int, bool, bool, int*) () from /usr/lib64/libkdecore.so.5
#7 0x0000003112d223b2 in KMimeType::iconNameForUrl(KUrl const&, unsigned int) () from /usr/lib64/libkdecore.so.5
#8 0x00000031180def55 in KIO::pixmapForUrl(KUrl const&, unsigned int, KIconLoader::Group, int, int, QString*) () from /usr/lib64/libkio.so.5
#9 0x000000311c65a853 in KFileWidget::KFileWidget(KUrl const&, QWidget*) () from /usr/lib64/libkfile.so.4
#10 0x00007fffba74aa14 in ?? () from /usr/lib64/kde4/libkfilemodule.so
#11 0x00000031181df118 in KFileDialog::KFileDialog(KUrl const&, QString const&, QWidget*, QWidget*) () from /usr/lib64/libkio.so.5
#12 0x00000031181e366a in ?? () from /usr/lib64/libkio.so.5
#13 0x00007ffff756365c in QFileDialog::getOpenFileNames(QWidget*, QString const&, QString const&, QString const&, QString*, QFlags<QFileDialog::Option>) () from /opt/QtSDK/QtCreator/bin/../lib/qtcreator/libQtGui.so.4
#14 0x00007fffef0d8a44 in Core::FileManager::getOpenFileNames(QString const&, QString, QString*) () from /opt/QtSDK/QtCreator/lib/qtcreator/plugins/Nokia/libCore.so
#15 0x00007fffe924c29a in ProjectExplorer::ProjectExplorerPlugin::openOpenProjectDialog() () from /opt/QtSDK/QtCreator/lib/qtcreator/plugins/Nokia/libProjectExplorer.so
#16 0x00007fffde875bba in ?? () from /opt/QtSDK/QtCreator/lib/qtcreator/plugins/Nokia/libWelcome.so
#17 0x00007fffe8e6224b in QDeclarativeObjectMethodScriptClass::callMethod(QObject*, int, int, int, int*, QScriptContext*) () from /opt/QtSDK/QtCreator/lib/qtcreator/plugins/Nokia/../../libQtDeclarative.so.4
#18 0x00007fffe8e62b1f in QDeclarativeObjectMethodScriptClass::callPrecise(QObject*, QDeclarativePropertyCache::Data const&, QScriptContext*) () from /opt/QtSDK/QtCreator/lib/qtcreator/plugins/Nokia/../../libQtDeclarative.so.4
#19 0x00007fffe8e63717 in QDeclarativeObjectMethodScriptClass::call(QScriptDeclarativeClass::Object*, QScriptContext*) () from /opt/QtSDK/QtCreator/lib/qtcreator/plugins/Nokia/../../libQtDeclarative.so.4
#20 0x00007fffee2e7a35 in QScript::DeclarativeObjectDelegate::call(QTJSC::ExecState*, QTJSC::JSObject*, QTJSC::JSValue, QTJSC::ArgList const&) () from /opt/QtSDK/QtCreator/lib/qtcreator/plugins/Nokia/../../libQtScript.so.4
#21 0x00007fffee1d070f in QTJSC::NativeFuncWrapper::operator()(QTJSC::ExecState*, QTJSC::JSObject*, QTJSC::JSValue, QTJSC::ArgList const&) const () from /opt/QtSDK/QtCreator/lib/qtcreator/plugins/Nokia/../../libQtScript.so.4
#22 0x00007fffee1a3b07 in cti_op_call_NotJSFunction () from /opt/QtSDK/QtCreator/lib/qtcreator/plugins/Nokia/../../libQtScript.so.4
#23 0x00007fffdc02c31b in ?? ()
#24 0x0000000000000000 in ?? ()
我也尝试过创建softlink:
ln -s libkfilemodule.so kfilemodule.so
,但仍然遇到同样的问题。
答案 0 :(得分:0)
如果您遇到Qt 4.6并且无法升级到更新的一组库...
基本上最简单的解决方法是,如果您有权访问源代码,则停止使用QFileDialog
调用。我用QInputDialog::getText
替换了我的,现在没有更多的seg错误!
此错误报告也谈到了它:
https://bugs.kde.org/show_bug.cgi?id=210904(包含有关相关修订的信息)
和这一个:
https://bugs.kde.org/show_bug.cgi?id=203205
希望有所帮助。