browser
browser copied to clipboard
Maximum call stack size exceeded when running --debug
The following app will throw a stack overflow exception on start up when the debugger is enabled. This occurs in both elm/browser
1.0.1 and 1.0.2
module Main exposing (main)
import Browser
import Html exposing (Html)
import Task
import WebGL exposing (Mesh)
init : ( Mesh Int, Cmd () )
init =
( List.repeat 10000 0 |> WebGL.triangleFan
, Task.succeed () |> Task.perform (\_ -> ())
)
main : Program () (Mesh Int) ()
main =
Browser.element
{ init = \_ -> init
, view = \_ -> Html.text ""
, update = \_ model -> ( model, Cmd.none )
, subscriptions = \_ -> Sub.none
}
https://discourse.elm-lang.org/t/rangeerror-maximum-call-stack-size-exceeded-when-decoding-a-long-list/4605/6 has a diagnosis.
https://discourse.elm-lang.org/t/rangeerror-maximum-call-stack-size-exceeded-when-decoding-a-long-list/4605/8 proposes a fix.
Looks like a duplicate of #104 (which also has a fix, #95).