hoffstadt / hoffstadt/DearPyGui
Windows Access Violation while plotting non-empty X and empty Y arrays
- Dominant language
- C++
- Stars
- 15.6k
- Forks
- 783
- PR merge metrics
- No merged PRs in 30d
Description
## Version of Dear PyGui
Version: 1.10.1
Operating System: Win 10
## My Issue/Question
If I create / update a series plot while X array is not empty and Y is, then an Access violation error occurs:
```
Windows fatal exception: access violation
Thread 0x000037ec (most recent call first):
Current thread 0x00002bc4 (most recent call first):
File "C:\Mambaforge\envs\irge\Lib\site-packages\dearpygui\dearpygui.py", line 8908 in render_dearpygui_frame
File "C:\Dropbox\Projects\irge\dpg_experiments\vio.py", line 26 in
```
This reproduces with `add_bar_series`, `add_line_series` etc
## Expected behavior
No crash
## Standalone, minimal, complete and verifiable example
```python
import dearpygui.dearpygui as dpg
# this allows to see violation info
import faulthandler
faulthandler.enable()
dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()
with dpg.window(label="Access violation", height=550, width=350):
with dpg.plot(height=500, width=300):
dpg.add_plot_axis(dpg.mvXAxis)
dpg.add_plot_axis(dpg.mvYAxis)
dpg.add_line_series(x=[1], y=[], parent=dpg.last_item(), tag='plot:rates') # Violation
dpg.show_viewport()
while dpg.is_dearpygui_running():
# dpg.configure_item('plot:rates', x=[], y=[]) # OK
dpg.configure_item('plot:rates', x=[1], y=[]) # Violation
# dpg.configure_item('plot:rates', x=[], y=[1]) # OK
dpg.render_dearpygui_frame()
dpg.destroy_context()
```
### PS
Thanks for the awesome lib!
Contributor guide
Assessment
This issue has not been assessed yet.