[ns] Bus error

2006-06-21 Thread Brad Montgomery

Hello ns-users,

I'm new to ns, and I'm using ns-allinone-2.29.
I've recently created an Agent that is very similar to Ping agent included
in the source.  However, when I set up and run a simulation, I get this:

Bus error

The first 3 lines of my simulation look like this:

set ns [new Simulator]
set tracefile [open test1.tr w]
set namfile [open test1.nam w]

However, both files are empty after running the simulation.  I've searched
the manual, and I've grepped my entire ns directory for 'Bus error' to no
avail! 

Any info on this message is GREATLY appreaciated.

Thanks,

Brad



Re: [ns] Bus error

2006-06-21 Thread Pedro Vale Estrela


This looks to be equivalent to a segmentation fault

Run NS2 inside a debugger like DDD to debug it


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of Brad Montgomery
 Sent: quarta-feira, 21 de Junho de 2006 23:46
 To: ns-users@ISI.EDU
 Subject: [ns] Bus error
 
 
 Hello ns-users,
 
 I'm new to ns, and I'm using ns-allinone-2.29.
 I've recently created an Agent that is very similar to Ping agent included
 in the source.  However, when I set up and run a simulation, I get this:
 
 Bus error
 
 The first 3 lines of my simulation look like this:
 
 set ns [new Simulator]
 set tracefile [open test1.tr w]
 set namfile [open test1.nam w]
 
 However, both files are empty after running the simulation.  I've searched
 the manual, and I've grepped my entire ns directory for 'Bus error' to no
 avail!
 
 Any info on this message is GREATLY appreaciated.
 
 Thanks,
 
 Brad




Re: [ns] Bus error

2006-06-21 Thread Brad Montgomery

Thanks for the help, but I started looking back through my code and found
this:
   if (argc = 2) 

It's nice to know what a Bus error, is now, though!

On 6/21/06 6:08 PM, Phil Miller [EMAIL PROTECTED] wrote:

 On 6/21/06, Brad Montgomery [EMAIL PROTECTED] wrote:
 
 Hello ns-users,
 
 I'm new to ns, and I'm using ns-allinone-2.29.
 I've recently created an Agent that is very similar to Ping agent included
 in the source.  However, when I set up and run a simulation, I get this:
 
 Bus error
 
 The first 3 lines of my simulation look like this:
 
 set ns [new Simulator]
 set tracefile [open test1.tr w]
 set namfile [open test1.nam w]
 
 However, both files are empty after running the simulation.  I've searched
 the manual, and I've grepped my entire ns directory for 'Bus error' to no
 avail!
 
 Any info on this message is GREATLY appreaciated.
 
 Brad, this error is a result of the NS code doing something illegal or
 a hardware problem. In vague terms, it can happen in circumstances
 similar to segmentation faults (SIGSEGV on common x86 Linux systems).
 
 What platform and operating system (including version) are you running
 ns on? Also, if you can include the entire file that you're attempting
 to run, that could make debugging much easier.
 
 Phil Miller