Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upRuntime error with arrays #474
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
Jan 6, 2016
Contributor
Did you check it's not one of these existing issues about arrays?
|
Did you check it's not one of these existing issues about arrays? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ckoster22
Jan 6, 2016
I checked. It could possibly be this issue (https://github.com/elm-lang/core/issues/349) but it's unclear whether it's the same. None of them mention the same runtime error.
ckoster22
commented
Jan 6, 2016
|
I checked. It could possibly be this issue (https://github.com/elm-lang/core/issues/349) but it's unclear whether it's the same. None of them mention the same runtime error. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Thanks! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
Jan 6, 2016
Contributor
I've played a bit with your example. By unrolling the recursion a bit (repeatedly inlining convert2D) and trying with reduced overall size, I reduced it to this:
import Array
temp =
let
n = 10
in
Array.initialize (4*n) identity
|> Array.slice n (4*n)
|> Array.slice n (3*n)
|> Array.slice n (2*n)
|> Array.slice n nThis shows the same error.
And interestingly, changing n = 10 to n = 8 lets the error go away (while it remains for n = 9). Noticing that for n = 8 we have 4*n = 32, the "magic number" from #349, it might have something to do with that issue after all, or maybe share a common root problem with that one...
|
I've played a bit with your example. By unrolling the recursion a bit (repeatedly inlining import Array
temp =
let
n = 10
in
Array.initialize (4*n) identity
|> Array.slice n (4*n)
|> Array.slice n (3*n)
|> Array.slice n (2*n)
|> Array.slice n nThis shows the same error. And interestingly, changing |
jvoigtlaender
referenced this issue
Apr 5, 2016
Closed
Array.length producing this error: TypeError: Cannot read property 'height' of undefined #549
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Jun 25, 2016
Member
Closing in favor of #649 which will track all array issues and progress on a new implementation.
|
Closing in favor of #649 which will track all array issues and progress on a new implementation. |
evancz
closed this
Jun 25, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wishfoundry
Nov 21, 2016
I suspect this line is the culprit:
var slot = new createNode(a.height - 1, 0);in:
https://github.com/elm-lang/core/blob/master/src/Native/Array.js#L730
createNode() generates an new node, it should not be new'ed up itself
wishfoundry
commented
Nov 21, 2016
|
I suspect this line is the culprit: var slot = new createNode(a.height - 1, 0);in: createNode() generates an new node, it should not be new'ed up itself |
ckoster22 commentedJan 6, 2016
Copy/paste into http://elm-lang.org/try
This is boiled down from a larger application. The relevant error is:
"Uncaught TypeError: Cannot read property 'height' of undefined everything.js:831"