CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Segmentation fault???

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2005, 20:13
Default Segmentation fault???
  #1
LiQiang
Guest
 
Posts: n/a
I am doing numerical simulation under Red Hat Linux9.0 , but I met error sometime, and " Segmentation fault" is printed to the screen and the program stopped, I do not know why this happens, Help needed.

Thanks in advance!
  Reply With Quote

Old   March 13, 2005, 21:54
Default Re: Segmentation fault???
  #2
ag
Guest
 
Posts: n/a
A segmentation fault generally points to a memory address error - usually caused by overrunning an array, in my experience. Try compiling with a -C option (for most compilers this enables array boundary checking) and see if it gives you any information when the program crashes.
  Reply With Quote

Old   March 14, 2005, 12:21
Default Re: Segmentation fault???
  #3
vasanth
Guest
 
Posts: n/a
Yes u r right? It happens to me when I forget to deallocate the arrays at the end of the program.(after allocating them at some point in the program). Hope it helps Bye

  Reply With Quote

Old   March 18, 2005, 13:25
Default Re: Segmentation fault???
  #4
Sandip N. Jadhav
Guest
 
Posts: n/a
Just compile ur code using -g option eg $gcc -lm -g test.c

and then do $gdb a.out $gdb run

Mostly program will crash, then type $gdb where

It will show u the location of problem in ur code.

Regards Sandip Jadhav

-- http://www.aero.iitb.ac.in/userpages/sandipj

  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM] Paraview - Segmentation fault grjmell ParaView 5 January 9, 2024 13:14
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel francesco OpenFOAM Bugs 4 May 2, 2017 21:59
Debugging a segmentation fault? hansel OpenFOAM Bugs 3 July 31, 2010 13:13
ParaView segmentation fault only for multiphase gwierink OpenFOAM 9 March 25, 2010 07:23
KIVA and Segmentation Fault Felix Main CFD Forum 2 January 18, 2006 01:24


All times are GMT -4. The time now is 18:58.