error with array buffer allocation failure
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 18.3k
- Fork
- 2k
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 28
Mô tả
Describe your context
Steps to setup my environment
conda create -n test python=3.8
conda activate test
pip install dash==1.17.0
pip install plotly==4.12.0
pip install numpy==1.18
My pip list
Brotli 1.0.9
certifi 2020.11.8
click 7.1.2
dash 1.17.0
dash-core-components 1.13.0
dash-html-components 1.1.1
dash-renderer 1.8.3
dash-table 4.11.0
Flask 1.1.2
Flask-Compress 1.8.0
future 0.18.2
itsdangerous 1.1.0
Jinja2 2.11.2
MarkupSafe 1.1.1
numpy 1.18.0
pip 20.2.4
plotly 4.12.0
retrying 1.3.3
setuptools 49.6.0.post20201009
six 1.15.0
Werkzeug 1.0.1
wheel 0.35.1
wincertstore 0.2
My System
OS: Win10 Pro
Browser: Chrome v86.0.4240.193
NodeJS v12.16.2
Describe the bug
I am getting Array buffer allocation failed error when I try to generate a 3D plot with a huge number of data points in it.
Here is my code to reproduce the error when using n=2500
import dash
import dash_core_components as dcc
import dash_html_components as html
import numpy as np
import plotly.graph_objs as go
def get_figure(n):
x = np.linspace(-100, 100, n)
y = np.linspace(-100, 100, n)
xx, yy = np.meshgrid(x, y)
r = np.sqrt(xx**2 + yy**2)
zz = np.sin(r) * np.cos(xx)
return go.Figure(
data = go.Surface(z=zz),
layout=dict(width=600, height=600))
app = dash.Dash(__name__, suppress_callback_exceptions=True)
server = app.server
app.layout = html.Div(
dcc.Graph(
figure=get_figure(n=2500)
)
)
if __name__ == '__main__':
app.run_server(debug=True)

Expected behavior
Here is how it looks when I lower the value n, to n=800. I expect dash to render the 3D plot without a problem at n>=2500 but it gives me the Array buffer allocation failed error.

Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với bản tái hiện Python/Dash được cung cấp, so sánh n=800 với n=2500 trong trình duyệt. Truy vết đường dẫn kết xuất bề mặt 3D được kích hoạt bởi dcc.Graph và lỗi Array buffer allocation failed đã được báo cáo; được xem là hoàn tất khi trường hợp n=2500 có kết quả xác định, đã được xác minh, thay vì lỗi cấp phát không được xử lý.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, numpy, python
- Lĩnh vực
- data-visualization, frontend, performance
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100