Open 2shaar2059 opened 2 years ago
I ran into a similar error to yours, my bug report is:
The reason for my error is that Ubuntu installed matplotlib in two ways:
sudo pip3 install matplotlib
sudo apt install python3-matplotlib
Therefore, one of them should be uninstalled when performing 3D drawing, so I executed:
sudo pip3 uninstall matplotlib
After that it ran successfully.
I am seeing the same problem and this solution did not work for me. I am running on Windows and I have only one installation of matplotlib. It's version 3.7.1.
Same error for me. Arch linux with python 3.10.10 here's the backtrace from gdb: (gdb) bt
at pthread_kill.c:44
at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/vterminate.cc:95
at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:48
tinfo=0x555555562d60 <typeinfo for std::runtime_error@GLIBCXX_3.4>,
dest=0x7ffff76be480 <std::runtime_error::~runtime_error()>)
at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/eh_throw.cc:98
y=std::vector of length 41, capacity 64 = {...}, z=std::vector of length 41, capacity 64 = {...},
keywords=std::map with 0 elements, fig_number=0) at ../matplotlibcpp.h:567
And, I've got a fix for this issue. see https://stackoverflow.com/questions/76077363/why-does-matplotlib-cpp-throw-runtime-exceptions-in-the-3d-examples
Same issue. It seem because python matplotlib API has changed. I change matplotlib 3.7.2 to matplotlib 3.6.1 and it works.
I cloned the repo, made a build directory and made all of the examples. When trying to run them, however, certain ones worked and others didnt. The ones that simply segfaulted still displayed a plot. the ones that resulted in a runtime error didnt even show a plot.
System: OS: Ubuntu 20.04.4 LTS x86_64 Kernel: 5.4.0-113-generic "python3 --version" gives Python 3.8.10
$ ./animation Segmentation fault (core dumped)
$ ./basic Saving result to ./basic.png Segmentation fault (core dumped)
$ ./contour Segmentation fault (core dumped)
$ ./fill Segmentation fault (core dumped)
$ ./bar Segmentation fault (core dumped)
$ ./colorbar Segmentation fault (core dumped)
$ ./lines3d Segmentation fault (core dumped)
$ ./minimal Segmentation fault (core dumped)
$ ./surface Segmentation fault (core dumped)
$ ./modern Segmentation fault (core dumped)
$ ./spy Segmentation fault (core dumped)
$ ./subplot2grid Segmentation fault (core dumped)
$ ./update Segmentation fault (core dumped)
$ ./xkcd findfont: Font family ['xkcd', 'xkcd Script', 'Humor Sans', 'Comic Neue', 'Comic Sans MS'] not found. Falling back to DejaVu Sans. findfont: Font family ['xkcd', 'xkcd Script', 'Humor Sans', 'Comic Neue', 'Comic Sans MS'] not found. Falling back to DejaVu Sans. Segmentation fault (core dumped)
$ ./fill_inbetween terminate called after throwing an instance of 'std::runtime_error' what(): Call to show() failed. Aborted (core dumped)
$ ./nonblock terminate called after throwing an instance of 'std::runtime_error' what(): Call to subplot() failed. Aborted (core dumped)