Open dmitrypuzyrev opened 4 weeks ago
I've attempted to recreate the issue described by you @dmitrypuzyrev with Windows 11, NVIDIA graphics hardware and all three python versions. However, the issue does not occur for me at all. All plots are generated correctly. Maybe an important feature of your system description or a step necessary for reproduction is missing.
I have checked it on the laptop with Win11/Intel internal graphics too, same problem. No problem on a Linux PC though.
Some debugging leads to a fact that it always crashes during the first call of fig = plt.figure()
in \ParticleDetection\reconstruct_3D\visualization.py (so it does not depend on the data passed to the plotting functions).
No exceptions are produced, only the warning message:
[08/18 18:02:50] py.warnings WARNING: C:\prog\Anaconda3\envs\rodtracker2\lib\site-packages\ParticleDetection\reconstruct_3D\visualization.py:238: UserWarning: Starting a Matplotlib GUI outside of the main thread will likely fail. fig = plt.figure()
which is disabled by default.
My vague idea is: I tried to search something about similar error and only undestood that in general interactive plotting is not supposed to be done directly outside of main thread while QtAgg
is not thread-safe. I guess there is already a workaround implemented when "Plotter" thread just generates figure and passes it as a signal, but does not actually show the plot. However, "plt.figure()" might not behave as intended here (tries to show something immediately even in non-interactive mode or something like that?) and produces crashes.
It also works without problem on Linux and @a-niem Windows PC for some reason.
Describe the bug The program always crashes when clicking
3D Reconstruct -> Update plots
button, if any 3D data is present (i.e. data with 3D coordinates loaded from .csv, or new 3D reconstruction performed). Seems to be a problem with 2D plots, the 3D-view works fine.To Reproduce Steps to reproduce the behavior:
3D Reconstruct -> Update plots
- Crash without any error messageExpected behavior Should show/update 2D plots.
Screenshots
Desktop (please complete the following information):
Logs No error messages / entries in logfile are produced