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

Info sometimes sends -1 output #314

Open
mrvux opened this issue May 31, 2017 · 5 comments
Open

Info sometimes sends -1 output #314

mrvux opened this issue May 31, 2017 · 5 comments

Comments

@mrvux
Copy link
Owner

mrvux commented May 31, 2017

Happens sometimes, hard to reproduce, so fitting issue here so I can add a sample file as soon as it happens

@mediadog
Copy link

A little more into (but still not a reproducible case - yet). It seems to happen after a lot of 2D textures have been loaded, in my case in association with a .dae model via Assimp. While the Info output is -1, the texture is still fine and displays properly when applied to something like a Quad.

@mediadog
Copy link

Hmmm, wondering of I'm not seeing some kind of race condition. FileTexture 2D will report the size of a texture, but not report it as Is Valid until something downstream needs the texture, even if Load in Background is false.

If Load in Background is false, and Info node is sufficient to cause the load of the textures. But if Load in Background is true, then an Info node by itself is not sufficient to cause the load, so it will report a size of -1 until something else needs the texture. So if the Info node is being used to determine the validity of a texture before applying it, it could never actually get loaded.

Put a Pipet node always forces the load, even if none if its outputs are connected, even when Load In Background is set. Shouldn't the Info node always act as a sink the way Pipet does?

@mrvux
Copy link
Owner Author

mrvux commented May 31, 2017

No it's not race condition, since by default textures are not always done async, plus I've seen those happening on render output.

Also about reporting size and valid, indeed that might be a tad confusiong, but basically:
FileTexture during evaluate will parse file header to retrieve size (so we avoid info node)
Is Valid is true only when texture is fully created (so actually, if for any random reason we fail to load texture, or it's not been used yet, valid is indeed false)

@mediadog
Copy link

Right, but if I'm using the Info node to decide whether to use a texture (to prevent other errors), it will never load even if it is good. There are places where I need to do this well downstream of the FileTexture node, and may not even know which FileTexture node it is coming from at that point.

Again, shouldn't Info be causing a load? After all it does when not loading in the background; sure seems like a bug. As I am explicitly asking for information about a texture, I should get it and not get -1 because of how the FileTexture node is set to load it - I have no way of knowing that downstream. Seriously kludgy to have to stick Pipets in so I can trust Info.

@mrvux
Copy link
Owner Author

mrvux commented May 31, 2017

Normally Info should create an early render, the fact that it fails sometimes is the bug I'm looking for :)

In case of background load, until texture is loaded it will still return -1, but issue I have here is that it consistently stays so (even in case of renderers at times)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants