Results 1 to 6 of 6

Thread: ASSERT: "index.isValid()" in file c:\ndk_buildrepos\qt-desktop\src\gui\itemviews\qlis

  1. #1
    Join Date
    Jan 2013
    Posts
    25
    Thanks
    2
    Platforms
    Windows

    Default ASSERT: "index.isValid()" in file c:\ndk_buildrepos\qt-desktop\src\gui\itemviews\qlis

    My QT based GUI application is crashing with following message;

    ASSERT: "index.isValid()" in file c:\ndk_buildrepos\qt-desktop\src\gui\itemviews\qlistview.cpp, line 3008

    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.
    Press <RETURN> to close this window...

    I have tried to remove the problem by looking into the listview that might be generating this exception... but of no use.. Any clue where to look for further?
    Last edited by tesmai4; 18th November 2013 at 15:42.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: ASSERT: "index.isValid()" in file c:\ndk_buildrepos\qt-desktop\src\gui\itemviews\

    Are you using a custom model?

    Did you look at the backtrace? What is the last thing before QListView code?

    Cheers,
    _

  3. #3
    Join Date
    Jan 2013
    Posts
    25
    Thanks
    2
    Platforms
    Windows

    Default Re: ASSERT: "index.isValid()" in file c:\ndk_buildrepos\qt-desktop\src\gui\itemviews\

    Thanks for your reply. Yes, I am using a custom model based on QAbstractListModel.

    Sorry, I did not understand your question about, "What is the last thing before QListView code?" [The explanation below help you to understand my scenario]:
    The contents of my custom datamodel are changing with mouse movement. At some places; I clear my datamodel and populate with new contents and at some other places, I only clear my datamodel.


    A very basic question regarding QT Creator: I don't know how to check where is my program crashing? How can I see the last successfully executed statement in my program using QT Creator? (Visual Studio takes you to the crashing line. Is there something like that in QT Creator?)

    Can you give me some clue?

    Regards,

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: ASSERT: "index.isValid()" in file c:\ndk_buildrepos\qt-desktop\src\gui\itemviews\

    If you run the program in debug mode of Qt Creator it should also show you where it crashed.
    The stack trace at that point should have the complete call stack, at the top the assert, then further down the calls that lead there.

    Another thing that might help is http://qt-project.org/wiki/Model_Test

    Cheers,
    _

  5. #5
    Join Date
    Jan 2013
    Posts
    25
    Thanks
    2
    Platforms
    Windows

    Default Re: ASSERT: "index.isValid()" in file c:\ndk_buildrepos\qt-desktop\src\gui\itemviews\

    QT Creator does not show the crash point. I mostly run the program in debug mode. Are there any settings to enable/disable in Qt Creator for showing the crash point or last successful statement before crash.

    Regards,

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: ASSERT: "index.isValid()" in file c:\ndk_buildrepos\qt-desktop\src\gui\itemviews\

    Have you built the application in debug mode?

    Can you post a screenshot of QtCreator when the program has crashed while running in debug mode?

    Cheers,
    _

Similar Threads

  1. Replies: 5
    Last Post: 29th September 2012, 20:30
  2. Replies: 3
    Last Post: 26th September 2012, 21:21
  3. ASSERT: "bitmap" in file image\qnativeimage.cpp, line 114
    By DusanDusan in forum Qt Programming
    Replies: 2
    Last Post: 23rd May 2012, 07:30
  4. Replies: 1
    Last Post: 5th February 2011, 22:14
  5. Replies: 3
    Last Post: 8th July 2008, 20:37

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.