-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module not working on Windows #30
Comments
Unfortunately I don't have Windows boxes to test/develop on. I'm relying on On Mon, Mar 24, 2014 at 10:13 AM, Miroslav Bajtoš
|
Sure. My primary motivation was to record the problem, so that other people can find this issue when troubleshooting Sinopia or fs-ext on Windows. @piscisaureus and me spent some time tracking down the issue, but were not able to pin down the root cause yet. One possible reason may be duplication of the fd->osfhandle table between Node core and the native module. I'll post an update if we find anything more. |
The failure is that the names @baudehlo I would willingly make a pull request for it but I'm not familiar with git and github anyway. I plan to learn it soon, but until that, feel free to fix this issue. |
I don't have windows to test against so a pull request would be preferable.
|
I have submitted a pull request fixing the constant vs. macro problem. Now the flock test |
FWIW, you can download a Windows image for VirtualBox (or other VM host) for free at |
@baudehlo to add to what @bajtos pointed to... Visual Studio Express 2013 If I had a better understanding of C/C++, I'd love to help with this... since this level of locking (and the need for range locking) are kind of important to me... as it is, I'm shimming the functionality I need via edge which works, but is not as lean as I'd really like it to be. |
Sadly those don't work on Macs :) And my main dev machine at home isn't On Thu, Oct 23, 2014 at 2:59 PM, Michael J. Ryan notifications@github.com
|
VirtualBox doesn't work on Mac? |
Yes it does, but I only have 2G of ram at home. I have plenty on my dev On Fri, Oct 24, 2014 at 12:26 AM, Michael J. Ryan notifications@github.com
|
Hi, I found the problem. The problem is that fs-ext tries to open an invalid file descriptor (EBADF). So I made a fix that node does not crash, when this happens. But I cannot resolve why the handle is invalid. Any ideas? Here is my test code: var fsExt = require("./fs-ext");
var fs = require("fs");
fs.open("D:/test/test.txt", "r", function(err, fd) {
fsExt.flock(fd, 6, function(test) { console.log(test); });
}); |
@simonhoss See my comment above. The problem seems to be caused by the way how Node.js works with Windows file handles, where the handles seem to be unavailable to native addons. As I mentioned earlier, I was debugging this with Bert, who wrote most of the Windows-specific code in Node.js core, and even he could not track down the source of the problem in a reasonably short time. |
Ok. So then I make a pull request that node does not crash and brings a EBADF error message. #36 |
I'm closing this issue now due to the merged pull requests. Please re-open if it's still an issue. |
I don't think #36 fixed the problem, see my comment: #36 (comment). However, since there was nobody else complaining about the Windows support in the last three months or so, I think it's ok to keep this issue closed. |
The HEAD version does not work on Windows 8.1 x64.
When used in Sinopia, it crashes the whole process. Release build of node v0.10.26 crashes with StackOverflow.
The debug build of node v0.10.26 reports
The text was updated successfully, but these errors were encountered: