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

proxy-super not thread safe #235

Open
owenRiddy opened this issue Sep 9, 2023 · 0 comments
Open

proxy-super not thread safe #235

owenRiddy opened this issue Sep 9, 2023 · 0 comments

Comments

@owenRiddy
Copy link

G'Day! There is a concerning bug in seesaw.table. It makes extensive use of proxy-super which is not thread safe. This bug can cause the proxied methods (ie, the Clojure implementations passed in through the proxy macro) to vanish unexpectedly leading to errors like Exception in thread "Thread-117" java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 3 and other weirdnesses.

I have been experimenting with fixes. There must be lots of ways to approach this but my favourite is adapting Nathan Marz's proxy-plus library to support proxy-super. See redplanetlabs/proxy-plus#17 and then https://github.com/owenRiddy/proxy-plus-minus where I have a fork of the library that implements the ugly hack.

I have now started experimenting with using that hack in seesaw proper. Experiments are taking place over here. Tests are passing. Unfortunately I've felt pressure to bump the version of Clojure required because 1.4.0 was too old for leiningen. I also ran cljfmt over the code..

Is there anyone maintaining seesaw? I'd like to negotiate what trade offs would be acceptable for merging the proxy-plus-minus hack in vs some other attempt at fixing this problem. I'm happy enough to use a dodgy fork for my own work, but it'd be a shame for people to be using a library with buggy tables. Plus I see a few other uses of proxy-super that should raise concerns now that this bug is flagged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant