New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Pilatch opened this Issue Dec 19, 2016 · 6 comments

Comments

Projects
None yet
5 participants
@Pilatch

Pilatch commented Dec 19, 2016

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.
@process-bot

This comment has been minimized.

Show comment
Hide comment
@process-bot

process-bot Dec 19, 2016

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.

process-bot commented Dec 19, 2016

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.

@Pilatch

This comment has been minimized.

Show comment
Hide comment
@Pilatch

Pilatch Dec 19, 2016

elm -v
0.18.0

Pilatch commented Dec 19, 2016

elm -v
0.18.0

@mgold

This comment has been minimized.

Show comment
Hide comment
@mgold

mgold Dec 20, 2016

Contributor

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

Contributor

mgold commented Dec 20, 2016

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

@Pilatch

This comment has been minimized.

Show comment
Hide comment
@Pilatch

Pilatch Dec 20, 2016

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

Pilatch commented Dec 20, 2016

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

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Mar 25, 2017

Member

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

Member

evancz commented Mar 25, 2017

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

@evancz evancz closed this Mar 25, 2017

@shuhei shuhei referenced this issue Aug 31, 2017

Merged

Redo history and use Array.Hamt #22

3 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment