Re: [elm-discuss] Re: Uncaught TypeError: Cannot read property 'tag' of undefined

2016-08-09 Thread Robert Walter
Hi Janis, yes, this seems to be related. I created an SSCCE to the best of my abilities: https://github.com/RobertWalter83/sscce-elm-ports-uncaughtError Check out the readme if you are interested. Will post a comment to the isse you pointed me to. On Monday, August 8, 2016 at 8:14:30 PM UTC+2,

Re: [elm-discuss] Re: Uncaught TypeError: Cannot read property 'tag' of undefined

2016-08-08 Thread Aditya Vishwakarma
@robert: are you using webpack loader? We tracked this bug to an elm-webpack-loader behaviour. here is the issue. https://github.com/rtfeldman/elm-webpack-loader/issues/60 For now, the workaround I am using is to import Json.Decode in my Ports file. On Monday, 8 August 2016 22:30:16 UTC+5:30,

Re: [elm-discuss] Re: Uncaught TypeError: Cannot read property 'tag' of undefined

2016-08-08 Thread Janis Voigtländer
@Robert, maybe yours is a new bug, that was introduced with core version 4.0.3 or 4.0.4 (released just a few days ago)? See https://github.com/elm-lang/core/issues/683. ​ 2016-08-08 19:00 GMT+02:00 Robert Walter : > It doesn't seem like it is tracked. I ran into the

Re: [elm-discuss] Re: Uncaught TypeError: Cannot read property 'tag' of undefined

2016-08-08 Thread Robert Walter
It doesn't seem like it is tracked. I ran into the same(?) issue in my project and I tried to create a SSCCE so I could file an issue, but the thing is I cannot get a SSCCE to fail like my project. My projec tis in the middle of a bigger refactoring, which makes it particularly hard for me to

[elm-discuss] Re: Uncaught TypeError

2016-08-04 Thread OvermindDL1
Already did, and it looks like it was just fixed via https://github.com/elm-lang/core/commit/9320969bf47082b902d4511ef8a48a93612d7bf0 and we might be getting a patch release here very shortly! ^.^ This makes me happier than it probably should, but I really hate it when my app in chrome

[elm-discuss] Re: Uncaught TypeError

2016-08-04 Thread OvermindDL1
Managed to reduce a program, it happens for me quite reliably in Chrome, just click On then Off a few times and you will eventually see ```javascript Main.elm:2417 Uncaught TypeError: Cannot read property 'ctor' of null step @ Main.elm:2417 work @ Main.elm:2533 ``` pop up into your javascript

Re: [elm-discuss] Re: Uncaught TypeError

2016-08-04 Thread OvermindDL1
Done, how about a work-around that does not involve editing the generated javascript to check for null first? On Wednesday, August 3, 2016 at 6:31:24 PM UTC-6, Nick Hollon wrote: > > Don't open a new one. Add the new information to an existing bug report. > I would guess probably the one in

Re: [elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread OvermindDL1
Huh, pretty major site-killing bug to go not only noticed or repaired, but no work-around listed either... Should I move my bug report to elm-core since mine has substantially more information about how and where it is happening? On Wednesday, August 3, 2016 at 3:46:26 PM UTC-6, Nick H wrote:

Re: [elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread Nick H
This is a known issue with subscription swapping (see here , here , here , and here ). On Wed, Aug 3, 2016

[elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread OvermindDL1
And found a workaround, but a really nasty horrible workaround. I had code kind of like this: ```elm subscriptions model = Sub.batch [ if List.isEmpty model.onNextFrame then Sub.none else AnimationFrame.times HelpersMsg_Frame ] ```

[elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread OvermindDL1
The message that contains the one that gets wiped is `id: 38` as stated before, it is a "_Task_andThen" with a `task` of what will become `id: 39`. When `id: 38` gets processed it enqueues `id: 39`, at this time the `cancel` key on the task that becomes Process `id: 39` is null, but walking

Re: [elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread OvermindDL1
I find debugging oddly invigorating, plus this is hampering my actual job so I have an excuse. ^.^ On Wednesday, August 3, 2016 at 12:26:22 PM UTC-6, Duane Johnson wrote: > > > On Wed, Aug 3, 2016 at 12:21 PM, OvermindDL1 > wrote: > >> I am not yet seeing how the `root`

[elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread OvermindDL1
Sometime between when `id: 39` and `id: 40` is created during `rawSpawn` the `root` key in the object goes null. Still trying to find what code is wiping it... On Wednesday, August 3, 2016 at 12:21:18 PM UTC-6, OvermindDL1 wrote: > > The task object with `id: 39` does not have a null `root`

Re: [elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread Duane Johnson
On Wed, Aug 3, 2016 at 12:21 PM, OvermindDL1 wrote: > I am not yet seeing how the `root` key on this "_Process" object is > getting cleared yet before it has a chance to be processed, still tracing... > Keep fighting the good fight. If this does turn out to be a bug in

[elm-discuss] Re: Uncaught TypeError

2016-08-03 Thread OvermindDL1
Debugged into it and caught the exception at the point to get the stack values: ```javascript numSteps = 403 process = Object {ctor: "_Process", id: 39, root: null, stack: null, mailbox : Array[0]} ``` So root is null, why would it be trying to access a null value without checking if null? Any

Re: [elm-discuss] Re: Uncaught TypeError: Cannot read property 'tag' of undefined

2016-07-31 Thread Duane Johnson
Cool bug find :) Is it tracked on https://github.com/elm-lang/elm-compiler/issues ? On Sun, Jul 31, 2016 at 3:01 AM, Aditya Vishwakarma < blackleopar...@gmail.com> wrote: > Hi > > So I dug deeper into this issue. turns out that the JS code for my port > module was being emitted before the JS of

[elm-discuss] Re: Uncaught TypeError: Cannot read property 'tag' of undefined

2016-07-31 Thread Aditya Vishwakarma
Hi So I dug deeper into this issue. turns out that the JS code for my port module was being emitted before the JS of Json.Decode module. After some research, I found that if the project's port module has: - Name beginning with a letter before J, and - does not have a declared dependency