We are experiencing an exception being thrown in GoJS. I suspect this won’t normally be seen by an end user but we capture all exceptions and log them so we are seeing it quite frequently. I can now reproduce it in Chrome when I edit the name of an object via the inline editor and then perform an undo.
The error message is Cannot read property ‘Xu’ of null and occurs at line 622 of the debug source in the following bit of code
There is no call stack, presumably because this gets called in response to an event somewhere, so there’s nothing I can directly change in my code to fix it.
I assume a.Gf is null when this is being called hence the error. I guess a fix would just be a check for null, but if that isn’t possible, has this been seen before and any ideas as to what is causing it (i.e something in my code?).
I should have said, this occurs if I do an inline edit, then click elsewhere then perform an undo. One thing I’ve noticed is the exception is raised if I use CTRL Z to attempt the undo but doesn’t happen if I use our toolbar button. That suggests to me that the inline editor is registering an event handler for the CTRL Z key combination but isn’t unregistering it?
Hmm, no it doesn’t happen in that example. So I guess it must be something related to the rest of our application. I’ll try to produce a stripped down example or find the underlying cause
I see what might be wrong in the source code here, but we’re really interested in the scenario that caused this issue. Could you put your code up publicly somewhere, or make us a reduced case?
I could give you access to our application, but all the code is minified so it may not be that useful? I’m just ripping things out at the moment to see if I can produce a test case