msys2 / MSYS2-packages

Package scripts for MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
1.29k stars 487 forks source link

mingw-w32 Qt5 crashing #672

Open bcampbell opened 8 years ago

bcampbell commented 8 years ago

I've been running into problems with Qt5 segfaulting on me under mingw-w32 (but not on w64). I spent a while narrowing down a test case, and it turns out I can get it to crash with a simple QML example - no C++ required:

crashy.qml

import QtQuick 2.2
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.2

ApplicationWindow {
    id: window
    visible: true
    title: "Table View Example"

    ListModel {
        id: largeModel
        Component.onCompleted: {
            // 5 items works OK... but 5000 does not :-(
            for (var i=0 ; i< 5000; ++i)
                largeModel.append({"name":"Person "+i})
        }
    }

    TableView {
        id: tabView
        anchors.fill: parent
        TableViewColumn {
            id: nameColumn
            title: "Name"
            role: "name"
            movable: false
            resizable: false
        }
        model: largeModel
    }
}

Under mingw-w64 it runs fine, but using the 32bit version... well:

$ qmlscene.exe crashy.qml
Segmentation fault

(I've also tried crashy.qml on Qt5.7 on OSX just for a quick sanity check - it worked fine)

For reference:

$ pacman -Qs Qt5
local/mingw-w64-i686-qt5 5.6.1-2 (mingw-w64-i686-qt mingw-w64-i686-qt5)
    A cross-platform application and UI framework (mingw-w64)
local/mingw-w64-x86_64-qt5 5.6.1-2 (mingw-w64-x86_64-qt mingw-w64-x86_64-qt5)
    A cross-platform application and UI framework (mingw-w64)

Does anyone else see this behaviour?

bcampbell commented 8 years ago

Oh, I meant to add: a lot of stuff seems to run just fine. Tableview seems to stand out as something which causes the crash - the program I'm working on relies heavily on tableview, so that's what I've noticed most..