Segmentation fault in Qt application framework

前端 未结 2 1478
遥遥无期
遥遥无期 2021-01-26 07:10

this generates a segmentation fault becuase of \"QColor colorMap[9]\";. If I remove colorMap the segmentation fault goes away. If I put it back. It comes back. If I do a clean

2条回答
  •  隐瞒了意图╮
    2021-01-26 08:01

    Firstly it might not be QColor, that may simply be changing the memory layout enough that a buffer overrun somewhere else triggers a segfault - try a different size QColor ..[1] for example.

    Can QColor be used as an array like this, does it have the correct default ctor?

提交回复
热议问题