segmentation violation

Anything that doesn't fit elsewhere.
Post Reply
Tsirogiannis
Posts: 9
Joined: Mon May 29, 2006 12:33 pm
Location: National Technical University of Athens

segmentation violation

Post by Tsirogiannis »

A segmentation violation error occured in a couple of circumstances.
The first time was in calling a function that was supposed to return an integer. I solved that problem by removing the localobj variables that I was using and setting them global, outside the function body.

However, afterwards, the same error occured in this block of code:

Code: Select all

for c1=0,ncells-1 {
	for c2=0,ncells-1 {
		print synapses[c1][c2] 
	}
}
,

where the "synapses" is supposed to be a 2-D array of integers. This block is not in a function or proc, simply in a hoc.
Here is the error:
nrniv: Segmentation violation
in C:/nrn59/my_models/net.hoc near line 307
}
What is the meaning of the "segmentation fault" and how can I resolve these issues?

Thanks a lot
ted
Site Admin
Posts: 6305
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Sometimes segmentation violations mean that there is a bug in NEURON, but most often
they are caused by user-written code that contains an error.

To diagnose the origin of the problem you encountered, it is necessary to examine the
code that declares the variable "synapses", and the code that assigns values to its
elements. Can you provide brief excerpts that show how you did this?
Post Reply