-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 4.6.0-beta1
-
None
-
qt-creator version: [https://github.com/qt-creator/qt-creator] (master) (10/23/2017)
Config: Using QtTest library 5.9.0, Qt 5.9.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.1 20160406 (Red Hat 5.3.1-6))
Add the following test ./qt-creator-master/tests/auto/qml/reformatter/test.qml containing a fake qrc import:
import QtQuick 2.0 import "qrc://" Item { }
Execute the QML reformatter automatic tests:
$ cd build-qtcreator-Desktop_Qt_5_9-Debug/tests/auto/qml/reformatter: $ ./tst_reformatter ********* Start testing of tst_Reformatter ********* Config: Using QtTest library 5.9.0, Qt 5.9.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.1 20160406 (Red Hat 5.3.1-6)) PASS : tst_Reformatter::initTestCase() ========= Received signal, dumping stack ============== GNU gdb (Ubuntu 8.0.1-0ubuntu1) 8.0.1 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word". Attaching to process 16152 (gdb) ========= End of stack trace ============== QFATAL : tst_Reformatter::test(/home/xx/QtCreator/qt-creator-master/tests/auto/qml/reformatter/test.qml) Received signal 11 Function time: 1ms Total time: 1ms FAIL! : tst_Reformatter::test(/home/xx/QtCreator/qt-creator-master/tests/auto/qml/reformatter/test.qml) Received a fatal error. Loc: [Unknown file(0)] Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 55ms ********* Finished testing of tst_Reformatter ********* Abandon (core dumped)
With GDB:
$ gdb ./tst_reformatter core GNU gdb (Ubuntu 8.0.1-0ubuntu1) 8.0.1 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./tst_reformatter...done. [New LWP 16152] [New LWP 16153] [New LWP 16154] [New LWP 16157] [New LWP 16159] [New LWP 16156] [New LWP 16155] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `./tst_reformatter'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type. [Current thread is 1 (Thread 0x7f9fa7279780 (LWP 16152))] (gdb) bt #0 0x00007f9fa49ef0bb in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007f9fa49f0f5d in __GI_abort () at abort.c:90 #2 0x00007f9fa53c80fe in () at /home/xx/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 #3 0x00007f9fa5a79d5b in () at /home/xx/Qt5.9.0/5.9/gcc_64/lib/libQt5Test.so.5 #4 0x00007f9fa49ef140 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6 #5 0x00007f9fa53d60f5 in QMutex::lock() () at /home/xx/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 #6 0x00007f9fa6d8e622 in QMutexLocker::QMutexLocker(QBasicMutex*) (this=0x7ffcb29fc030, m=0x10) at /home/xx/Qt5.9.0/5.9/gcc_64/include/QtCore/qmutex.h:200 #7 0x00007f9fa6d83e25 in QmlJS::ModelManagerInterface::projectInfos() const (this=0x0) at ../../../../qt-creator-master/src/libs/qmljs/qmljsmodelmanagerinterface.cpp:509 #8 0x00007f9fa6d83586 in QmlJS::ModelManagerInterface::iterateQrcFiles(ProjectExplorer::Project*, QmlJS::ModelManagerInterface::QrcResourceSelector, std::function<void (QSharedPointer<QmlJS::QrcParser const>)>) (this=0x0, project=0x0, resources=QmlJS::ModelManagerInterface::AllQrcResources, callback=...) at ../../../../qt-creator-master/src/libs/qmljs/qmljsmodelmanagerinterface.cpp:442 #9 0x00007f9fa6d83bf2 in QmlJS::ModelManagerInterface::filesAtQrcPath(QString const&, QLocale const*, ProjectExplorer::Project*, QmlJS::ModelManagerInterface::QrcResourceSelector) (this=0x0, path=..., locale=0x0, project=0x0, resources=QmlJS::ModelManagerInterface::AllQrcResources) at ../../../../qt-creator-master/src/libs/qmljs/qmljsmodelmanagerinterface.cpp:486 #10 0x00007f9fa6d4d0b9 in QmlJS::ImportInfo::pathImport(QString const&, QString const&, LanguageUtils::ComponentVersion, QString const&, QmlJS::AST::UiImport*) (docPath=..., path=..., version=..., as=..., ast=0x561e72522950) at ../../../../qt-creator-master/src/libs/qmljs/qmljsinterpreter.cpp:2243 #11 0x00007f9fa6d19406 in QmlJS::Bind::visit(QmlJS::AST::UiImport*) (this=0x561e72394ce0, ast=0x561e72522950) at ../../../../qt-creator-master/src/libs/qmljs/qmljsbind.cpp:217 #12 0x00007f9fa6ceeafa in QmlJS::AST::UiImport::accept0(QmlJS::AST::Visitor*) (this=0x561e72522950, visitor=0x561e72394ce0) at ../../../../qt-creator-master/src/libs/qmljs/parser/qmljsast.cpp:912 ---Type <return> to continue, or q <return> to quit--- #13 0x00007f9fa6cec1ba in QmlJS::AST::Node::accept(QmlJS::AST::Visitor*) (this=0x561e72522950, visitor=0x561e72394ce0) at ../../../../qt-creator-master/src/libs/qmljs/parser/qmljsast.cpp:37 #14 0x00007f9fa6cec206 in QmlJS::AST::Node::accept(QmlJS::AST::Node*, QmlJS::AST::Visitor*) (node=0x561e72522950, visitor=0x561e72394ce0) at ../../../../qt-creator-master/src/libs/qmljs/parser/qmljsast.cpp:45 #15 0x00007f9fa6ceec41 in QmlJS::AST::UiHeaderItemList::accept0(QmlJS::AST::Visitor*) (this=0x561e725229e8, visitor=0x561e72394ce0) at ../../../../qt-creator-master/src/libs/qmljs/parser/qmljsast.cpp:939 #16 0x00007f9fa6cec1ba in QmlJS::AST::Node::accept(QmlJS::AST::Visitor*) (this=0x561e725229e8, visitor=0x561e72394ce0) at ../../../../qt-creator-master/src/libs/qmljs/parser/qmljsast.cpp:37 #17 0x00007f9fa6cec206 in QmlJS::AST::Node::accept(QmlJS::AST::Node*, QmlJS::AST::Visitor*) (node=0x561e725229e8, visitor=0x561e72394ce0) at ../../../../qt-creator-master/src/libs/qmljs/parser/qmljsast.cpp:45 #18 0x00007f9fa6ceec58 in QmlJS::AST::UiHeaderItemList::accept0(QmlJS::AST::Visitor*) (this=0x561e72522900, visitor=0x561e72394ce0) at ../../../../qt-creator-master/src/libs/qmljs/parser/qmljsast.cpp:940 #19 0x00007f9fa6cec1ba in QmlJS::AST::Node::accept(QmlJS::AST::Visitor*) (this=0x561e72522900, visitor=0x561e72394ce0) at ../../../../qt-creator-master/src/libs/qmljs/parser/qmljsast.cpp:37 #20 0x00007f9fa6cec206 in QmlJS::AST::Node::accept(QmlJS::AST::Node*, QmlJS::AST::Visitor*) (node=0x561e72522900, visitor=0x561e72394ce0) at ../../../../qt-creator-master/src/libs/qmljs/parser/qmljsast.cpp:45 #21 0x00007f9fa6cee5bf in QmlJS::AST::UiProgram::accept0(QmlJS::AST::Visitor*) (this=0x561e72522ae8, visitor=0x561e72394ce0) at ../../../../qt-creator-master/src/libs/qmljs/parser/qmljsast.cpp:808 #22 0x00007f9fa6cec1ba in QmlJS::AST::Node::accept(QmlJS::AST::Visitor*) (this=0x561e72522ae8, visitor=0x561e72394ce0) at ../../../../qt-creator-master/src/libs/qmljs/parser/qmljsast.cpp:37 #23 0x00007f9fa6cec206 in QmlJS::AST::Node::accept(QmlJS::AST::Node*, QmlJS::AST::Visitor*) (node=0x561e72522ae8, visitor=0x561e72394ce0) at ../../../../qt-creator-master/src/libs/qmljs/parser/qmljsast.cpp:45 #24 0x00007f9fa6d18d2b in QmlJS::Bind::accept(QmlJS::AST::Node*) (this=0x561e72394ce0, node=0x561e72522ae8) at ../../../../qt-creator-master/src/libs/qmljs/qmljsbind.cpp:165 #25 0x00007f9fa6d185c2 in QmlJS::Bind::Bind(QmlJS::Document*, QList<QmlJS::DiagnosticMessage>*, bool, QList<QmlJS::ImportInfo> const&) (this=0x561e72394ce0, doc=0x561e72483560, messages=0x561e72483578, isJsLibrary=false, jsImports=...) at ../../../../qt-creator-master/src/libs/qmljs/qmljsbind.cpp:62 #26 0x00007f9fa6d33dcb in QmlJS::Document::parse_helper(int) (this=0x561e72483560, startToken=98) at ../../../../qt-creator-master/src/libs/qmljs/qmljsdocument.cpp:298 #27 0x00007f9fa6d33f21 in QmlJS::Document::parseQml() (this=0x561e72483560) at ../../../../qt-creator-master/src/libs/qmljs/qmljsdocument.cpp:313 #28 0x00007f9fa6d33ef4 in QmlJS::Document::parse() (this=0x561e72483560) at ../../../../qt-creator-master/src/libs/qmljs/qmljsdocument.cpp:306 #29 0x0000561e70235125 in tst_Reformatter::test() (this=0x7ffcb29fd4b0) at /home/xx/QtCreator/qt-creator-master/tests/auto/qml/reformatter/tst_reformatter.cpp:84 #30 0x0000561e702358b6 in tst_Reformatter::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x7ffcb29fd4b0, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7ffcb29fcb80) at .moc/debug-shared/tst_reformatter.moc:73 #31 0x00007f9fa55b22e6 in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const () at /home/xx/Qt5.9.0/5.9/gcc_64/lib/libQt5Core.so.5 #32 0x00007f9fa5a80f54 in () at /home/xx/Qt5.9.0/5.9/gcc_64/lib/libQt5Test.so.5 #33 0x00007f9fa5a81876 in () at /home/xx/Qt5.9.0/5.9/gcc_64/lib/libQt5Test.so.5 #34 0x00007f9fa5a81e62 in () at /home/xx/Qt5.9.0/5.9/gcc_64/lib/libQt5Test.so.5 ---Type <return> to continue, or q <return> to quit--- #35 0x00007f9fa5a82339 in QTest::qExec(QObject*, int, char**) () at /home/xx/Qt5.9.0/5.9/gcc_64/lib/libQt5Test.so.5 #36 0x0000561e70235814 in main(int, char**) (argc=1, argv=0x7ffcb29fd5c8) at /home/xx/QtCreator/qt-creator-master/tests/auto/qml/reformatter/tst_reformatter.cpp:111