try {  helper.getVmClass(child); } catch (NullPointerException ex) { Unsafe.debug("\nObject type  "); Unsafe.debug(vmClass.getName()); Unsafe.debug("\nChild addr   "); Unsafe.debug(helper.addressOf32(child)); Unsafe.debug("\nField offset "); Unsafe.debug(offset); Unsafe.debug("\nC.IsObject?  "); Unsafe.debug(heapManager.isObject(helper.addressOf(child)) ? "Yes" : "No"); Unsafe.debug("\nO.IsObject?  "); Unsafe.debug(heapManager.isObject(helper.addressOf(object)) ? "Yes" : "No"); Unsafe.debug('\n'); helper.die("NPE in processChild; probably corrupted heap"); }
    private void markObject(Object object, VmNormalClass vmClass) {        final int[] referenceOffsets = vmClass.getReferenceOffsets();        final int cnt = referenceOffsets.length;        final int size = vmClass.getObjectSize();        for (int i = 0; i < cnt; i++) {            int offset = referenceOffsets[ i];            if ((offset < 0) || (offset >= size)) {                Unsafe.debug("reference offset out of range!");                Unsafe.debug(vmClass.getName());                helper.die("Class internal error");            } else {                final Object child = helper.getObject(object, offset);                if (child != null) {                    processChild(child);                }            }        }    }