Core: Runtime error (TypeError: Cannot read property 'height' of undefined) Array cannot shuffle a poker deck more than once.

Created on 19 Dec 2016  路  6Comments  路  Source: elm/core

Try it out for yourself - https://github.com/Pilatch/elm-array-shuffle-runtime-error-demonstration

    ./run.sh
    Success! Compiled 1 module.
    Successfully generated /var/folders/62/l5yyw47972g_51fgh99mggy4r_cqvv/T/elm_test_1161119-2066-3ag687.i3rr418aor.js

    elm-test
    --------

    Running 1 test. To reproduce these results, run: elm-test --seed 1047907805

    Unhandled exception while running the tests: TypeError: Cannot read property 'height' of undefined
        at length (eval at <anonymous> (/usr/local/opt/nvm/versions/node/v6.3.0/lib/node_modules/elm-test/bin/elm-test:119:37), <anonymous>:6127:11)
        at sliceLeft (eval at <anonymous> (/usr/local/opt/nvm/versions/node/v6.3.0/lib/node_modules/elm-test/bin/elm-test:119:37), <anonymous>:5805:10)
        at Function.slice [as func] (eval at <anonymous> (/usr/local/opt/nvm/versions/node/v6.3.0/lib/node_modules/elm-test/bin/elm-test:119:37), <anonymous>:5726:9)
        at A3 (eval at <anonymous> (/usr/local/opt/nvm/versions/node/v6.3.0/lib/node_modules/elm-test/bin/elm-test:119:37), <anonymous>:98:11)
        at Function.eval (eval at <anonymous> (/usr/local/opt/nvm/versions/node/v6.3.0/lib/node_modules/elm-test/bin/elm-test:119:37), <anonymous>:12834:15)
        at A2 (eval at <anonymous> (/usr/local/opt/nvm/versions/node/v6.3.0/lib/node_modules/elm-test/bin/elm-test:119:37), <anonymous>:92:11)
        at Function.eval (eval at <anonymous> (/usr/local/opt/nvm/versions/node/v6.3.0/lib/node_modules/elm-test/bin/elm-test:119:37), <anonymous>:12896:15)
        at A3 (eval at <anonymous> (/usr/local/opt/nvm/versions/node/v6.3.0/lib/node_modules/elm-test/bin/elm-test:119:37), <anonymous>:98:11)
        at Function.eval (eval at <anonymous> (/usr/local/opt/nvm/versions/node/v6.3.0/lib/node_modules/elm-test/bin/elm-test:119:37), <anonymous>:12916:10)
        at A2 (eval at <anonymous> (/usr/local/opt/nvm/versions/node/v6.3.0/lib/node_modules/elm-test/bin/elm-test:119:37), <anonymous>:92:11)
    Modify Library/PerformanceTest/ShuffleTests.elm
    to switch between Array implementations, and number of shuffles.
    See the comments near the top of that file.
bug no sscce

Most helpful comment

http://package.elm-lang.org/packages/elm-lang/core/latest/Array should at least say it's deprecated or have a warning or _something_.

All 6 comments

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

elm -v
0.18.0

Array is known to be broken. Use this library instead.

http://package.elm-lang.org/packages/elm-lang/core/latest/Array should at least say it's deprecated or have a warning or _something_.

Without an SCCEE I'm not sure the root thing you are running in to, but it is now tracked in #649.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Spenhouet picture Spenhouet  路  5Comments

Fresheyeball picture Fresheyeball  路  5Comments

opvasger picture opvasger  路  6Comments

dullbananas picture dullbananas  路  3Comments

zzz6519003 picture zzz6519003  路  4Comments