NullPointerException from NTFS FileRecord.readData

Getting the following while reading from an NTFSFile:

java.lang.NullPointerException
at org.jnode.fs.ntfs.FileRecord.readData(FileRecord.java:194)
at org.jnode.fs.ntfs.NTFSFile.read(NTFSFile.java:75)

It's happening on the first two lines:

final NTFSAttribute data = this.getAttribute(NTFSAttribute.Types.DATA);
if (data.isResident()) {

It seems that getAttribute is returning null.

I am willing to put in a workaround, but in what situations do you think this method would return null? I don't want to shoot myself in the foot by modifying this in the wrong fashion.

Another one

No responses to that question? That's okay. For now, I have worked around that previous error for the time being, by skipping over the file which had the problem.

But here's another peculiar one. Some file later on simply hangs. Turns out _this_ file is doing the same thing over and over.

2006-05-16 16:05:47,640 [main] 332312 DEBUG org.jnode.fs.ntfs.NTFSStructure - getAttribute(0x0080)
2006-05-16 16:05:47,640 [main] 332312 DEBUG org.jnode.fs.ntfs.NTFSStructure - me:0-3, req:776-776
2006-05-16 16:05:47,640 [main] 332312 DEBUG org.jnode.fs.ntfs.NTFSStructure - me:4-7, req:776-776

Those three lines repeat over and over. Not coincidentally, Attribute 0x0080 is DATA, so it's the same attribute causing trouble this time.

Recursion is rather nasty... any ideas on ways around that one?

Not much ntfs users

Hi Daniel,

I'm sorry I can't help in solving your problem and the original author of the code is not an active JNode developer anymore afaik. I'm also afraid there are not many people using ntfs at all, since most developement is done by booting from CD or using the new jfat filesystem.

Though I suggest you to join our IRC channel, perhaps we can help to track down the problem.