Program: 924
Project: 924
Buggy source:
@Override public void onOpened(){
  if (!initialised) {
    initialised=true;
    ItemIcon icon=new ItemIcon();
    setAttachment(icon);
    icon.bindIcon(new ReadOnlyBinding<TextureRegion>(){
      @Override public TextureRegion get(){
        if (getItem().exists()) {
          ItemComponent itemComp=getItem().getComponent(ItemComponent.class);
          if (itemComp != null) {
            return itemComp.icon;
          }
          BlockItemComponent blockItemComp=getItem().getComponent(BlockItemComponent.class);
          if (blockItemComp == null) {
            return Assets.getTextureRegion("String_Node_Str");
          }
        }
        return null;
      }
    }
);
    icon.bindMesh(new ReadOnlyBinding<Mesh>(){
      @Override public Mesh get(){
        BlockItemComponent blockItemComp=getItem().getComponent(BlockItemComponent.class);
        if (blockItemComp != null) {
          return blockItemComp.blockFamily.getArchetypeBlock().getMesh();
        }
        return null;
      }
    }
);
    icon.setMeshTexture(Assets.getTexture("String_Node_Str"));
    icon.bindQuantity(new ReadOnlyBinding<Integer>(){
      @Override public Integer get(){
        ItemComponent itemComp=getItem().getComponent(ItemComponent.class);
        if (itemComp != null) {
          return UnsignedBytes.toInt(itemComp.stackCount);
        }
        return 1;
      }
    }
);
    bindItem(new ReadOnlyBinding<EntityRef>(){
      @Override public EntityRef get(){
        CharacterComponent charComp=localPlayer.getCharacterEntity().getComponent(CharacterComponent.class);
        if (charComp != null) {
          return InventoryUtils.getItemAt(charComp.movingItem,0);
        }
        return EntityRef.NULL;
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void onOpened(){
  if (!initialised) {
    initialised=true;
    ItemIcon icon=new ItemIcon();
    setAttachment(icon);
    icon.bindIcon(new ReadOnlyBinding<TextureRegion>(){
      @Override public TextureRegion get(){
        if (getItem().exists()) {
          ItemComponent itemComp=getItem().getComponent(ItemComponent.class);
          if (itemComp != null) {
            return itemComp.icon;
          }
          BlockItemComponent blockItemComp=getItem().getComponent(BlockItemComponent.class);
          if (blockItemComp == null || blockItemComp.blockFamily == null) {
            return Assets.getTextureRegion("String_Node_Str");
          }
        }
        return null;
      }
    }
);
    icon.bindMesh(new ReadOnlyBinding<Mesh>(){
      @Override public Mesh get(){
        BlockItemComponent blockItemComp=getItem().getComponent(BlockItemComponent.class);
        if (blockItemComp != null && blockItemComp.blockFamily != null) {
          return blockItemComp.blockFamily.getArchetypeBlock().getMesh();
        }
        return null;
      }
    }
);
    icon.setMeshTexture(Assets.getTexture("String_Node_Str"));
    icon.bindQuantity(new ReadOnlyBinding<Integer>(){
      @Override public Integer get(){
        ItemComponent itemComp=getItem().getComponent(ItemComponent.class);
        if (itemComp != null) {
          return UnsignedBytes.toInt(itemComp.stackCount);
        }
        return 1;
      }
    }
);
    bindItem(new ReadOnlyBinding<EntityRef>(){
      @Override public EntityRef get(){
        CharacterComponent charComp=localPlayer.getCharacterEntity().getComponent(CharacterComponent.class);
        if (charComp != null) {
          return InventoryUtils.getItemAt(charComp.movingItem,0);
        }
        return EntityRef.NULL;
      }
    }
);
  }
}