Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Access Violation while plotting non-empty X and empty Y arrays #2304

Open
xtotdam opened this issue Mar 18, 2024 · 0 comments
Open
Labels
state: pending not addressed yet type: bug bug

Comments

@xtotdam
Copy link

xtotdam commented Mar 18, 2024

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):
  <no Python frame>

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 <module>

This reproduces with add_bar_series, add_line_series etc

Expected behavior

No crash

Standalone, minimal, complete and verifiable example

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!

@xtotdam xtotdam added state: pending not addressed yet type: bug bug labels Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: pending not addressed yet type: bug bug
Projects
None yet
Development

No branches or pull requests

1 participant