Results 1 to 2 of 2

Thread: qmldump error - segv

  1. #1
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    112
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default qmldump error - segv

    Hi there again,

    I am having problem with qmldump, I will give the output which shows the best where the problem lies
    Qt Code:
    1. " Processing object QDeclarativeAnchorAnimation
    2. Error: qmldump SEGV
    To copy to clipboard, switch view to plain text mode 

    this is the error I am having, I found out that it lies somewhere in
    Qt Code:
    1. qmlRegisterType<File>(uri, 1, 0, "File"); // <------- HERE IS THE PROBLEM
    2. qmlRegisterType<FileBrowserModel>(uri, 1, 0, "FileBrowserModel");
    3. qmlRegisterType<FileVisualProperties>(uri, 1, 0, "FileVisualProperties");
    4. qmlRegisterType<FileVisualPropertyChunk>(uri, 1, 0, "FileVisualPropertyChunk");
    To copy to clipboard, switch view to plain text mode 

    because when I commented it out, qmldump finished with 0 exit code - no error detected.
    I do not understand where is this problem.
    I will give the header file of this as well
    Qt Code:
    1. #ifndef FILE_H
    2. #define FILE_H
    3.  
    4. #include <QDeclarativeItem>
    5. #include <QFile>
    6.  
    7. /*
    8.   Basic informations about the file
    9.   such as for example name,path,absolute_path and so on
    10. */
    11.  
    12. class FilePrivate;
    13. class File : public QDeclarativeItem
    14. {
    15. Q_OBJECT
    16. Q_DISABLE_COPY(File)
    17. Q_CLASSINFO("version","0.1")
    18. Q_PROPERTY(QString fileName READ fileName WRITE setFileName NOTIFY fileNameChanged)
    19. Q_PROPERTY(qint16 size READ size NOTIFY sizeChanged)
    20. Q_PROPERTY(QString lastError READ lastError NOTIFY errorOccurred)
    21. Q_PROPERTY(QString path READ path)
    22. Q_PROPERTY(QString absolutePath READ absolutePath)
    23. Q_PROPERTY(QString extension READ extension)
    24. Q_PROPERTY(QString openMode READ openMode)
    25. Q_PROPERTY(bool isSymlink READ isSymlink)
    26. Q_PROPERTY(QUrl urlPath READ urlPath)
    27. Q_PROPERTY(QUrl urlAbsolutePath READ urlAbsolutePath)
    28. Q_PROPERTY(bool open READ isOpen)
    29. Q_PROPERTY(bool hidden READ isHidden)
    30. public:
    31. explicit File(QDeclarativeItem *parent = 0);
    32. virtual ~File();
    33.  
    34. QString fileName() const;
    35. QString path() const; //returns relative path
    36. QString absolutePath() const; //returns absolute path, cleaned
    37. QString extension() const; //returns extension for the file
    38. qint16 size() const; //see -> QFile::size
    39. QString lastError() const;
    40. QString openMode() const;
    41. bool isSymlink() const;
    42. void setFileName(const QString &fileName);
    43. QUrl urlAbsolutePath() const;
    44. QUrl urlPath() const;
    45. bool isOpen() const;
    46. bool isHidden() const;
    47.  
    48. // [AVAILABLE FOR QML AS METHODS]
    49. Q_INVOKABLE bool rename(const QString &newName);//see -> QFile::rename
    50. Q_INVOKABLE bool link(const QString &linkName); //see -> QFile::link
    51. Q_INVOKABLE bool copy(const QString &newName); //see -> QFile::copy
    52. Q_INVOKABLE bool exists() const; //see -> QFile::exists
    53. Q_INVOKABLE QStringList links() const; //returns all symbolic/hard links to the file specified as m_fileName
    54. Q_INVOKABLE qint16 linksCount() const; //returns count of all symbolic/hard links to the file specified as m_fileName
    55. Q_INVOKABLE bool openFile(const QString &openMode); //opens the file, using qint16 value as the marker of the mode, see QIODevice::OpenMode
    56. Q_INVOKABLE bool closeFile(); //closes the file, flushed the buffers etc.
    57. // [AVAILABLE FOR QML AS METHODS]
    58.  
    59. signals:
    60. void fileNameChanged(const QString &newFileName); //emitted every time a file name was changed
    61. void sizeChanged(const qint16 &newSize); //emitted every time a file size was changed
    62. void errorOccurred(const QString &errorString); //emitted every time an error has come out
    63.  
    64. private:
    65. Q_DECLARE_PRIVATE(File)
    66. FilePrivate * const d_ptr;
    67. };
    68.  
    69. QML_DECLARE_TYPE(File)
    70.  
    71. #endif // FILE_H
    To copy to clipboard, switch view to plain text mode 

    no pointer anywhere, but it stuck on processing the animation...what is going on ?
    My schedule makes my cry
    My works makes my laugh
    My life makes... oh...no....

  2. #2
    Join Date
    Sep 2010
    Location
    Poland
    Posts
    112
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: qmldump error - segv

    Little update

    I made a mistake writtin, in the previous post, that error comes out from File Item.

    It's origin lies in the class which inherits both from QAbstractListModel, QDeclarativeParserStatus.
    As to the interface I have appropriate macro Q_INTERFACES in class body.
    The item is not drawable.

    Here is the header file
    Qt Code:
    1. #ifndef FILEBROWSERMODEL_H
    2. #define FILEBROWSERMODEL_H
    3.  
    4. #include <QDeclarativeParserStatus>
    5. #include <QFileSystemModel>
    6. #include <QAbstractListModel>
    7. #include <QUrl>
    8. #include <QDeclarativeItem>
    9.  
    10. class FileBrowserModelPrivate;
    11. class FileBrowserModel : public QAbstractListModel, public QDeclarativeParserStatus
    12.  
    13. {
    14. Q_OBJECT
    15. Q_DISABLE_COPY(FileBrowserModel)
    16. Q_INTERFACES(QDeclarativeParserStatus)
    17. Q_PROPERTY(QUrl folder READ folder WRITE setFolder NOTIFY folderChanged)
    18. Q_PROPERTY(QUrl parentFolder READ parentFolder NOTIFY folderChanged)
    19. Q_PROPERTY(QStringList nameFilters READ nameFilters WRITE setNameFilters)
    20. Q_PROPERTY(bool showDirs READ showDirs WRITE setShowDirs)
    21. Q_PROPERTY(bool showDotAndDotDot READ showDotAndDotDot WRITE setShowDotAndDotDot)
    22. Q_PROPERTY(bool showOnlyReadable READ showOnlyReadable WRITE setShowOnlyReadable)
    23. Q_PROPERTY(qint16 count READ count)
    24. public:
    25. explicit FileBrowserModel(QObject *parent = 0);
    26. virtual ~FileBrowserModel();
    27.  
    28. enum Roles { FileNameRole = Qt::UserRole+1, FilePathRole = Qt::UserRole+2 };
    29.  
    30. //QAbstractListModel reimplementation
    31. int rowCount(const QModelIndex &parent) const;
    32. QVariant data(const QModelIndex &index, int role) const;
    33. qint16 count() const;
    34. //QAbstractListModel reimplementation
    35. //QDeclarativeParserStatus reimplementation
    36. virtual void classBegin();
    37. virtual void componentComplete();
    38. //QDeclarativeParserStatus reimplementation
    39.  
    40. //properties
    41. QUrl folder() const;
    42. void setFolder(const QUrl &folder);
    43. QUrl parentFolder() const;
    44. QStringList nameFilters() const;
    45. void setNameFilters(const QStringList &filters);
    46. bool showDirs() const;
    47. void setShowDirs(bool enable);
    48. bool showDotAndDotDot() const;
    49. void setShowDotAndDotDot(bool enable);
    50. bool showOnlyReadable() const;
    51. void setShowOnlyReadable(bool enable);
    52. bool showHidden() const;
    53. void setShowHidden(bool enable);
    54. //properties
    55. Q_INVOKABLE bool isFolder(int index = -1) const;
    56.  
    57. signals:
    58. void folderChanged();
    59.  
    60. private slots:
    61. void refresh();
    62. void handleDataChanged(const QModelIndex &start, const QModelIndex &end);
    63. void rootDirChanged(const QString &newRoot);
    64.  
    65. private:
    66. Q_DECLARE_PRIVATE(FileBrowserModel)
    67. FileBrowserModelPrivate * const d_ptr;
    68. };
    69.  
    70. QML_DECLARE_TYPE(FileBrowserModel)
    71.  
    72. #endif // FileBrowserModel_H
    To copy to clipboard, switch view to plain text mode 

    to be honest, I am trying to write the implementation of FolderListModel available at Qt docs, but instead of using obsolete QDir, I am trying to use QFileSystemModel
    My schedule makes my cry
    My works makes my laugh
    My life makes... oh...no....

Similar Threads

  1. : error: [\NokiaQtSDK\Symbian\SDK\epoc32\release\gcce\udeb\V ideo.exe] Error 1
    By ranjit.kadam in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 1st May 2011, 23:11
  2. Replies: 3
    Last Post: 23rd January 2011, 13:15
  3. fatal error C1001: An internal error has occurred in the compiler
    By noodles in forum Installation and Deployment
    Replies: 0
    Last Post: 12th August 2010, 12:24
  4. segv error in signal
    By Sheng in forum Qt Programming
    Replies: 7
    Last Post: 8th April 2009, 19:14
  5. Replies: 1
    Last Post: 25th October 2008, 20:18

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.