Uncaught TypeError: Cannot read property 'getState' of null

Error thrown from gantt internal

here is my investigation:

when you call removeAll in destructor, the method will cause a chain of method call and event callbacks, in the first picture, you start a delayed job to render something, but the gantt instance is already destroyed in the second picture and third picture. that’s where the problem is at.

I think you should add a checking here to avoid null gantt instance in delayed job

Hi Kevin,

thanks, you’re completely right, I’ve confirmed the bug.
I hope we’ll get to it very soon and the fix will be available in the next few days

Hi Aliaksandr,

is this bug already fixed in current stable release?

Hi Kevin,
I believe so. It should be fixed starting from gantt v6.1.1 , it addressed a couple of regressions related to gantt.desctructor
https://docs.dhtmlx.com/gantt/whatsnew.html#611

good to hear that, thanks