Results 1 to 15 of 15

Thread: qml PathView XmlListModel

  1. #1
    Join Date
    Mar 2012
    Location
    china
    Posts
    54
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default qml PathView XmlListModel

    hello,I use PathView with XmlListModel,but when I call model.reload,it Aborted

    0 raise /lib64/libc.so.6 0 0x7ffff3cb0d95
    1 abort /lib64/libc.so.6 0 0x7ffff3cb22ab
    2 __libc_message /lib64/libc.so.6 0 0x7ffff3ceaece
    3 malloc_printerr /lib64/libc.so.6 0 0x7ffff3cf0c06
    4 _IO_new_file_seekoff /lib64/libc.so.6 0 0x7ffff3cec0e4
    5 ftello64 /lib64/libc.so.6 0 0x7ffff3cea526
    6 QFile:pen(_IO_FILE*, QFlags<QIODevice::OpenModeFlag>, QFlags<QFile::FileHandleFlag>) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 0 0x7ffff4ab9138
    7 QFile:pen(_IO_FILE*, QFlags<QIODevice::OpenModeFlag>) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 0 0x7ffff4ab91ee
    8 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXmlPatterns.so.4 0 0x7ffff6279863
    9 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXmlPatterns.so.4 0 0x7ffff6278905
    10 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXmlPatterns.so.4 0 0x7ffff6252506
    11 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXmlPatterns.so.4 0 0x7ffff6269391
    12 QXmlQuery::setQuery(QIODevice*, QUrl const&) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXmlPatterns.so.4 0 0x7ffff626710d
    13 QXmlQuery::setQuery(QString const&, QUrl const&) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXmlPatterns.so.4 0 0x7ffff62671eb
    14 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtDeclarative.so.4 0 0x7ffff751810f
    15 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtDeclarative.so.4 0 0x7ffff7519fb7
    16 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtDeclarative.so.4 0 0x7ffff751b1c9
    17 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtDeclarative.so.4 0 0x7ffff751bb31
    18 QApplicationPrivate::notify_helper(QObject*, QEvent*) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtGui.so.4 0 0x7ffff509456c
    19 QApplication::notify(QObject*, QEvent*) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtGui.so.4 0 0x7ffff5099a1d
    20 QCoreApplication::notifyInternal(QObject*, QEvent*) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 0 0x7ffff4b3530c

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qml PathView XmlListModel

    What's further in the backtrace?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Mar 2012
    Location
    china
    Posts
    54
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qml PathView XmlListModel

    0 raise /lib64/libc.so.6 0 0x7ffff3cb0d95
    1 abort /lib64/libc.so.6 0 0x7ffff3cb22ab
    2 __libc_message /lib64/libc.so.6 0 0x7ffff3ceaece
    3 malloc_printerr /lib64/libc.so.6 0 0x7ffff3cf0c06
    4 _IO_new_file_seekoff /lib64/libc.so.6 0 0x7ffff3cec0e4
    5 ftello64 /lib64/libc.so.6 0 0x7ffff3cea526
    6 QFile:pen(_IO_FILE*, QFlags<QIODevice::OpenModeFlag>, QFlags<QFile::FileHandleFlag>) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 0 0x7ffff4ab9138
    7 QFile:pen(_IO_FILE*, QFlags<QIODevice::OpenModeFlag>) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 0 0x7ffff4ab91ee
    8 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXmlPatterns.so.4 0 0x7ffff64fd863
    9 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXmlPatterns.so.4 0 0x7ffff64fc905
    10 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXmlPatterns.so.4 0 0x7ffff64d6506
    11 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXmlPatterns.so.4 0 0x7ffff64ed391
    12 QXmlQuery::setQuery(QIODevice*, QUrl const&) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXmlPatterns.so.4 0 0x7ffff64eb10d
    13 QXmlQuery::setQuery(QString const&, QUrl const&) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtXmlPatterns.so.4 0 0x7ffff64eb1eb
    14 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtDeclarative.so.4 0 0x7ffff751810f
    15 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtDeclarative.so.4 0 0x7ffff7519fb7
    16 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtDeclarative.so.4 0 0x7ffff751b1c9
    17 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtDeclarative.so.4 0 0x7ffff751bb31
    18 QApplicationPrivate::notify_helper(QObject*, QEvent*) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtGui.so.4 0 0x7ffff509456c
    19 QApplication::notify(QObject*, QEvent*) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtGui.so.4 0 0x7ffff5099a1d
    20 QCoreApplication::notifyInternal(QObject*, QEvent*) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 0 0x7ffff4b3530c
    21 QCoreApplicationPrivate::sendPostedEvents(QObject* , int, QThreadData*) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 0 0x7ffff4b39bf3
    22 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 0 0x7ffff4b66cf3
    23 g_main_context_dispatch /usr/lib64/libglib-2.0.so.0 0 0x7ffff35ae58d
    24 ?? /usr/lib64/libglib-2.0.so.0 0 0x7ffff35aed88
    25 g_main_context_iteration /usr/lib64/libglib-2.0.so.0 0 0x7ffff35aef59
    26 QEventDispatcherGlib:rocessEvents(QFlags<QEventLoop::ProcessEventsFlag> ) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 0 0x7ffff4b66833
    27 QEventLoop:rocessEvents(QFlags<QEventLoop::ProcessEventsFlag> ) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 0 0x7ffff4b33ec2
    28 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsF lag>) /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 0 0x7ffff4b34334
    29 QThread::exec() /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 0 0x7ffff4a2974f
    30 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtDeclarative.so.4 0 0x7ffff751bb96
    31 ?? /opt/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtCore.so.4 0 0x7ffff4a2ce7b
    32 start_thread /lib64/libpthread.so.0 0 0x7ffff4789f05
    33 clone /lib64/libc.so.6 0 0x7ffff3d5553d

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qml PathView XmlListModel

    Is your app a pure QML app or do you have any C++ code of your own too?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Mar 2012
    Location
    china
    Posts
    54
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qml PathView XmlListModel

    c++ and QML both, QML to query xml,and C++ modify the xml, it is ok to run,but when I try to load any other plugin (invoke dlopen() in linux),qDebug() could not output anything ,and then it crash,

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qml PathView XmlListModel

    Do you have threads in your application? If so, how are you using them?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Mar 2012
    Location
    china
    Posts
    54
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qml PathView XmlListModel

    Yes,a lot of threads created but no by QThread , and the other thread wont operate ui,they just operate network (onvif,cgi), sorry my poor English

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qml PathView XmlListModel

    It doesn't matter if they are QThread or not. What matters is if you're using them correctly. It might be one of them crashing and the backtrace you get is simply misleading. It looks like you are trying to run QtQuick in a thread. This is likely to fail.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Mar 2012
    Location
    china
    Posts
    54
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qml PathView XmlListModel

    I know run gui in an other thread will fail,but this time I just show the QDeclaretiveView(load in the gui main thread,if the gui thread try to load the other plugin ,it fails, but if I dont load the plugin ,the QDeclaretiveView shows ok. so I think the network plugin may change some environment that lead to the crash


    Added after 5 minutes:


    the QDeclarativeView above is a plugin, but it runs well alone.but just the other plugin loaded and then QDeclarativeView crash. and I dont think the backtrace is wrong,because every time is the same backtrace,
    Last edited by waiter; 13th January 2013 at 04:24.

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qml PathView XmlListModel

    You can be getting the same backtrace because it can be crashing in the same place all the time. How many threads do you have? What do they do? Did you check the backtrace for each of them?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. #11
    Join Date
    Mar 2012
    Location
    china
    Posts
    54
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qml PathView XmlListModel

    Yes,a lot of threads,I have checked each of the thread.
    if I dont load the QDeclarativeView plugin, it also runs well. and if I only load QDeclarativeView plugin without the other, it runs well too.
    but when I load both of them, it crash.so I guss maybe the other plugin change the environment that lead to the crash


    Added after 7 minutes:


    it crash on ftello64 ,so I think the running environment has changed,the qDebug couldnt output anything when I load the other plugin without loading the QDeclarativeView one. because the other plugin use wchar to stdout,and use a lot of xml to deal with onvif .
    so it lead to the QDeclarativeView plugin crash
    Last edited by waiter; 13th January 2013 at 14:12.

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qml PathView XmlListModel

    What is this other plugin? How are your threads related to plugins?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  13. #13
    Join Date
    Mar 2012
    Location
    china
    Posts
    54
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qml PathView XmlListModel

    in Gui thread, I run

    (1)
    zz_ = new ZhengZhou();
    if(zz_ == NULL)
    {
    return false;
    }
    zz_->Load();

    (2)
    QUiLoader loader;
    if(loader.availableWidgets().contains("MapEditor") )
    {
    QWidget* mapEditor = loader.createWidget("MapEditor",wd);
    mapEditor->show();
    }

    (3)
    zz_ = new ZhengZhou();
    if(zz_ == NULL)
    {
    return false;
    }
    zz_->Load();

    QUiLoader loader;
    if(loader.availableWidgets().contains("MapEditor") )
    {
    QWidget* mapEditor = loader.createWidget("MapEditor",wd);
    mapEditor->show();
    }

    (1) and (2) runs well,but (3) crash when call mapEditor->show(); as you see the backtrace above


    Added after 10 minutes:


    int main(int argc, char *argv[])
    {

    wprintf(L"first");
    QApplication a(argc, argv);
    // ZhengZhou*zz_ = new ZhengZhou();
    // if(zz_ == NULL)
    // {
    // return false;
    // }
    // zz_->Load();

    // QUiLoader loader;
    // if(loader.availableWidgets().contains("MapEditor") )
    // {
    // QWidget* mapEditor = loader.createWidget("MapEditor");
    // mapEditor->show();
    // }
    return a.exec();

    }
    Last edited by waiter; 14th January 2013 at 03:07.

  14. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qml PathView XmlListModel

    And what does ZhengZhou do? And where is QML in all this?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  15. #15
    Join Date
    Mar 2012
    Location
    china
    Posts
    54
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: qml PathView XmlListModel

    I found the ZhengZhou plugin Memory overflow,so I know the result, thanks a lot for you help!!!

Similar Threads

  1. Replies: 1
    Last Post: 7th February 2012, 17:36
  2. Replies: 3
    Last Post: 20th July 2011, 00:49
  3. problem using XmlListModel query to parsing rss xml
    By xiazhouquan in forum Qt Quick
    Replies: 1
    Last Post: 19th June 2011, 09:22
  4. Help with QML Pathview element
    By chetu1984 in forum Newbie
    Replies: 0
    Last Post: 7th February 2011, 04:49
  5. Issue with PathView
    By vnayak78 in forum Qt Quick
    Replies: 1
    Last Post: 29th November 2010, 17:21

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.