Qt编译器在linux Machine上编译时显示错误

时间:2017-09-25 10:42:35

标签: qt qt4 qmake

我的QT应用程序有一个名为“CinemasVisualizerPlugin”的插件,在执行“setStyleSheet(styl);”行时它崩溃了

但其他linux机器上的代码相同。我怀疑是一些路径问题。

任何输入都会非常有用。感谢

    Debugging starts
    Plugin id: 3 V2 plguing id: 2
    Plugin id: 1 V2 plguing id: 2
    Plugin id: 3 V2 plguing id: 2
    Plugin name coming: "CinemasVisualizerPlugin"
    View mode plugin interface is enabled
    QObject::connect: Cannot connect ViewWindow::setCursorMode(ViewPanelCursorMode) to (null)::setCursorMode(ViewPanelCursorMode)
    QObject::connect: Cannot connect ViewWindow::restoreViewWindow() to (null)::restoreViewWindow()
    General Porp changed
    General Porp changed
    General Porp changed
    General Porp changed
    General Porp changed
    General Porp changed
    Value changed
    Text:X "1.000"
    Text:Y "0.000"
    Text:Z "1.000"
    Text:Dist "2.000"
    Text:X "1.000"
    Text:Y "0.700"
    Text:Z "1.000"
    Text:Dist "2.000"
    2d Lattice Porp changed
    2d Lattice Porp changed
    QObject::connect: No such signal csTwoSideButton::signalToolTabButtonSelected(bool) in ../CinemasVisualizerPlugin/Srcs/ViewerProperties/csMagneticMomentProperties.cpp:383
    QObject::connect:  (receiver name: 'StyleComponent')
    QObject::connect: No such signal csTwoSideButton::signalToolTabButtonSelected(bool) in ../CinemasVisualizerPlugin/Srcs/ViewerProperties/csMagneticMomentProperties.cpp:384
    QObject::connect:  (receiver name: 'StyleComponent')
    *** Error in `/home/embadmin/src_v3.0/build-Cinemas-Desktop_Qt_5_7_1_GCC_64bit-Debug/Cinemas': double free or corruption (out): 0x000000000152dbe0 ***
    ======= Backtrace: =========
    /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7ffff49747e5]
    /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7ffff497d37a]
    /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7ffff498153c]
    /home/embadmin/Qt5.7.1/5.7/gcc_64/lib/libQt5Core.so.5(_ZN9QHashData11free_helperEPFvPNS_4NodeEE+0x54)[0x7ffff588b094]
    /home/embadmin/Qt5.7.1/5.7/gcc_64/lib/libQt5Core.so.5(_ZN9QHashData11free_helperEPFvPNS_4NodeEE+0x49)[0x7ffff588b089]
    /home/embadmin/Qt5.7.1/5.7/gcc_64/lib/libQt5Widgets.so.5(+0x1ec86e)[0x7ffff6a5686e]
    /home/embadmin/Qt5.7.1/5.7/gcc_64/lib/libQt5Widgets.so.5(+0x1f6d13)[0x7ffff6a60d13]
    /home/embadmin/Qt5.7.1/5.7/gcc_64/lib/libQt5Widgets.so.5(+0x1f7056)[0x7ffff6a61056]
    /home/embadmin/Qt5.7.1/5.7/gcc_64/lib/libQt5Widgets.so.5(_ZN14QWidgetPrivate12inheritStyleEv+0x1b3)[0x7ffff69f5553]
    /home/embadmin/Qt5.7.1/5.7/gcc_64/lib/libQt5Widgets.so.5(_ZN14QWidgetPrivate15setStyle_helperEP6QStylebb+0x1dd)[0x7ffff69f528d]
    /home/embadmin/src_v3.0/build-Cinemas-Desktop_Qt_5_7_1_GCC_64bit-Debug/libCinemasVisualizerPluginD.so.1.0.0(_ZN21csMagMomentPropertiesC2EP7QWidget+0x735)[0x7fffe0180557]
    /home/embadmin/src_v3.0/build-Cinemas-Desktop_Qt_5_7_1_GCC_64bit-Debug/libCinemasVisualizerPluginD.so.1.0.0(_ZN21csMagMomentProperties11getInstanceEv+0x30)[0x7fffe018363e]
    /home/embadmin/src_v3.0/build-Cinemas-Desktop_Qt_5_7_1_GCC_64bit-Debug/libCinemasVisualizerPluginD.so.1.0.0(_ZN23csViewStyleOptionWidgetC2EP7QWidget+0x16f)[0x7fffe014d165]
    /home/embadmin/src_v3.0/build-Cinemas-Desktop_Qt_5_7_1_GCC_64bit-Debug/libCinemasVisualizerPluginD.so.1.0.0(_ZN23csViewStyleOptionWidget11getInstanceEv+0x30)[0x7fffe014dd02]
    /home/embadmin/src_v3.0/build-Cinemas-Desktop_Qt_5_7_1_GCC_64bit-Debug/libCinemasVisualizerPluginD.so.1.0.0(_ZN17StyleOptionWidgetC1EP7QWidget+0x108)[0x7fffe0152722]
    /home/embadmin/src_v3.0/build-Cinemas-Desktop_Qt_5_7_1_GCC_64bit-Debug/libCinemasVisualizerPluginD.so.1.0.0(_ZN16csViewToolWindowC2EP7QWidget+0x1cf6)[0x7fffe0160e86]
    /home/embadmin/src_v3.0/build-Cinemas-Desktop_Qt_5_7_1_GCC_64bit-Debug/libCinemasVisualizerPluginD.so.1.0.0(_ZN16csViewToolWindow11getInstanceEv+0x30)[0x7fffe016189a]
    /home/embadmin/src_v3.0/build-Cinemas-Desktop_Qt_5_7_1_GCC_64bit-Debug/libCinemasVisualizerPluginD.so.1.0.0(_ZN16VisualizerWindowC2EP30CsCoreCentralModuleHandlerBase+0x114)[0x7fffe00b5d94]
    /home/embadmin/src_v3.0/build-Cinemas-Desktop_Qt_5_7_1_GCC_64bit-Debug/libCinemasVisualizerPluginD.so.1.0.0(_ZN22VisualizerModulePlugin11addFeaturesERK7QStringP30CsCoreCentralModuleHandlerBase+0x111)[0x7fffe00b56b1]

1 个答案:

答案 0 :(得分:0)

  

我怀疑是路径问题。

最有可能的是它不是。错误消息报告内存损坏

  

double free或corruption(out):0x000000000152dbe0

并且回溯指向您的自定义代码。

Velkans提示是正确的,您应该在调试器(gdb)中运行代码并查看回溯以查找崩溃的原因。如果您无法找到任何内容,则需要更多高级工具,例如valgrind

如果你不知道如何做到这一点,那么学习它 - 对于每个认真的软件开发人员来说,它都是一项强制性的技能,而你却不会有太大的帮助。通常你的IDE支持这个并且使用起来相当舒服;如果没有时间选择那个。