Closed massudaw closed 9 years ago
I can reproduce this. Apparently, a function created with exportHandler
is being garbage collected (A click
handler for the select
box is registered, but the corresponding function is freed with Haskell.freeStablePtr('50')
). I will try to investigate the cause.
The problem is a line in the clearChildren
function where all remote pointers reachable from the element are cleared. The idea was to sever the connection to the child DOM elements, so that they can be garbage collected if necessary. However, I forgot that the reachable remote pointers are not restricted to DOM elements, but can also be event handlers, which should not be cleared, of course. I will have to mirror the DOM hierarchy more precisely.
For a temporary fix, just delete the indicated line.
Seen in the wild in this StackOverflow question. By the way, if I start playing with 0.6 before the bug fix comes should I look out for any collateral effects of the workaround in code originally written for 0.5?
The only collateral effect is that less elements will be garbage collected. In most cases, especially when you only ever create a fixed number of DOM elements, you won't notice a difference.
When i select one element in the list the form doesn't get updated. This behavior was observed using version 0.6.0.1 with ghc 7.8.4 . Using the version 0.4.2.0 works fine.
OBS.: When i tried to upgrade other application to this version i had some problems with missing events too.
Can you reproduce, this?