nanogui: Thread: Segmentation fault - what is?


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Segmentation fault - what is?
From: "Vignesh J.S" ####@####.####
Date: 29 Aug 2006 15:37:36 +0100
Message-Id: <a46e12c80608290737x362a881fgd585524e4da1af91@mail.gmail.com>

Hi all,
       Segmentation fault is not new to those who are in embedded
development using RTOS. I have got it many times and gets solved by
something but at the end, i don't understand what solved the problem. So, if
anybody here could throw some light on what exactly a Segmentation fault is,
i would be happy.

Regards,
Vignesh js.

-- 
A chain is only as strong as its weakest link
                                                    - Anonymous
Subject: RE: [nanogui] Segmentation fault - what is?
From: "Martin Kajdas" ####@####.####
Date: 30 Aug 2006 17:18:05 +0100
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC2291544@mkmail.MKPROD.COM>

In short, the segmentation fault occurs when you try to read/write memory not in your segment or segment you are allowed to read/write.
This happens to me a lot also, but is it almost always (?) my fault.
Main causes are:
- uninitialized pointers
- wrong pointers
- wrong parameters to functions using memory
- variable initialization errors
- overwritten pointer variables (unintentionally)
- using deallocated memory
- using larger buffer than declared
- stack problems
- etc.

There is no easy way to explain all possible causes and debugging is the only way to figure it out.
I usually figure it out by knowing (i.e. logging function calls) where the program failed.

Martin



-----Original Message-----
From: Vignesh J.S ####@####.####
Sent: Tuesday, August 29, 2006 7:38 AM
To: NanoGUI
Subject: [nanogui] Segmentation fault - what is?


Hi all,
       Segmentation fault is not new to those who are in embedded
development using RTOS. I have got it many times and gets solved by
something but at the end, i don't understand what solved the problem. So, if
anybody here could throw some light on what exactly a Segmentation fault is,
i would be happy.

Regards,
Vignesh js.

-- 
A chain is only as strong as its weakest link
                                                    - Anonymous
[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.