Skip to content
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

fix error when loading agglomerate skeleton for single-segment agglomerate #6294

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

fm3
Copy link
Member

@fm3 fm3 commented Jun 22, 2022

In newer hdf handling code we already added zero-length checks, but this old code did not have them. So when loading single-segment agglomerate skeletons, the edges array was empty, which cannot be passed to jhdf5 as is.

  • Needs datastore update after deployment
  • Ready for review

@fm3 fm3 added the backend label Jun 22, 2022
@fm3 fm3 requested a review from daniel-wer June 22, 2022 13:31
@fm3 fm3 self-assigned this Jun 22, 2022
@daniel-wer
Copy link
Member

I wanted to test this, but I'm not able to reproduce the error locally on master. I'm in a hybrid annotation without an editable mapping, rightclick - "Import Agglomerate Skeleton" for an agglomerate skeleton with a single node. Loads just fine 🤔

@fm3
Copy link
Member Author

fm3 commented Jun 22, 2022

huh that is odd. And the request is going to the datastore, and a skeleton with no edges is returned? Could you give me the relevant agglomerate file?

@daniel-wer
Copy link
Member

daniel-wer commented Jun 22, 2022

It's the test-agglomerate-file dataset with agglomerate_view_70 and segment 13 at position 61, 89, 101.
As far as I can see the request is going to the datastore and the resulting agglomerate has a single node.

@fm3
Copy link
Member Author

fm3 commented Jun 22, 2022

you are right 🤔 That ay mean that this problem does not happen for multi-dimensional arrays like edges. I wonder what the original bug report was about, then 🧐

@daniel-wer
Copy link
Member

daniel-wer commented Jun 22, 2022

As indicated internally, I think the problem only happens if the edges_offsets point to the end of the edges array. Apparently, jhdf5 then tries to read 0 elements from that index which fails.

I could reproduce the error on master using agglomerate 53 at position 147, 110, 124. This PR fixes the issue 🎉

Copy link
Member

@daniel-wer daniel-wer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@fm3 fm3 merged commit 5156a4d into master Jun 22, 2022
@fm3 fm3 deleted the single-segment-agglomerate-skeleton branch June 22, 2022 15:37
hotzenklotz added a commit that referenced this pull request Jun 23, 2022
…type

* 'master' of github.com:scalableminds/webknossos:
  fix error when loading agglomerate skeleton for single-segment agglomerate (#6294)
  Editable Mappings aka Supervoxel Proofreading (#6195)
  Increase maximum interpolation depth to 100 (#6292)
  Add download modal to dataset view actions (#6283)
  Drop "Explorational" from info tab (#6290)
  Allow version history view in annotations not owned by you (#6274)
  Bucket loading meter (#6269)
  Revert "Merge "Shared Annotations" with "My annotations" (#6230)" (#6286)
  Merge "Shared Annotations" with "My annotations" (#6230)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants