Skip to content

error_check should clear Devil's error stack #11

@tobim-zz

Description

@tobim-zz

I ran into the problem that when a call to load_image failed, subsequent calls (with images Devil normally loads without a problem) would also fail for no apparent reason.

The problem seems to be that load_image may push multiple errors codes onto Devil's error stack (in my case there where around seven), but the error_check function calls IL.GetError() only once and so only pops one code of the stack.

The next time error_check is run it will raise an exception even if the previous operation was successful as there are still errors remaining on the stack.

As a workaround I clear the stack manually, by simply calling IL.GetError() until IL::NO_ERROR is returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions