segmentation error: wopen
segmentation error: wopen
wopen in the File class gives a segmentation error with long path names.
-
- Site Admin
- Posts: 6394
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: segmentation error: wopen
To us help reproduce the problem, could you please provide an example that generates the error, and mention which version of NEURON and under what OS this occurred?
Re: segmentation error: wopen
When the following code is saved in a file and run with nrniv,
Then this is the output:
It only happens when the code is in a file arg to nrniv, not when the commands are typed directly into the interpreter. The error occurs depending on the length of the path, whether or not the path is valid. A shorter path produces no error. With a longer, valid path, the code actually opens the file and writes to it, but then a segmentation error occurs (no malloc message) at an unpredictable time... either after the code executed, or after I tried to quit using CTRL-D.
I'm running OS X 10.5.7 on a macbook pro.
Code: Select all
begintemplate Results
public translate
proc translate() { localobj file
file = new File()
file.wopen("/Users/benlhalt/NEURON/debugnet/translated_results/septohippo_lfp_threadsafe_06-29-09_02;30;42/septohippo_lfp_threadsafe_06-29-09_02;30;42_runtime=3.56_nthread=1/raster_for_septohippo_lfp_threadsafe_06-29-09_02;30;42_run_spike_trains_for_septohippo_lfp_threadsafe_06-29-09_02;30;42_runtime=3.56_nthread=1.txt")
print "open = ", file.isopen()
file.printf("hello")
}
endtemplate Results
objref results
results = new Results()
{ results.translate() }
Code: Select all
NEURON -- Release 7.0 (281:80827e3cd201) 80827e3cd201
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2008
See http://www.neuron.yale.edu/credits.html
nrniv(58664) malloc: *** error for object 0x7465f0: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
open = 1
nrniv(58664) malloc: *** error for object 0x7465f0: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
I'm running OS X 10.5.7 on a macbook pro.
Re: segmentation error: wopen
There was a limit of 256 characters (without the macro substitutions). The length
is now unlimited from the perspective of NEURON. There may be an OS limit.
See
http://www.neuron.yale.edu/hg/neuron/nr ... f06f8195ac
I made a new dmg for the mac at
http://www.neuron.yale.edu/ftp/neuron/versions/alpha/
is now unlimited from the perspective of NEURON. There may be an OS limit.
See
http://www.neuron.yale.edu/hg/neuron/nr ... f06f8195ac
I made a new dmg for the mac at
http://www.neuron.yale.edu/ftp/neuron/versions/alpha/
Re: segmentation error: wopen
Thank you!