Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17077 closed defect (fixed)

[patch][CCLA]Chart.destroy() causes canvas null pointer

Reported by: pschoepf Owned by: Patrick Ruzand
Priority: undecided Milestone: 1.8.5
Component: DojoX GFX Version: 1.8.3
Keywords: Cc: Patrick Ruzand
Blocked By: Blocking:

Description

Hi, I have a mobile app that heavility uses dojo charts. Since SVG rendering of line charts is quite slow on iPad (IOS6)we use the canvas renderer implementation. This causes a problem when destroy() is called on the chart. It seems like it triggers makeDirty() on the canvas when then runs into its _render method and produces a "Cannot call method 'getContext' of null". I will attach a modified test case which shows the problem.

Btw, does anybody know why SVG is so slow compared to canvas especially when it comes to TouchZoomAndPan? ? Its already unusable on iPad3 with 3-4 series with each having about 50 data points.

Attachments (3)

test_grid_destroy.html (1.8 KB) - added by pschoepf 6 years ago.
Testcase showing error
canvas_destroy.html (1.1 KB) - added by Patrick Ruzand 6 years ago.
gfx testcase
17077.patch (2.4 KB) - added by Patrick Ruzand 6 years ago.
fix + doh testcase, pruzand (IBM, CCLA)

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by pschoepf

Attachment: test_grid_destroy.html added

Testcase showing error

comment:1 Changed 6 years ago by bill

Component: GeneralCharting
Owner: set to Eugene Lazutkin

comment:2 Changed 6 years ago by cjolif

Cc: Patrick Ruzand added
Status: newopen

I suspect a gfx issue not a charting issue.

For the performance question I'm testing http://demos.dojotoolkit.org/demos/mobileCharting on an iPad 1 (so older than 2) and even though not as fast as I would hope this looks reasonable?

comment:3 Changed 6 years ago by Patrick Ruzand

Component: ChartingDojoX GFX
Owner: changed from Eugene Lazutkin to Patrick Ruzand
Status: openassigned

I confirm it's a gfx issue. I'm handling it.

Changed 6 years ago by Patrick Ruzand

Attachment: canvas_destroy.html added

gfx testcase

Changed 6 years ago by Patrick Ruzand

Attachment: 17077.patch added

fix + doh testcase, pruzand (IBM, CCLA)

comment:4 Changed 6 years ago by Patrick Ruzand

Summary: Chart.destroy() causes canvas null pointer[patch][CCLA]Chart.destroy() causes canvas null pointer

comment:5 Changed 6 years ago by Patrick Ruzand

Milestone: tbd1.9.1

comment:6 Changed 6 years ago by Patrick Ruzand

Resolution: fixed
Status: assignedclosed

In [31432]:

ensure canvas.rawNode exists before rendering the scene. fixes #17077

comment:7 Changed 6 years ago by Patrick Ruzand

In [31433]:

ensure canvas.rawNode exists before rendering the scene. backport to 1.8. fixes #17077

comment:8 Changed 6 years ago by Patrick Ruzand

Milestone: 1.9.11.8.5
Note: See TracTickets for help on using tickets.