Software :: How To Debug Ns-2 Code For Segfault

Jun 14, 2010

$ cat segfault.c
int main(void)
char *s = "hello world";
*s = 'H';


So, now we know where exactly the problem occures. I know only these three commands to debug using gdb. But in case of ns-2 code, I don't know how to use gdb.

I changed a routing protocol's C++ code in ns-2 and successfully recompiled ns-2 but when I run any tcl script with that particular protocol, I get 'segmentation fault'. Now I want to trace what part of the code is causing this. I have tried using 'printf's at suspectable places. Is this possible to debug ns-2 code with gdb just like the segfault.c above? I am useing fedora 9.

View 14 Replies


Programming :: Tell Makefile Not To Compile Debug Code?

Mar 4, 2010

I've been trying to work out a way to stop chunks of code being compiled using a variable in my makefile but can't work it out. What I mean is for example in my code I might have.

/****output comms portdata********/
debug comms port %d",ReadPort("ttys1);

I only wish this code to be compiled when I'm debugging. What I've tried is using #ifdef with

debug comms port %d",ReadPort("ttys1);

Then in my make file I set COMM_PORT_DEBUG to 1 so


I then thought I could put it into my in my link line


but this gives a

gcc: COMM_PORT_DEBUG=1: No such file or directory

is there a way to do this sort of thing? Or am I barking up the wrong tree?

View 1 Replies View Related

Programming :: Attach Source Code To A Remote Debug?

May 25, 2011

running a java application in a remote site,and I would like to debug the application. I'm using jdb, and, due to network architecture, I can only use jdb do debug in text-mode. To debug in text-mode I use the command: jdb -attach remotesite: port. At this point this is ok. Now I would like to attach the source code to the jdb. I tried the command

jdb -attach remotesite: port ~/src/org/path/

to attach the source code to the remote debug to. But it doesn't work. In jdb, I try the command use ~/src/org/path/ but it doesn't work either. How can I attach the source code to the remote debug?

View 1 Replies View Related

General :: Use Eclipse To Compile And Debug Source Code On Ns-2 Simulator?

Dec 13, 2010

I want to use eclipse to compile and debug source code on ns-2 simulator. can i configure the parameter on eclipse. can i compile the source code *.cc

View 3 Replies View Related

OpenSUSE :: When Open Project In Code Blocks And Click Build And Run, It Pop Out Debug Report And Exit After That?

Sep 3, 2011

When i open project in code blocks and click build and run, it pop out debug report and exit after that

View 3 Replies View Related

OpenSUSE :: Automount: Segfault At ... In

Feb 4, 2010

automount[9052]: segfault at 60 ip 00007f75c15bcd7c sp 00007f75c0753c30 error 4 in[7f75c15b6000+1b000]/etc/hosts... zbv6 zbv6.gud.s.atcd /net/zbv6/home

View 2 Replies View Related

Ubuntu Multimedia :: PSX Crashes With A Segfault?

Feb 19, 2010

When attempting to run pSX on Ubuntu 9.04 (and the 9.10 livecd), it crashes with a segfault. I -have- read [URL] and tried shutting down pulseaudio as recommended there. However:

$ sudo /etc/init.d/pulseaudio stop
* PulseAudio configured for per-user sessions
$ sudo killall pulseaudio


How do I get pSX working? I tried copying the psx.ini file from another machine because the thread says pSX works fine after you change the sound device used, but it still segfaults when I try running it.

View 2 Replies View Related

Ubuntu :: Compiz SegFault Randomly In 11.04?

May 6, 2011

I am on a fresh install of Narwal. I've switched to classic because unity wasn't mature enough IMO. Just installed ccsm and now my display will crash randomly after running for a short while.

daniel@orange:~$ compiz --replace --debug
compiz (core) - Debug: Could not stat() file /home/daniel/.compiz-1/plugins/ :


View 2 Replies View Related

Programming :: C - Malloc Causing Segfault?

