Closed monaw closed 1 year ago
I was able to fix the bug by adding an as.numeric()
test on the cell size. Specifically, replacing this ...
if (! isEmpty (gps$original) && input$cellsize >= 1)
... with this ...
if (! isEmpty (gps$original) && is.numeric(input$cellsize) && input$cellsize >= 1)
After making this change, the shiny app works fine and actually prohibits me from entering something that's not a number.
Regarding the source of the error, I'm wondering if this is a Windows vs. Mac problem (I'm on a Mac).
On a related note, I noticed that you're only testing the cell size before enabling the run button (runx). We should probably add tests to make sure that the other values are valid
Finally, since R does short circuiting (see https://r-critique.com/short-circuit-evaluation), I would recommend putting the is.numeric() tests before the comparisons.
Implemented changes and committed to the dev branch
Closed
Bob gets a crash when he deletes the value from the cell size parameter in the UI but Mona doesn't get the crash for the same action!
Here's the crash output:![Screen Shot 2022-10-12 at 4 41 58 PM](https://user-images.githubusercontent.com/18472048/195472736-c67e30b4-c59c-4021-8fb0-adcc2a639660.png)
And here's app.R line 230 from dev branch 0b1b5185351a588af25ecdbf0e469f77a4003346![Screen Shot 2022-10-12 at 4 39 09 PM](https://user-images.githubusercontent.com/18472048/195472813-4c15b317-f3c9-4353-9725-11481781f2bb.png)