Hello
I have a problem while executing my code. It gave no error while compiling. The error i get is:
*** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
Attaching to program: /proc/29243/exe, process 29243
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
[New Thread -152082752 (LWP 29243)]
(no debugging symbols found)...done.
(no debugging symbols found)...done.
0x007c17a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x01b1c4b3 in __waitpid_nocancel () from /lib/tls/libc.so.6
#2 0x01ac5779 in do_system () from /lib/tls/libc.so.6
#3 0x0087098d in system () from /lib/tls/libpthread.so.0
#4 0x00a6d4b7 in TUnixSystem::Exec () from /usr/local/root/lib/libCore.so.5.24
#5 0x00a7314f in TUnixSystem::StackTrace ()
from /usr/local/root/lib/libCore.so.5.24
#6 0x00a6fb4a in TUnixSystem::DispatchSignals ()
from /usr/local/root/lib/libCore.so.5.24
#7 0x00a6fbd8 in SigHandler () from /usr/local/root/lib/libCore.so.5.24
#8 0x00a6ee55 in sighandler () from /usr/local/root/lib/libCore.so.5.24
#9 <signal handler called>
#10 0x0807c947 in main ()
Can u tell me where is the problem?
Thanks in advance.
Not for certain, but I would start by considering that signal handlers should do very little (looking at frame 9).
Invoking system() from within a signal handler is a recipe for disaster.
Ruchi, i am a beginner user of cplusplus.com.
i have registered myself....
plz plz plz let me knw the procedure to post a new query on the forums column..
First login to your account, then go to the forum in which you want to post your query.
Below all the topics there is a link where you can "post new topic".
For example this is the link for new post in beginners forum
Segmentation fault occurs whenever your program tries to access INACCESSIBLE locations.
For example take this case::-
Every process has OSdata section at the top of its virtual address space and the process is not supposed to modify that section and any memory reference to that section in your program leads to error called SEGMENTATION FAULT while execution.
Also take this case:
You created linked list with nodes.
class node{
int element;
}
You created 1 node and deleted 1 node.Now there are no nodes in linked list.Now any attempt to access element of first node through linked list pointer results in SEGMENTATION FAULT as there is no first node and your program is trying to access Unallocated NODE.
See whether you have made any such kind of errors.