Page 1 of 1
Bugs in windows XP?
Posted: Tue Nov 29, 2005 6:03 pm
by DaveS
After having relatively few problems using an older version of Neuron on in windows 98 some time ago, I have upgraded my version of Neuron to 5.8 and my OS to Windows XP. Now I am starting to have a few bugs.
First, when I change my working directory I get the message:
oc: Device or resource busy
nrniv: errno set during call of numarg
near line 2
{change_working_dir()}
Second, after I do a simulation run, the print function doesn't work. I can bring up the print dialog, and it finds the printer, but when I hit OK, nothing happens. Going to the Print menu again causes Neuron to shut down.
I just uninstalled and reinstalled the newest version of Neuron, and it has the same problem.
Any ideas?
Questions before blaming the OS
Posted: Wed Nov 30, 2005 8:57 am
by Raj
Have you changed your directory structure aswell?
(Not unlikely during a move like this. ) If so check your file paths, search for load_file, load_proc etc instructions.
How many copies of neuron are you running at the same time?
Neuron is claiming the hoc-file during execution, while runnning simulations only limited use of the hoc-file is possible. Leading also to the following question:
Do you have hoc-files open in an editor during execution?
First, try to exclude causes like these. Also try to think about other changes you made.
More questions:
Can you reproduce the "device or resource busy" error with a hoc-file only containing the change_working_directory instruction?
Does the print problem occur independently of the error message or after it in the same session?
Posted: Wed Nov 30, 2005 9:37 am
by hines
change_working_directory()
eventually calls chdir("directory"). You didn't say whether the process succeeded and your working directory got changed. You can test with
getcwd()
Anyway, that kind of error message is often benign and can be ignored if the working directory is correct. If it is a true failure, and the working directory did not get changed then it may be due to the fact that change_working_directory() tries
to read and write to a file called
$(NEURONHOME)/RecentWorkingDirs
You can determine the value of $(NEURONHOME) by looking at the result of the command:
neuronhome()
Take a look there and see if the file exists. Perhaps you have installed NEURON in a place where you do not have permission to read/write this file.
In regard to your other question, that is very disturbing because there certainly was such an error in an early version of 5.7 and it got fixed. Unfortunately, I do not have access to an xp machine connected to a printer today so perhaps ted can verify that the latest version of NEURON will print from the NEURONMainMenu/File/Print item
Printing works fine
Posted: Wed Nov 30, 2005 9:42 am
by Raj
Printing using NEURON -- Version 5.8 2005-10-14 12:36:2
under XP (with latest updates installed) works just fine.
Even if done twioce in a row.
Re: Questions before blaming the OS
Posted: Wed Nov 30, 2005 10:53 am
by DaveS
Thanks for the replies.
hines wrote:You can determine the value of $(NEURONHOME) by looking at the result of the command:
neuronhome()
Take a look there and see if the file exists. Perhaps you have installed NEURON in a place where you do not have permission to read/write this file.
The directory is correct, and recentworkingdirs is where it should be. The directory is successfully changed, so I guess the problem is benign for the moment.
Raj wrote:Have you changed your directory structure aswell?
(Not unlikely during a move like this. ) If so check your file paths, search for load_file, load_proc etc instructions.
Yes, the directory structure is changed, but it shouldn't matter because I rebuilt the model in the new version. Right?
How many copies of neuron are you running at the same time?
1
Neuron is claiming the hoc-file during execution, while runnning simulations only limited use of the hoc-file is possible. Leading also to the following question:
Do you have hoc-files open in an editor during execution?
no
Does the print problem occur independently of the error message or after it in the same session?
It does not happen unless I load the dll files for the simulation.
After printing, but before Neuron closed this time, I got the message:
nrniv: Segmentation violation See $NEURONHOME/lib/help/oc.help
near line 2
{action(1)}
^
Ideas?
Posted: Wed Nov 30, 2005 11:01 am
by Raj
Have you rebuild the dll? Using an old dll can cause strange behavior, so you need to rebuild the dll.
Posted: Wed Nov 30, 2005 12:16 pm
by DaveS
Raj wrote:Have you rebuild the dll? Using an old dll can cause strange behavior, so you need to rebuild the dll.
I really started from scratch, downloading and rebuilding everything over again.
Posted: Wed Nov 30, 2005 12:44 pm
by Raj
Just for clarity (please don't be offended):
You threw away all compiler output files *.o in your 'mod' directory, ran mknrndll on it and put the resulting nrnmech.dll in the right place?
Posted: Wed Nov 30, 2005 2:54 pm
by DaveS
Raj wrote:Just for clarity (please don't be offended):
You threw away all compiler output files *.o in your 'mod' directory, ran mknrndll on it and put the resulting nrnmech.dll in the right place?
Not insulted at all. All files were deleted, neuron was installed anew, *.mod files downloaded again, nrnmech.dll regenerated, and installed in the appropriate directory.
It's actually pretty weird. I have printed after every step (load Neuron, change directory, load session, run simulation), and it will print if I do it step-by-step.
If I do all the same steps, without pausing in between to print, Neuron crashes.
Pretty weird indeed
Posted: Thu Dec 01, 2005 4:01 am
by Raj
You could have won a bottle of wine by betting with me on the dll, but lucky for me we didn't.
Other things that crossed my mind are permissions under XP, but I don't see how printing in between would solve a permission problem.
Are you using a published model? I am willing to try to reproduce the problem on my machine.
Posted: Thu Dec 01, 2005 9:27 am
by DaveS
I could always use the bottle of wine, but I guess I missed my chance :D
It's not published, just an embarrassingly simple model of an insect axon and terminal bouton.