Mar 20, 2010

#include <stdio.h>
#include <stdlib.h>


View 3 Replies View Related

Programming :: C - Segfault During Malloc. How To Use The Pointers

Mar 23, 2010

So the place where I'm having a problem is here:

typedef struct {
void **Mem_Chunk;


View 10 Replies View Related

Programming :: Segfault In Program Using Pthreads

Mar 16, 2010

I am trying to write a peer to peer application in C++ using pthreads library. There are few types of nodes that run in the program. The 'beacon' nodes form the core of the network. The ordinary nodes 'join' the network by sending join requests to the beacon node. So, my program runs till the join requests and responses are received. When I try to 'connect' using connect function from the socket library, I get a segfault. I am not sure if the segfault occurs for the connect function, because sometimes the program just runs to completion. It could be an issue related to threads or memory allocation.

When I run gdb, it shows me the following:
(gdb) run b2-n00.ini
Starting program: sv_node b2-n00.ini
servant:12600> [New LWP 1]
[New LWP 2]
[New LWP 3]
[New LWP 4]
[New LWP 5]
[New LWP 6]
Before Exiting[LWP 1 exited]
procfs: fetch_registers, get_gregs line 3768, /proc/23952/lwp/1: No such file or directory.

View 6 Replies View Related

Slackware :: Gs Segfault When Joining Pdf Files?

Dec 28, 2010

I usually use the following command to join several PDF files in one :gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=output.pdf input1.pdf input2.pdfHadn't have to do it for a while but today, I needed it and thus fired my script.lam! gs segfaults.A quick internet search and I found this : Arch related, while I'm running slackware64-current, the behaviour was exactly the same as mine.In the above thread, one guy linked to a bug report which seems to be theculprit : 4.5.1, gs 9.00, x86_64, indeed, slackware64 seems to be exactly in that situation.

View 2 Replies View Related

Slackware :: Execute Skype Getting Segfault

Apr 28, 2010

Has anyone had any luck getting a slackbuild to work with the newest version of skype I tried with the static binary but when I go to execute skype I get a segfault. I also tried with a different slackbuild and it doesn't work either.

View 9 Replies View Related

Slackware :: Upgrade To 13.1 Causes Segfault In Program That Ran Under 13.0

Mar 10, 2011

I have a custom program that has been running on Slackware since about 2004. It was running fine on Slackware 13.0, but an upgrade (following the procedure in UPGRADE.TXT) to 13.1 causes the program to segfault on a read/write op to the serial port (details here).

what might have changed between 13.0 and 13.1 that might affect serial port programming? I've been through CHANGES_AND_HINTS but nothing is jumping out at me.

View 14 Replies View Related

Slackware :: XDM Segfault After Upgrading To RC1 1337

Mar 10, 2011

I encountered "xdm segfault" error due to libXt upgrade. startx worked, but xdm failed. Should be same bug as this link: [URL]

View 3 Replies View Related

CentOS 5 :: Npviewer.bin Crash With The Segfault?

Jul 7, 2009

when open an pdf and close the tab/windows at firefox I get the error at syslog: kernel: npviewer.bin[21396]: segfault at 0000001000000000 rip 00000030abe2646c rsp 00007fffb0978ca0 error 4

I use the last Acrobat Reader.CentOS 5.3 x86_64

View 6 Replies View Related

CentOS 5 :: Mod-php Causing Apache To Segfault?

Sep 22, 2010

I have a newly installed centos 5.5 x86_64 running as a guest on a xen environment. I've installed httpd, mysql, php, mod-php, cacti and some how mod-php i causing apache to exit with segmentation fault. I don't understand whats causing the problem, I have similar boxes with the same setup that works.

[Wed Sep 22 09:19:47 2010] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Wed Sep 22 09:20:11 2010] [notice] child pid 3040 exit signal Segmentation fault (11)

View 1 Replies View Related

Debian :: Colord-sane Segfault During Boot

Sep 6, 2015

I just saw this message in the syslog and wondered if it could have anything to do with my previous problems with LXDE crashing:

Code: Select allSepĀ  6 08:03:34 MyComputer kernel: [ 1003.788502] colord-sane[3381]: segfault at 21 ip b4de95ba sp b5609fb8 error 6 in[b4dbe000+4a000]

I have read a number of bug reports regarding this issue and it appears to go back about two years. It was supposedly fixed but that does not appear to be the case unless there is something peculiar with my Wheezy 7.8 installation.I just found this on a Ubuntu bug report. It is related to a colord-sane but not necessarily exactly the same as what I am experiencing.This is a libsane bug, not a colord bug. If you want to to work around it, change /etc/colord.conf to have UseSANE=false

View 2 Replies View Related

Fedora :: Ardour Fails To Start With Segfault

Dec 27, 2010

I recently changed my system from Ubuntu/Suse to Fedora14. Starting Ardour2 or Ardour3 (both build from SVN) or Ardour from the Repo-Package I get this:


Ardours Dev Paul Davis thinks, this is an issue with libxml2 but upgrading libxml2 and even downgrading it did not work either. With the fresh install of Fed14 2 weeks ago the Package from the repo did work very much OK. is there anything I can do?

View 3 Replies View Related

Ubuntu :: Unable To Access KDE Desktop Due To Segfault

Apr 16, 2010

For the past few weeks my system has been exhibiting some strange behavior. The first of these instances has been in the form of a total system lockup necessitating a power cycle -- ie. no kernel panic or oops, but cessation of all on-screen activity and an unresponsive mouse and keyboard. ( The first lockup occurred when the monitor was powered down)

Just a few days ago, I started noticing something else : Launching Firefox (3.6.4pre) resulted in it locking up near start-up especially if I was logged into Gmail. After that I experienced a total system lockup and then another one which has placed me in the situation as suggested in the title.

Specifically, KDM and the KDM login manager will start-up and I will be allowed to type my password. Immediately after that when the first of the icons in the KDE start-up animation starts to come into focus the screen goes black and I am returned to the KDM login manager -- I can enter my password again and continue this process ad infinitum.

Trying to diagnose the issue, I attached GDB to KDM. It seems that after I enter my password one or more of the KDE start-up processes dies with signal 1 or to be more specific :


Program received signal SIGUSR1, User defined signal 1.
0x00007f4ae742d3c3 in select () from /lib/
(gdb) bt full


View 3 Replies View Related

Ubuntu :: Get A Segfault Whenever Running Programs With OpenGL?

Oct 24, 2010

I'm running Ubuntu 10.04, and for some reason I get a segfault whenever running programs with OpenGL. I ran "lspci | grep VGA" in the terminal and this is the output:

02:00.0 VGA compatible controller: ATI Technologies Inc M92 [Mobility Radeon HD 4500 Series]

View 2 Replies View Related

Ubuntu Multimedia :: X11 Segfault With Tri Monitor Dual Gpu

Jul 31, 2011

I have tried to setup a workstation with 3 monitors on two ati videocards, the goal being to span the desktop across all of them.

The process was not difficult at all, but after login X11 crashes and I am left with a console. I am fortunately able to login in safe mode, but I would like to ask for help in debugging this issue.

Here I will try to give as much detail as possible, starting with my system specifications:


The first card, the ATI Radeon HD 4650 is capable of running two monitors at the same time. The monitors, for all it matters, are three identical ACER P206HV 20" connected with their analog interface (due to missing cables which I will buy soon). Resolution 1600x900 each. My motherboard is an AsRock 870 Extreme3 mounting an AMD Athlon II X4 640 3 GHz processor and 8 GB of RAM.

When asked by Ubuntu, I installed the ATI Caralyst driver version 11.6 and set it up for using Xinerama.

As I said, this setup works fine if I login in safe mode, but crashes X11 otherwise (even in classical mode - no Unity). By inspecting the logs (attached) I found this (notice the segfault)


As a test, I tryed to configure Catalyst without Xinerama, an this works, but of course I end up with two separate desktop, which is not what I want. In this mode, xrandr seems to work correctly


After some research I found that XRandR does not support desktop spanning over multiple GPUs, so Xinerama is the only way to go in my case. Since the two are not compatible with each other, after login in safe mode I see that XRandR is disabled


One more test consisted in disabling the XRandR module in the config files, as found in some posts: edits in /etc/X11/xorg.conf


configuring the ati driver:


View 3 Replies View Related

CentOS 5 :: Segfault Error 6 - Bash Script

Jul 14, 2009

I've got problem with one bash scrip which can run for random time (12h+) and then segfault:

clusterapp[17029]: segfault at 00007fff23100d00 rip 0000003da22426b4 rsp 00007fff23100cd0 error 6
clusterapp[14659]: segfault at 00007fff45cc3f50 rip 0000003da22426b4 rsp 00007fff45cc3f20 error 6

bash script:

updateMaster() {
echo > /tmp/master
sleep 5

View 1 Replies View Related

CentOS 5 :: How To Diagnose Bind Segfault Error

Jul 9, 2010

I downloaded bind 9 on my machine, but when I try to start the service "service named start" it fails. I found the logs by grep named /var/log/messages

Jul 8 22:10:49 localhost named[27072]: starting BIND 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 -u named -D -t /var/named/chroot
Jul 8 22:10:49 localhost named[27072]: adjusted limit on open files from 1024 to 1048576
Jul 8 22:10:49 localhost named[27072]: found 2 CPUs, using 2 worker threads
Jul 8 22:10:49 localhost named[27072]: using up to 4096 sockets
Jul 8 22:10:49 localhost named[27072]: loading configuration from '/etc/named.conf'
Jul 8 22:10:49 localhost named[27072]: using default UDP/IPv4 port range: [1024, 65535]
Jul 8 22:10:49 localhost named[27072]: using default UDP/IPv6 port range: [1024, 65535]
Jul 8 22:10:49 localhost named[27072]: listening on IPv4 interface lo,
Jul 8 22:10:49 localhost named[27072]: listening on IPv4 interface wlan0,
Jul 8 22:10:49 localhost named[27072]: command channel listening on
Jul 8 22:10:49 localhost named[27072]: command channel listening on ::1#953
Jul 8 22:10:49 localhost named[27072]: the working directory is not writable
Jul 8 22:10:49 localhost named[27072]: zone loaded serial 2010070700
Jul 8 22:10:49 localhost named[27072]: zone sending notifies (serial 2010070700)
Jul 8 22:10:49 localhost kernel: named[27073]: segfault at 00002aaaac0000d8 rip 00002aaaac0000d8 rsp 0000000040e78f58 error 15

I hear that "The working directory is not writable" is nothing to worry about and is just something that is complains about for no reason, but I can not decipher.
"Jul 8 22:10:49 localhost kernel: named[27073]: segfault at 00002aaaac0000d8 rip 00002aaaac0000d8 rsp 0000000040e78f58 error 15 "
I know segfault is having some memory problem at 00002aaaac0000d8 but does rip mean insertion point? What is rsp? Where do I find out what error 15 means?

View 12 Replies View Related

Programming :: Selenium Java Code Into Equivalent Php Code?

Mar 30, 2011

I need to rewrite the selenium java code into its equivalent php code.

View 5 Replies View Related

Debian Configuration :: Nautilus Segfault Preventing Login By Gdm

Mar 5, 2010

I removed my .gnome and .nautilus folders and .notifier file. it is working now. I do not know exactly which of these 3 fixed it but I hope this might help someone else!I have some major issue with nautilus which is preventing me from loogging in into my system which is kind of criticle this weekend.I'm running Squeeze with latest updates.

The problem:Today gnome gave some problems caus my taskbar was suddently gone. I couldn't get it back to i reinstall gnome-desktop and updated my whole system. At the update some yes/no questions on a blue screen asking me to restart cups etc had corrupted yes/no buttons. Weird character sets were shown. Well that can happen sometimes i thought.After reinstalling gnome i can't login anymore. My screen keeps flashing while it shows the loading icon of the mouse.Anyone got suggestions? I can't find similar problems on the internet, only problems that happen while already logged in. In my case the segfault prevents gdm starting!

View 1 Replies View Related

Debian Multimedia :: Segfault In Loading Plasma5

Sep 6, 2015

I'm having some trouble after the day 31 upgrade. Using the lightdm, kdm or sddm I'm unable to start a plasma session. Through dmesg I'm seeing that something is wrong with libxcb:

Code: Select all[ 3036.768102] drkonqi[5137]: segfault at 0 ip 00007fe39dce1a74 sp 00007ffce440bbb0 error 4 in[7fe39dcd7000+21000]
[ 3036.866658] drkonqi[5140]: segfault at 0 ip 00007fb637258a74 sp 00007ffe73d9cdd0 error 4 in[7fb63724e000+21000]
[ 3038.292760] drkonqi[5146]: segfault at 0 ip 00007efe584c8a74 sp 00007fff76ee5d70 error 4 in[7efe584be000+21000]
[ 3038.395858] drkonqi[5149]: segfault at 0 ip 00007f0fbc309a74 sp 00007ffc45fc0e20 error 4 in[7f0fbc2ff000+21000]

And I'm getting this in xsession-errors:

Code: Select allXsession: X session started for cris at Dom SetĀ  6 12:17:01 WEST 2015
localuser:cris being added to access control list
startkde: Starting up...
kdeinit5: preparing to launch 'libkdeinit5_klauncher'
kdeinit5: Launched KLauncher, pid = 5789, result = 0
Qt: Session management error: networkIdsList argument is NULL

[Code] .....

View 1 Replies View Related

Ubuntu Multimedia :: All Music Players Crash - Segfault?

Feb 4, 2011

Rhythmbox crashes on startup, Clementine crashes once I try to play any file, Banshee crashes after the first second of any file. Totem actually still works, but it's not a very satisfying media player. :P This occurred suddenly after working fine for, well, months. I read that I should check whether I have the standard up-to-date gstreamer/pulseaudio/liborc versions installed, this seems to be the case.

Here the terminal output for all crashes:




View 2 Replies View Related

Ubuntu :: GTK Win Decorator Segfault When Clicking On Menu Icon

May 25, 2011

I am running 11.04, and was running under Unity, and then moved back to Gnome 2.23.1. I am having a segfault occur any time I click on the window menu icon for any window. Once this occurs all the menu bars disappearing and I cannot move any of the windows, minimise/maximise, and while I am able to close most windows via their menu's it is really annoying! To get it back up I have to call gtk-window-decorator from the command line. This is how I found out it was a segfault.

** (gtk-window-decorator:18789): CRITICAL **: Could not find frame info xd0u0012x8fu0008u0001 in frame type table
Segmentation fault

View 4 Replies View Related

Debian Configuration :: Kernel Panic - Not Syncing / Segfault At Init

Feb 19, 2016

I recently tried to install php5-gd package on my debian vmware server and it failed at libc6 - i386.

Afterwards every command other than CD caused a Segmentation fault and the server would no long boot, showing the following error

[ 4.808086] init[1]: segfault at 0 ip (null) sp bff4645c error 14 in init[8048000+8000]
[ 4.808372] Kernel panic - not syncing: Attempted to kill init!
[ 4.808442] Pid: 1, comm: init Not tainted 3.2.0-4-686-pae #1 Debian 3.2.65-1

View 0 Replies View Related

Copyrights 2005-15, All rights reserved