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 bucket-collection related rendering bug #3409

Merged
merged 5 commits into from
Nov 5, 2018
Merged

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Oct 26, 2018

From time to time, moving around in the dataset caused some buckets to turn black even though they relative position to the viewport changed only slightly (e.g., a bucket right in the middle turned black if you moved a few voxels to the right).
I finally found the origin of this bug. Our bucket collection relies on an "accessed" flag which is only called on getData. However, once a bucket was moved to the GPU, getData is not called again. This PR simply ensures that the accessed flag is set everytime a bucket is selected for rendering. Subtle bug, subtle fix :)

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • I printed the bucket collection state and could verify that the symptoms exactly occurred once the 5000 bucket threshold was reached. After the fix, this didn't happen again. I think, there is no need to test again.

@philippotto philippotto self-assigned this Oct 26, 2018
@philippotto
Copy link
Member Author

To elaborate a bit: buckets were collected too early, then they were immediately re-created (and re-fetched), and the TextureBucketManager couldn't match the identical buckets, since the identity changed due to the re-creation. Which is why, the old bucket was swapped with the new bucket even though they were the same.

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.

Wow, very nice find!!!

@philippotto philippotto merged commit 572022e into master Nov 5, 2018
@philippotto philippotto mentioned this pull request Nov 6, 2018
jfrohnhofen added a commit that referenced this pull request Nov 22, 2018
* master:
  Fix rgb support (#3455)
  Fix docker uid/gid + binaryData permissions. Persist postgres db (#3428)
  Script to merge volume tracing into on-disk segmentation (#3431)
  Hotfix for editing TaskTypes (#3451)
  fix keyboardjs module (#3450)
  Fix guessed dataset boundingbox for non-zero-aligned datasets (#3437)
  voxeliterator now checks if the passed map has elements (#3405)
  integrate .importjs (#3436)
  Re-write logic for selecting zoom level and support non-uniform buckets per dimension (#3398)
  fixing selecting bug and improving style of layout dropdown (#3443)
  refresh screenshots (#3445)
  Reduce the free space between viewports in tracing (#3333)
  Scala linter and formatter (#3357)
  ignore reported datasets of non-existent organization (#3438)
  Only provide shortcut for tree search and not for comment search (#3407)
  Update Datastore+Tracingstore Standalone Deployment Templates (#3424)
  In yarn refresh-schema, also invalidate Tables.scala (#3430)
  Remove BaseDirService that watched binaryData symlinks (#3416)
  Ensure that resolutions array is dense (#3406)
  Fix bucket-collection related rendering bug (#3409)
@normanrz normanrz deleted the fix-missing-buckets branch February 20, 2019 16:35
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