This project is read-only.
1
Vote

Bug? at calculateChangedSheets - currentsheet.intersectors is undefined

description

Hello

sometimes I get this rrror
TypeError: currentsheet.intersectors is undefined
after I performed a change at a sheet and now want to redraw. Of course I call calculateChangedSheets() before I call the redraw method.

I don't yet know when and how it exactly occurs. I can't reproduce this error intetionally. It just sometimes occur and sometimes not at likely changes..

Is ist a bug or am I doing something wrong?

PS: A complete refresh works by the way..

comments

dobsonl wrote Jul 14, 2014 at 12:57 PM

Do you happen to have the line number where the problem occurs?

Bagorolin wrote Jul 14, 2014 at 1:35 PM

oh sorry, i forgot this..
its line 1149 in gatherDirtySheets()

Bagorolin wrote Jul 14, 2014 at 1:35 PM

-.- why can't i edit a comment...
it's line 1449!!

Bagorolin wrote Jul 14, 2014 at 1:36 PM

ok now for the last time..
it's line 1418 at currentsheet.intersectors != null

Bagorolin wrote Jul 14, 2014 at 3:42 PM

Well, I'm not sure, but it looks like it works fine if I perform some retrys in a try/catch or just wait for a milisecond with setTimeOut.. Does this make sense to you?

dobsonl wrote Jul 14, 2014 at 4:17 PM

No, it doesn't. What is your test environment? What type of browser do you use?

Bagorolin wrote Jul 15, 2014 at 7:26 AM

I use Firefox on Win8. I don't use a backend. Just the file with html/css and javascript

Bagorolin wrote Aug 6, 2014 at 10:08 AM

Unfortunately I still get this error when I perform redrawings... But not every time.
No clue what the problem is?

TypeError: currentsheet.intersectors is undefined
Stack-Trace:
gatherDirtySheets@file:///path to/sheetengine.js:1419:22
calculateChangedSheets@file:///path to sheetengine.js:1575:9
Map._Map._drawMap/<@file:///path to file.js:514:5

dobsonl wrote Sep 4, 2014 at 6:52 AM

Sorry, I really don't understand how this is possible. If currentsheet is undefined then it should throw an error already before that line. If intersectors is undefined it should simply skip to the next line. Try changing line 1418 to this
if (currentsheet.intersectors) {
instead of this
if (currentsheet.intersectors != null) {