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

kernel_2d_fixed giving false assertion errors #623

Open
meshtag opened this issue Aug 4, 2021 · 1 comment
Open

kernel_2d_fixed giving false assertion errors #623

meshtag opened this issue Aug 4, 2021 · 1 comment
Labels
cat/bug But reports and bug fixes

Comments

@meshtag
Copy link
Member

meshtag commented Aug 4, 2021

Actual behavior

boost::gil::detail::kernel_2d_fixed gives false assertion errors during its initialization.

Expected behavior

A 2D kernel with provided values and center co-ordinates should be created

C++ Minimal Working Example

https://wandbox.org/permlink/apUAhyheZUyea3UO

#include <boost/gil.hpp>
namespace gil = boost::gil;
int main
{
    // your code
    std::array<int, 81> v = {0};
    gil::detail::kernel_2d_fixed<int, 9> kernel(v.cbegin(), 4, 4); // Not ok
}

This problem remained unnoticed in CI build due to this macro.

Environment

  • Compiler version: gcc 11.1.0
  • Version: Boost 1.76.0
@meshtag meshtag added the cat/bug But reports and bug fixes label Aug 4, 2021
@meshtag
Copy link
Member Author

meshtag commented Aug 4, 2021

A simple workaround for this problem is here. However, I think this issue can be dealt with in a more reliable/generic manner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat/bug But reports and bug fixes
Projects
None yet
Development

No branches or pull requests

1 participant