Closed joris-nijs closed 4 years ago
Thanks for your contribution @jnijs ! Can you tell me more about the bug, what happened ? A crash, assert failure, something else ?
The asserts in Tile::copy_from were triggered because the level and read_level tile are of different dimensions when the m_active_level atomic gets modified in between getting the current level tile from the 2 arrays. There are never crashes since the target tile will always >= the source tile.
Hi @jnijs, there is still an error at compile time. https://travis-ci.org/github/appleseedhq/appleseed/jobs/739207799#L1879
/home/travis/build/appleseedhq/appleseed/src/appleseed/renderer/kernel/rendering/localsampleaccumulationbuffer.cpp:260:55: error: ‘class boost::atomics::atomic<unsigned int>’ has no member named ‘value’
const std::uint32_t active_level = m_active_level.value(); // Ensure the same active_level is used for both arrays.
^~~~~
The m_active_level atomic is modified in store_samples outside the critical section protected by m_lock. Ensure the same level is used as source and target level.