2016-04-16 8 views
1

CygwinでQMLを使用しようとしています。QMLの 'Hello world'よりも小さいコードだけがcygwinでセグメンテーション違反を引き起こします

この非常に単純なコードsimple.qmlを用意しました。

import QtQuick 2.0 
Rectangle { } 

次に、qmlscene-qt5 simple.qmlは、セグメント化エラーを引き起こします。どのようにsegfalutsを避けることができますか?

ソフトウェアのバージョンは以下の通りです:

  • Windowsの場合:2.5.0-1のx86
  • のxorg-サーバー:1.18.2-1
  • 両方8.1 64および10 64原因が
  • Cygwinをセグメンテーションフォールト
  • LibQt5Core5、qt5-宣言型・ツールおよび等:5.5.1-1
  • ちなみに

、このコードは、セグメンテーションフォルトが発生することはありません。

import QtQuick 2.0 
import QtQuick.Window 2.0 
import QtQuick.Controls 1.0 

Window{ 
    title: 'window' 
    Label{ 
     // text: 'hello, world!' 
     // If I uncomment the above line, a segfault emerges. 
    } 
} 

この質問をお読みいただきありがとうございます。

FYI、gdbログを以下に示す。私はgdb /usr/bin/qmlscene-qt5を実行し、segfaultedの後にwhereを調べます。

#0 0xfd6411db in ??() 
#1 0x444f41b6 in gallium_dri!__driDriverGetExtensions_swrast() 
    from C:/cygwin/lib/dri/swrast_dri.so 
#2 0x444f465a in gallium_dri!__driDriverGetExtensions_swrast() 
    from C:/cygwin/lib/dri/swrast_dri.so 
#3 0x4441426d in gallium_dri!__driDriverGetExtensions_swrast() 
    from C:/cygwin/lib/dri/swrast_dri.so 
#4 0x44414ac0 in gallium_dri!__driDriverGetExtensions_swrast() 
    from C:/cygwin/lib/dri/swrast_dri.so 
#5 0x4440bd7d in gallium_dri!__driDriverGetExtensions_swrast() 
    from C:/cygwin/lib/dri/swrast_dri.so 
#6 0x4440c247 in gallium_dri!__driDriverGetExtensions_swrast() 
    from C:/cygwin/lib/dri/swrast_dri.so 
#7 0x44527ca5 in gallium_dri!__driDriverGetExtensions_swrast() 
    from C:/cygwin/lib/dri/swrast_dri.so 
#8 0x442578c6 in gallium_dri!__driDriverGetExtensions_swrast() 
    from C:/cygwin/lib/dri/swrast_dri.so 
#9 0x44228415 in gallium_dri!__driDriverGetExtensions_swrast() 
    from C:/cygwin/lib/dri/swrast_dri.so 
#10 0x44228941 in gallium_dri!__driDriverGetExtensions_swrast() 
    from C:/cygwin/lib/dri/swrast_dri.so 
#11 0x6727f40f in QOpenGLFunctions::glDrawElements (indices=<optimized out>, 
    type=5123, count=<optimized out>, mode=<optimized out>, 
    this=<optimized out>) at /usr/include/qt5/QtGui/qopenglfunctions.h:727 
#12 QSGBatchRenderer::Renderer::renderMergedBatch ([email protected]=0x8041e638, 
    batch=<optimized out>) 
    at /usr/src/debug/qt5-declarative-5.5.1-1/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp:2299 
#13 0x672811a7 in QSGBatchRenderer::Renderer::renderMergedBatch (
    batch=<optimized out>, this=0x8041e638) 
    at /usr/src/debug/qt5-declarative-5.5.1-1/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp:2512 
#14 QSGBatchRenderer::Renderer::renderBatches ([email protected]=0x8041e638) 
    at /usr/src/debug/qt5-declarative-5.5.1-1/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp:2493 
#15 0x67286f3f in QSGBatchRenderer::Renderer::render (this=0x8041e638) 
    at /usr/src/debug/qt5-declarative-5.5.1-1/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp:2681 
#16 0x6728fc33 in QSGRenderer::renderScene ([email protected]=0x8041e638, 
    bindable=...) 
    at /usr/src/debug/qt5-declarative-5.5.1-1/src/quick/scenegraph/coreapi/qsgrenderer.cpp:208 
#17 0x67290657 in QSGRenderer::renderScene (this=0x8041e638, fboId=0) 
    at /usr/src/debug/qt5-declarative-5.5.1-1/src/quick/scenegraph/coreapi/qsgrenderer.cpp:168 
#18 0x6729fc84 in QSGRenderContext::renderNextFrame (this=0x802763f0, 
    renderer=0x8041e638, fboId=0) 
    at /usr/src/debug/qt5-declarative-5.5.1-1/src/quick/scenegraph/qsgcontext.cpp:558 
#19 0x672e6d30 in QQuickWindowPrivate::renderSceneGraph (
    [email protected]=0x80275ff0, size=...) 
    at /usr/src/debug/qt5-declarative-5.5.1-1/src/quick/items/qquickwindow.cpp:383 
#20 0x672b80a5 in QSGGuiThreadRenderLoop::renderWindow (
    [email protected]=0x8027e1e8, window=0x80275fd8) 
    at /usr/src/debug/qt5-declarative-5.5.1-1/src/quick/scenegraph/qsgrenderloop.cpp:378 
#21 0x672b9c9f in QSGGuiThreadRenderLoop::exposureChanged (this=0x8027e1e8, 
    window=0x80275fd8) 
    at /usr/src/debug/qt5-declarative-5.5.1-1/src/quick/scenegraph/qsgrenderloop.cpp:422 
#22 0x67cba4f9 in QWindow::event (this=0x80275fd8, ev=0x28c834) 
    at /usr/src/debug/qt5-base-5.5.1-1/src/gui/kernel/qwindow.cpp:2053 
#23 0x672f40ce in QQuickWindow::event (this=0x80275fd8, e=0x28c834) 
    at /usr/src/debug/qt5-declarative-5.5.1-1/src/quick/items/qquickwindow.cpp:1413 
#24 0x6471b4a1 in QApplicationPrivate::notify_helper (
    [email protected]=0x80060500, [email protected]=0x80275fd8, 
    [email protected]=0x28c834) 
    at /usr/src/debug/qt5-base-5.5.1-1/src/widgets/kernel/qapplication.cpp:3716 
#25 0x647207dc in QApplication::notify (this=0x28cba4, receiver=0x80275fd8, 
    e=0x28c834) 
    at /usr/src/debug/qt5-base-5.5.1-1/src/widgets/kernel/qapplication.cpp:3499 
#26 0x68d90d62 in QCoreApplication::notifyInternal (this=0x28cba4, 
    receiver=0x80275fd8, event=0x28c834) 
    at /usr/src/debug/qt5-base-5.5.1-1/src/corelib/kernel/qcoreapplication.cpp:965 
#27 0x67cb3377 in QCoreApplication::sendSpontaneousEvent (event=0x28c834, 
    receiver=0x80275fd8) 
    at /usr/src/debug/qt5-base-5.5.1-1/include/QtCore/../../src/corelib/kernel/qcoreapplication.h:227 
#28 QGuiApplicationPrivate::processExposeEvent ([email protected]=0x802fdef0) 
    at /usr/src/debug/qt5-base-5.5.1-1/src/gui/kernel/qguiapplication.cpp:2648 
#29 0x67cb41b8 in QGuiApplicationPrivate::processWindowSystemEvent (
    [email protected]=0x802fdef0) 
    at /usr/src/debug/qt5-base-5.5.1-1/src/gui/kernel/qguiapplication.cpp:1643 
#30 0x67c9b020 in QWindowSystemInterface::sendWindowSystemEvents (flags=...) 
    at /usr/src/debug/qt5-base-5.5.1-1/src/gui/kernel/qwindowsysteminterface.cpp:625 
#31 0x64654546 in userEventSourceDispatch (source=0x800a4ea0) 
    at /usr/src/debug/qt5-base-5.5.1-1/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp:70 
#32 0x55ff0173 in g_main_context_dispatch() from /usr/bin/cygglib-2.0-0.dll 
#33 0x55ff03da in g_main_context_dispatch() from /usr/bin/cygglib-2.0-0.dll 
#34 0x55ff047a in g_main_context_iteration() from /usr/bin/cygglib-2.0-0.dll 
#35 0x68dd3b12 in QEventDispatcherGlib::processEvents (this=0x80060710, 
    flags=...) 
    at /usr/src/debug/qt5-base-5.5.1-1/src/corelib/kernel/qeventdispatcher_glib.cpp:418 
#36 0x68d8fd3f in QEventLoop::processEvents (flags=..., this=0x28caac) 
    at /usr/src/debug/qt5-base-5.5.1-1/src/corelib/kernel/qeventloop.cpp:128 
#37 QEventLoop::exec ([email protected]=0x28caac, [email protected]=...) 
    at /usr/src/debug/qt5-base-5.5.1-1/src/corelib/kernel/qeventloop.cpp:204 
#38 0x68d96a43 in QCoreApplication::exec() 
    at /usr/src/debug/qt5-base-5.5.1-1/src/corelib/kernel/qcoreapplication.cpp:1229 
#39 0x00404157 in main (argc=2, argv=0x28cc5c) 
    at /usr/src/debug/qt5-declarative-5.5.1-1/tools/qmlscene/main.cpp:598 

答えて

1

32bit版にも同様の問題があり、バージョン11.0.9-1

にDRI-ドライバを元に戻す試してみてください。 https://cygwin.com/ml/cygwin/2016-04/msg00254.html

+0

ありがとうございました。あなたが言ったように、 'ドライドライバー' 11.0.9-1ではコードがうまく機能します。 (11.0.9-2では 'glxgears'でもセグメンテーションが起こります) –

関連する問題