I have been using nim only in linux until now, but I wanted to test it out in windows. Thing is, every binary freezes as soon as it is run, to the point where it is unkillable (even the uninstaller!). I can't say if it's just a problem with my pc, but it's something I have never seen before. Has anyone else experienced this, and maybe found a solution?
EDIT: For anyone with the same problem, the issue was my antivirus (Avast) was blocking the executables somehow. I fixed it by adding the path of my Nim installation under Settings->Active Protection->File System Shield (Customize)->Exclusions, which stops Avast from scanning files with that path.
Been using Nim for at least half a year without problems, but am compiling it from source, not using the installer.
I use Mingw64-x86 5.2.0 and MSVC 2010 compilers without problems.
Matic
@Swend
every binary freezes
Nim is a compiled language. While it may work to copy a Python script from a Linux Box to a Windows PC and run it there, it will generally not work copying a Nim program compiled on a Linux box to a Windows PC. You have to compile it on a Windows PC. (This may be not a very serious answer, but note that your post contains absolutely no relevant information and may be considered as a joke.)
If you can, please use process monitor to trace some of the events occurring in one of the executables. Using process explorer to analyze the stack of the frozen process will also help is determine what is wrong.
(Just so you know, the uninstaller isn't even written in Nim. If that is freezing, something seriously strange is going on with your system).
@Stefan_Salewski Considering the nature of the problem, the lack of information isn't surprising. Not everyone knows how to use debuggers or diagnostic tools to extract information from frozen processes.
I'm sorry, I wasn't very clear in the original post! I am talking about the binaries of Nim in the folder where I installed it, not programs compiled by Nim. I am perfectly aware how compiled languages work, at least to some extent. I installed with the 64 bit windows installer from the download section (nim-0.14.2_x64.exe). Any attempt to run nim (even without input) freezes, but can be killed through the process explorer (not the task manager).
@Varriount I tried running process monitor, and with auto-scrolling kept an eye on what happened exactly as I tried to run nim in the console. The only thing out of the ordinary was taskmgr.exe doing operation "load image" with path "C:Nimbinnim.exe", which makes sense. The process explorer shows cmd creating nim.exe as a child process, but if I try to inspect that process' properties, process explorer itself freezes in such a way that I can't kill it. Actually, now that I clicking around, absolutely no new processes can be started after I do this (even notepad fx). Firefox still works fine.
Anyway, it seems that this is an isolated problem for me, so I will try to find information elsewhere. Thanks for the answers though!
What do you mean by the main thread? In any case, I can't really use the process explorer to get any information since it just freezes.
E: I should be more specific. Right-clicking on "nim.exe" in the process explorer and choosing "Properties..." causes the explorer to freeze, and makes impossible to start any other programs on the computer. But as I said, this seems like it's a question for another forum.
It's possible to 'suspend' (pause) threads in various ways - a process can be created in a suspended state, a debugger can pause threads, or threads can be suspended via an undocumented kernel function NtSuspendProcess (process explorer uses the undocumented function when you right click an entry and select 'suspend'). Doing this to random processes can have strange consequences - for example, suspending a game with sound output will prevent some sound manipulation programs (such as Window's built-in sound mixer) from responding/spawning, as they try to communicate with the suspended process and wait until the communication is successful.
Tell me, are you able to generate a full dump of the process via process explorer? That doesn't require opening the properties menu. Also, could you use process explorer to look at the list of dlls loaded by the process, and see if there is anything out of the ordinary? You can also paste them in a gist or something and I can look over them.
If this is too much trouble for you, we could arrange a time to screenshare, and I could try doing to some diagnostics. You can usually find me on the #nim IRC channel.
Attempts to create a dump are met with "Error writing dump file: Only part of a ReadProcessMemory or WriteProcessMemory request was completed", but at least the explorer doesn't freeze. No processes are suspended. Only 3 files are shown below when I click the nim.exe process: apisetschema.dll, nim.exe and ntdll.dll.
It is definitely not too much trouble, I am happy that you will spend your time helping me.
Could you retry the above actions with an elevated process explorer (one run as an administrator)? Also, do you have an Antivirus program or something similar that could be causing this? Have you had any similar problems with other programs in the past?
Sorry for the questions, it's just that this is a very strange problem. The only time a process has just those three dlls loaded is very early in the program startup sequence when setting up the runtime environment, before the "main" function is called (before the "main" function is run, the C runtime envrionment must be setup, dlls loaded, etc).