Skip to content
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

Regression: Update doesn't work in CRUD sample . #109

Closed
massudaw opened this issue Jun 10, 2015 · 4 comments
Closed

Regression: Update doesn't work in CRUD sample . #109

massudaw opened this issue Jun 10, 2015 · 4 comments

Comments

@massudaw
Copy link

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?

@HeinrichApfelmus
Copy link
Owner

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.

@HeinrichApfelmus
Copy link
Owner

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.

@duplode
Copy link
Contributor

duplode commented Jun 19, 2015

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?

@HeinrichApfelmus
Copy link
Owner

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.

conklech added a commit to conklech/threepenny-gui that referenced this issue Aug 3, 2015
HeinrichApfelmus added a commit that referenced this issue Aug 4, 2015
HeinrichApfelmus added a commit that referenced this issue Aug 4, 2015
This is temporary until a proper fix for #109 can be implemented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants