trase icon indicating copy to clipboard operation
trase copied to clipboard

Histogram example - Error in debug mode

Open Lorjuo opened this issue 6 years ago • 1 comments

When running in debug mode the histogram_gl example causes an error. Note: to run the example in real debug mode, the following lines have to be commented out in CMakeLists.txt:

add_compile_options("$<$CONFIG:Debug:${debug_options}>$<$<NOT:$CONFIG:Debug>:${not_debug_options}>")

... Otherwise the error will just be ignored.

Error Message: Debug Assertion Failed!

Program: C:\windows\system32\MSVCP140D.dll File: C:\LegacyApp\VisualStudio2015\VC\include\vector Line: 73

Expression: vector iterator not dereferencable

Stacktrace:

msvcp140d.dll!6c9b27e6()	Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for msvcp140d.dll]	
[External Code]	

histogram_gl.exe!trase::ColumnIterator::ColumnIterator(const std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types > > & p, const int stride) Line 56 C++ histogram_gl.exe!trase::RawData::end(int i) Line 49 C++ histogram_gl.exe!trase::DataWithAesthetic::endtrase::Aesthetic::x() Line 75 C++ histogram_gl.exe!trase::BinX::operator()(const trase::DataWithAesthetic & data) Line 54 C++ [External Code] histogram_gl.exe!trase::Transform::operator()(const trase::DataWithAesthetic & data) Line 83 C++ histogram_gl.exe!trase::Geometry::add_frame(const trase::DataWithAesthetic & data, float time) Line 53 C++ histogram_gl.exe!trase::Axis::plot_impl(const std::shared_ptrtrase::Geometry & plot, const trase::Transform & transform, const trase::DataWithAesthetic & values) Line 57 C++ histogram_gl.exe!trase::Axis::histogram(const trase::DataWithAesthetic & data, const trase::Transform & transform) Line 77 C++ histogram_gl.exe!main() Line 59 C++ [External Code]

Lorjuo avatar Feb 09 '19 20:02 Lorjuo

Thanks @Lorjuo. As I recall we turned off the iterator debug mode in msvc because it wasn't playing nicely with our custom iterator ColumnIterator. We need to (a) check if this is the same thing, or a new bug, and (b) make ColumnIterator work with msvc iterator debug mode (https://docs.microsoft.com/en-us/cpp/standard-library/debug-iterator-support?view=vs-2017)

martinjrobins avatar Feb 10 '19 06:02 martinjrobins