balasaravanan
3rd December 2010, 07:00
My Qt program crashes when executing a particular use case. When trying to debug, I encounter the following problem.
I am receiving a SIGSEGV when calling a function called addContacts which is found in the file ContactsForm.cpp.
But the GDB bedugger shows that the segfault is happening in this function addContacts but the file listed is c++/bits/char_traits.h.
I cannot understand why GDB is reporting an erraneous listing.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208564032 (LWP 21061)]
0x0807cb28 in ContactsForm::addContacts (this=0x91d1730)
at /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/char_traits.h:258
258 { return strlen(__s); }
(gdb) bt
#0 0x0807cb28 in ContactsForm::addContacts (this=0x91d1730)
at /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/char_traits.h:258
#1 0x0807d6e6 in ContactsForm::showEvent (this=0x91d1730, event=0xbfef98d0)
at Contacts/ContactsForm.cpp:38
#2 0x00566955 in QWidget::event (this=0x91d1730, event=0xbfef98d0)
at kernel/qwidget.cpp:8251
I am receiving a SIGSEGV when calling a function called addContacts which is found in the file ContactsForm.cpp.
But the GDB bedugger shows that the segfault is happening in this function addContacts but the file listed is c++/bits/char_traits.h.
I cannot understand why GDB is reporting an erraneous listing.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208564032 (LWP 21061)]
0x0807cb28 in ContactsForm::addContacts (this=0x91d1730)
at /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/char_traits.h:258
258 { return strlen(__s); }
(gdb) bt
#0 0x0807cb28 in ContactsForm::addContacts (this=0x91d1730)
at /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../include/c++/3.4.6/bits/char_traits.h:258
#1 0x0807d6e6 in ContactsForm::showEvent (this=0x91d1730, event=0xbfef98d0)
at Contacts/ContactsForm.cpp:38
#2 0x00566955 in QWidget::event (this=0x91d1730, event=0xbfef98d0)
at kernel/qwidget.cpp:8251