alandefreitas / matplotplusplus

Matplot++: A C++ Graphics Library for Data Visualization 📊🗾
https://alandefreitas.github.io/matplotplusplus/
MIT License
4.32k stars 333 forks source link

Unhandled exception thrown: read access violation. **this** was 0xFFFFFFFFFFFFFFF7. #417

Open jron53 opened 4 months ago

jron53 commented 4 months ago

Bug category

Describe the bug

Steps to Reproduce

Copied an example from your website:
#include <cmath>
#include <matplot/matplot.h>

int main() {
    using namespace matplot;

    std::vector<double> x = linspace(0, 2 * pi);
    std::vector<double> y1 = transform(x, [](auto x) { return sin(x); });
    std::vector<double> y2 = transform(x, [](auto x) { return sin(x - 0.25); });
    std::vector<double> y3 = transform(x, [](auto x) { return sin(x - 0.5); });
    plot(x, y1, x, y2, "--", x, y3, ":");

    show();
    return 0;
}

Output std::runtime_error exception, read access violation

```console Microsoft C++ exception: std::runtime_error at memory location 0x000000947E6FF060. ``` When I continue to debug I see: ```Unhandled exception thrown: read access violation. this was 0xFFFFFFFFFFFFFFF7.```

Platform

Environment Details:

Additional context