Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

FileDialog crashes sometimes in Debug, seems to behave ok in Release

$
0
0
So this is a very ghostly bug… or else Code is very simple: #include <QQmlApplicationEngine> #include <QGuiApplication>   int main(int argc, char **argv) {  QGuiApplication app(argc, argv);  QQmlApplicationEngine engine;  engine.load("qml/main.qml");  return app.exec(); } main.qml: import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Dialogs 1.0   ApplicationWindow {  id: app  visible: true    width: 800  height: 600    menuBar: MenuBar {   Menu {    title: "File"    MenuItem {     text: "Open"     shortcut: "Ctrl+O"     onTriggered: app.openDoc()    }   }  }    FileDialog {   id: fileOpener   title: "Select a file to be opened"   nameFilters: "*.py"   selectExisting: true   selectFolder: false   selectMultiple: false  }    function openDoc() {   fileOpener.open()  } } Crashes sometimes(not always and very dependent on phase of moon) when the user closes the file dialog while in debug mode. The probability of crash is increased, if the program is running under debugger. After the crash, there is NO CALL STACK VISIBLE under VS debugger(the RIP register was 0, and it just had one entry with addr0), however i tried to restore where the problem was by reading what was in [rsp]. It was a function template <class BaseClass> void QWindowsDialogHelperBase<BaseClass>::hide() { 000007FEDC8EF2C0  mov         qword ptr [rsp+8],rcx   000007FEDC8EF2C5  sub         rsp,28h       if (m_nativeDialog) 000007FEDC8EF2C9  mov         rax,qword ptr [this]   000007FEDC8EF2CE  cmp         qword ptr [rax+20h],0   000007FEDC8EF2D3  je          QWindowsDialogHelperBase<QPlatformFileDialogHelper>::hide+2Dh (07FEDC8EF2EDh)           m_nativeDialog->close(); 000007FEDC8EF2D5  mov         rax,qword ptr [this]   000007FEDC8EF2DA  mov         rax,qword ptr [rax+20h]   000007FEDC8EF2DE  mov         rcx,qword ptr [this]   000007FEDC8EF2E3  mov         rcx,qword ptr [rcx+20h]   000007FEDC8EF2E7  mov         rax,qword ptr [rax]   000007FEDC8EF2EA  call        qword ptr [rax+68h]       m_ownerWindow = 0; 000007FEDC8EF2ED  mov         rax,qword ptr [this]      // <<< [RSP] points here     m_ownerWindow = 0; 000007FEDC8EF2F2  mov         qword ptr [rax+28h],0   } Here the rest of my environment specs that may be useful: – VS 2012 Ultimate (Update 3) – Qt 5.1 downloaded from qt-project, for Win 64bit, VS12, OpenGL – build with CMake 2.8.11(i couldnt reproduce it just yet with QtCreator) CMakeLists: cmake_minimum_required(VERSION 2.8.11) set (CMAKE_PREFIX_PATH "C:\\Program Files (x86)\\Windows Kits\\8.0\\Lib\\win8\\um\\x64") project(delicious-pie)   set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)   find_package(Qt5Widgets REQUIRED)   add_subdirectory("src") set(target delicious)   set (Sources  main.cpp )   add_executable(${target} ${Sources})   qt5_use_modules(${target} Qml Quick) ——————————————- I would like to see if someone else could reproduce this behaviour… under different qt builds and settings perhaps, because right now i can’t debug my QtQuick project and i really need to?

Viewing all articles
Browse latest Browse all 4972

Trending Articles