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

Make sure texture is not updated too early since these updates get lost silently #3262

Merged
merged 5 commits into from
Sep 24, 2018

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Sep 21, 2018

After hours of debugging I finally found out the evil culprit: if (!textureProperties.__webglTexture) return;. ThreeJS initializes the texture only after the initial render. However, the buckets were partially written to the texture before that. Due to the silent failure, the buckets were essentially "written" as "black" to the texture.

I hope this fixes #3259, but I'm not too sure.

URL of deployed dev instance (used for testing):

Steps to test:

  • load a tracing and ensure that all buckets are loaded on first try

Issues:


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.

Awesome find! 🙏 Tested locally, works :)

@@ -134,7 +136,7 @@ export default class TextureBucketManager {
}

keepLookUpBufferUpToDate() {
if (this.isRefreshBufferOutOfDate) {
if (this.lookUpTexture.isInitialized() && this.isRefreshBufferOutOfDate) {
Copy link
Member

Choose a reason for hiding this comment

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

As discussed, it would be better to move this check into the startRAFLoops method and wait for the initialization of the texture, there :) Same for the check in the processWriterQueue method.

@philippotto philippotto merged commit fdfece8 into master Sep 24, 2018
philippotto added a commit that referenced this pull request Sep 27, 2018
…st silently (#3262)

* make sure texture is not updated too early since these updates get lost silently

* update changelog

* fix tests

* refactor waiting for initialization in texture bucket manager
@normanrz normanrz deleted the fix-initial-rendering 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.

Color and segmentation data is missing or corrupted sometimes
2 participants