Results 1 to 5 of 5

Thread: Segmentation Fault

  1. #1
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Segmentation Fault

    Hi all

    Please tell me why we got segmentationfault.
    and how can we detect these faults.

    Thanx

    merry
    Always Believe in Urself
    Merry

  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: Segmentation Fault

    Segmentation fault happens when an application tries to access memory in a way that violates system security policies. How to detect? Use a debugger

  3. #3
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Segmentation Fault

    hi

    Actually having a listView of items. When I click on items it wont show any error but when clicks on any other portion on the listView .It shows Segmentationfault.

    How can I correct this

    Thanx
    Always Believe in Urself
    Merry

  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: Segmentation Fault

    Use a debugger to see where the crash occurs. You probably have a null pointer somewhere.

  5. #5
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Segmentation Fault

    When you click on the other parts of the ListView the QListViewItem* is set to 0.
    so before you do anything on it check if it is a null pointer.
    We can't solve problems by using the same kind of thinking we used when we created them

Similar Threads

  1. Segmentation fault in QListViewItem
    By ederbs in forum Qt Programming
    Replies: 2
    Last Post: 26th November 2006, 02:19
  2. (Another) segmentation fault
    By Lebowski in forum Qt Programming
    Replies: 27
    Last Post: 6th April 2006, 07:33
  3. Replies: 2
    Last Post: 25th March 2006, 07:54
  4. Icons missing => segmentation fault
    By antonio.r.tome in forum Qt Programming
    Replies: 4
    Last Post: 8th March 2006, 17:30
  5. [qmake_image_collection.cpp] Segmentation fault
    By CrazyLegz in forum KDE Forum
    Replies: 1
    Last Post: 4th February 2006, 12:43

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.