Jun 23, 2013 at 7:16 AM
Firstly, great work on DiscUtils.

I'm experimenting with the HfsPlus library and experienced a NullReferenceException in the GetKeyedNode(uint nodeId) method.

As a background, I created and attached a VHD to my local Win7 machine, then using MacDrive, initialized it and then formatted. This VHD is then presented by iSCSI to my dev machine.

I used the same VHD method and code to access an NTFS volume and it worked perfectly, so I moved on to Hfs and substituted HfsPlusFileSystem for NtfsFileSystem. (Of course, I'm assuming that MacDrive is creating a valid partition and volume). I've also tried options GPT vs APT and Hfs vs Hfs+.

Stacktrace and code sample included below.

I'd appreciate any comments or information you might offer.


at DiscUtils.HfsPlus.BTree1.GetKeyedNode(UInt32 nodeId) in d:\NTFS\Samples\ewfdiscutils\src\HfsPlus\BTree_T.cs:line 69
at DiscUtils.HfsPlus.BTree
1..ctor(IBuffer data) in d:\NTFS\Samples\ewfdiscutils\src\HfsPlus\BTree_T.cs:line 46
at DiscUtils.HfsPlus.HfsPlusFileSystemImpl..ctor(Stream s) in d:\NTFS\Samples\ewfdiscutils\src\HfsPlus\HfsPlusFileSystemImpl.cs:line 48
at DiscUtils.HfsPlus.HfsPlusFileSystem..ctor(Stream stream) in d:\NTFS\Samples\ewfdiscutils\src\HfsPlus\HfsPlusFileSystem.cs:line 37
at DiscUtilsTest01.Program.Main(String[] args) in d:\Misc\NTFS\Samples\Test Apps\DiscUtilsTest01\DiscUtilsTest01\Program.cs:line 34
            Initiator i = new Initiator();
            TargetInfo[] t = i.GetTargets("");
            Session s = i.ConnectTo(t[0]);

            //VolumeManager mgr = new VolumeManager(s.OpenDisk(0));
            //PhysicalVolumeInfo[] pVInfo = mgr.GetPhysicalVolumes();
            //PhysicalVolumeInfo pInfo = pVInfo[0];
            //HfsPlusFileSystem fileSystem = new HfsPlusFileSystem(pInfo.Open());
            //NtfsFileSystem fileSystem = new NtfsFileSystem(pInfo.Open());

            VolumeManager mgr = new VolumeManager(s.OpenDisk(0));
            LogicalVolumeInfo[] lVInfo = mgr.GetLogicalVolumes();
            VolumeInfo vInfo = lVInfo[0];
            HfsPlusFileSystem fileSystem = new HfsPlusFileSystem(vInfo.Open());
            //NtfsFileSystem fileSystem = new NtfsFileSystem(vInfo.Open());
Jun 23, 2013 at 11:09 AM

I seem to have made some progress with DiskDump, viewing the FS on an HfsPlus volume. I'll plug away on that and post my revised code (to help to DiscUtils newbie) once I understand what I am doing :-)