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

Imagecache: do not abort/crash when too many error messages are accumulated #764

Closed

Conversation

brechtvl
Copy link
Contributor

I suspect this is not the proper solution, submitting this mostly to get advice.

I got a bug report with an OSL shader like this.

shader test(string Texture = "/some/file/that/does/not/exist.png", output color Color = 0)
{
    int resolution[2];

    if(gettextureinfo(Texture, "resolution", resolution)){
        float aspectratio = (float)resolution[1]/(float)resolution[0];
        Color = texture(Texture, P[0]*aspectratio, P[1]);
    }
}

This will call TextureSystem::get_texture_info many times, which leads to many errors reported due to the missing files, the error mesasages will exceed 16MB, and it will abort/crash. I think that there should be no crash at least, even if the user should be calling gettextureinfo(Texture, "exists", exists)?

…ulated,

rather print error message and stop accumulating.
@lgritz
Copy link
Collaborator

lgritz commented Dec 24, 2013

This doesn't seem like the right fix to me. I think that what this is indicating is that somewhere, we ought to be checking an error code and clearing the error message, but are not.

I'll see if I can track it down.

@lgritz
Copy link
Collaborator

lgritz commented Nov 24, 2018

Closing because I think that whatever was going on here has long since been fixed. With the modern OIIO & OSL code bases, this example does not accumulate error or have any other problems.

@lgritz lgritz closed this Nov 24, 2018
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

Successfully merging this pull request may close these issues.

None yet

2 participants