jrckln / Bendyourspline

2 stars 0 forks source link

App closes with large number of knots #18

Closed AngelikaGeroldinger closed 2 years ago

AngelikaGeroldinger commented 3 years ago

App closes when the number of knots is set to 5 in the "Natural Spline" tab.

matherealize commented 3 years ago

I cannot reproduce this?

For me setting coefficients to up to 11 works in all spline tabs (at revision 85277d53f004fcd0947ab6c712ab98c4b445dd10).

Update: actually this is weird. To reproduce:

So, if you are SLOWLY adding them one by one it works (i.e. wait for the new basis function to be drawn in the plot, then it is save to add another knot).

jrckln commented 3 years ago

I cannot reproduce this - can you try it again with the lastest version?

matherealize commented 3 years ago

As of c67a49a558848d9663b062942add2731546b5678 the app doesn't crash when I QUICKLY hit the up button, but there is still something weird going on. The numbering of knots is not correct, see attached screenshots (note that the knots and coefficents are only odd or even numbers after a certain point, instead of going from 1 to n). Again, this is not an issue when adding and removing knots slowly. Happens in both RStudio and Firefox.

To resolve this, is it possible to make the input "inactive" for like 0.5 seconds after adding a knot? Something like this? https://stackoverflow.com/questions/34937698/can-i-let-shiny-wait-for-a-longer-time-for-numericinput-before-updating https://shiny.rstudio.com/reference/shiny/latest/debounce.html

Coef_knot_numbering

jrckln commented 3 years ago

fixed it 20s ago (fa07e05bf28b02f4423ffede2d80b407dde50843), see #20

matherealize commented 3 years ago

Yes, it's fixed now. :)