Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Graphical NEC2 application for Linux | Antenna | |||
Problem with nec2 | Antenna | |||
NEC2 modeling question | Antenna | |||
aerial coupling and nec2 - I do not understand my results | Antenna | |||
NEC2 translation to C | Antenna |