wincowgerDEV / OpenSpecy-package

Analyze, Process, Identify, and Share, Raman and (FT)IR Spectra
http://wincowger.com/OpenSpecy-package/
Creative Commons Attribution 4.0 International
26 stars 11 forks source link

Broken error handling? #88

Closed zsteinmetz closed 3 years ago

zsteinmetz commented 3 years ago

I have the strange feeling that error handling is generally broken; not only with #81. Whenever those nice popups are supposed to show up, my app just crashes completely. Do you experience the same, @wincowgerDEV?

Could this have something to do with logging? loggit at least masks stop() which may let reactivity behave differently than usual: For example here:

https://github.com/wincowgerDEV/OpenSpecy/blob/ee3de83334b6093c006497b355183df361d5eea0/inst/shiny/server.R#L136-L149

I thought stop() would leave preprocessed_data() unchanged and thus not trigger any subsequent events. At the moment, it does so anyway which causes the complete crash of the app without showing any warning/error. Hashing out the following chunks makes it work again:

https://github.com/wincowgerDEV/OpenSpecy/blob/ee3de83334b6093c006497b355183df361d5eea0/inst/shiny/server.R#L509-L519

and

https://github.com/wincowgerDEV/OpenSpecy/blob/ee3de83334b6093c006497b355183df361d5eea0/inst/shiny/server.R#L535-L593

Any idea what's the matter here?

wincowgerDEV commented 3 years ago

I think you are right about Loggit. https://www.r-bloggers.com/2018/02/effortless-but-powerful-exception-logging-in-r-loggit-1-0-0-released-on-cran/

I also remember the error handling getting messed up around the same time we introduced logging. We could try just hashing out the loggit functions and library to see if that fixes the issue. If it does, we can try to find a workaround to include desktop logging.

Warm Regards, Win

On Thu, May 20, 2021 at 9:13 AM Zacharias Steinmetz < @.***> wrote:

I have the strange feeling that error handling is generally broken; not only with #81 https://github.com/wincowgerDEV/OpenSpecy/issues/81. Whenever those nice popups are supposed to show up, my app just crashes completely. Do you experience the same, @wincowgerDEV https://github.com/wincowgerDEV?

Could this have something to do with logging? loggit at least masks stop() which may let reactivity behave differently than usual: For example here:

https://github.com/wincowgerDEV/OpenSpecy/blob/ee3de83334b6093c006497b355183df361d5eea0/inst/shiny/server.R#L136-L149

I thought stop() would leave preprocessed_data() unchanged and thus not trigger any subsequent events. At the moment, it does so anyway which causes the complete crash of the app without showing any warning/error. Hashing out the following chunks makes it work again:

https://github.com/wincowgerDEV/OpenSpecy/blob/ee3de83334b6093c006497b355183df361d5eea0/inst/shiny/server.R#L509-L519

and

https://github.com/wincowgerDEV/OpenSpecy/blob/ee3de83334b6093c006497b355183df361d5eea0/inst/shiny/server.R#L535-L593

Any idea what's the matter here?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wincowgerDEV/OpenSpecy/issues/88, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMUJU2JLHP46LBRN7XWZNLTOUYJ7ANCNFSM45HLGLRA .

--

´¯·.¸¸.·´¯·.´¯·.¸¸.·´¯ツ ------------------------------

Win Cowger PhD Candidate, Environmental Sciences: Soil and Water University of California, Riverside

NSF Graduate Research Fellow Research Advisor to 5 Gyres https://www.5gyres.org/advisors/ Data Advisor to Let's Do It World https://www.letsdoitworld.org/

Contact Info

515-298-3869 | @.***

Websites www.openspecy.org www.wincowger.com http://andrewgray.ucr.edu/people/wcowger.html


zsteinmetz commented 3 years ago

On the other hand, my traceback also points to the toggling of placeholders; even if loggit is commented out. Dunno. Need more time to dig into it.

wincowgerDEV commented 3 years ago

Huh, I don't think it's the shinyjs package as a whole because we have had that the whole time so maybe it is the toggle function specifically.

On Thu, May 20, 2021, 11:21 AM Zacharias Steinmetz @.***> wrote:

On the other hand, my traceback also points to the toggling of placeholders; even if loggit is commented out. Dunno. Need more time to dig into it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wincowgerDEV/OpenSpecy/issues/88#issuecomment-845358227, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMUJU52QGH5ISMWBGVAKMDTOVHJJANCNFSM45HLGLRA .

zsteinmetz commented 3 years ago

No no, me neither. I guess it's rather the symptom than the cause. Maybe using stop() within a reactive element was not perfectly clean from the beginning on and it now backfires :grin: