LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Old October 29th 06, 12:21 PM posted to rec.radio.amateur.antenna
external usenet poster
 
First recorded activity by RadioBanter: Aug 2006
Posts: 6
Default Possible NEC2 bug

Hi,

I believe I have come across a possible bug in the original
NEC2 (nec2dx.f) program. It shows up in nec2c, my translation
of NEC2 from FORTRAN to C, as a segmentation fault when
running in Linux. In the original nec2dx.f it shows up as
an Array bounds violation fault if compiled with
gfortan -fbounds-check. In both cases of course the
programs crash. This happens when an input file specifying
a wire segment in contact with a patch and with the extended
thin-wire kernel (EK card) enabled:

CM --- NEC2 Input File created by xnec2c 0.9-beta ---
CE --- End Comments ---
GW 1 8 0.0 0.0 0.0 0.0 0.0 1.0 .003
SM 3 3 0.5 0.5 0.0 0.5 -0.5 0.0 0.0
SC 0 0 -0.5 -0.5 0.0 0.0 0.0 0.0 0.0
GE 0 0 0 0 0 0 0 0 0
EX 0 1 1 0 1.0 0.0 0.0 0.0 0.0 0.0
EK 0
FR 0 11 0 0 50.0 5.0 0.0 0.0 0.0 0.0
XQ 0 0 0 0 0 0 0 0 0 0
EN 0 0 0 0 0 0 0 0 0 0

The fault is due to an "illegal" value in the connections array
ICON2 where ICON2(1) in subroutine CMWW has a value of 10001.
This signals a connection of wire segment 1 to a patch and this
value is later used as an index to ICON2 itself causing an array
bounds violation, since ICON2 is dimensioned as 2*MAXSEG and
MAXSEG=1500 in this NEC2 version.

I don't think I am qualified enough to fix this bug so I wonder
if there is still an "official" maintainer of NEC2 and whether
it is possible to contact him with the above bug report.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphical NEC2 application for Linux neok Antenna 2 August 29th 06 03:52 PM
Problem with nec2 Detlef Conradin Antenna 7 November 3rd 05 01:28 PM
NEC2 modeling question Jack Twilley Antenna 8 April 10th 04 01:46 AM
aerial coupling and nec2 - I do not understand my results stuart macgregor Antenna 3 April 8th 04 05:46 PM
NEC2 translation to C Neoklis Antenna 19 February 6th 04 11:17 AM


All times are GMT +1. The time now is 12:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 RadioBanter.
The comments are property of their posters.
 

About Us

"It's about Radio"

 

Copyright © 2017