{"action":"created","issue":{"url":"https://api.github.com/repos/eddelbuettel/anytime/issues/25","repository_url":"https://api.github.com/repos/eddelbuettel/anytime","labels_url":"https://api.github.com/repos/eddelbuettel/anytime/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/eddelbuettel/anytime/issues/25/comments","events_url":"https://api.github.com/repos/eddelbuettel/anytime/issues/25/events","html_url":"https://github.com/eddelbuettel/anytime/issues/25","id":184907408,"number":25,"title":"Crash in RStudio (not in R) when calling testFormat","user":{"login":"bobjansen","id":311522,"avatar_url":"https://avatars.githubusercontent.com/u/311522?v=3","gravatar_id":"","url":"https://api.github.com/users/bobjansen","html_url":"https://github.com/bobjansen","followers_url":"https://api.github.com/users/bobjansen/followers","following_url":"https://api.github.com/users/bobjansen/following{/other_user}","gists_url":"https://api.github.com/users/bobjansen/gists{/gist_id}","starred_url":"https://api.github.com/users/bobjansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobjansen/subscriptions","organizations_url":"https://api.github.com/users/bobjansen/orgs","repos_url":"https://api.github.com/users/bobjansen/repos","events_url":"https://api.github.com/users/bobjansen/events{/privacy}","received_events_url":"https://api.github.com/users/bobjansen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-10-24T17:42:00Z","updated_at":"2016-10-24T20:46:38Z","closed_at":null,"body":"I'm on:\r\n```R\r\n> sessionInfo()\r\nR version 3.2.3 (2015-12-10)\r\nPlatform: x86_64-pc-linux-gnu (64-bit)\r\nRunning under: Ubuntu 16.04.1 LTS\r\n\r\nlocale:\r\n [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=nl_NL.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=nl_NL.UTF-8   \r\n [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=nl_NL.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            \r\n[11] LC_MEASUREMENT=nl_NL.UTF-8 LC_IDENTIFICATION=C       \r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods   base     \r\n\r\nloaded via a namespace (and not attached):\r\n[1] tools_3.2.3\r\n```\r\nIf I run\r\n\r\n```R\r\nanytime:::testFormat(\"%m/%d/%Y\", \"22/3/2016\")\r\n```\r\nRStudio (Version 0.99.903) crashes immediately but R ran from the command line does not.\r\n\r\nMy first hypothesis is that memory corruption happens in `anytime` in a way that only causes problems when the `rsession` is started like RStudio does and will try to confirm.\r\n"},"comment":{"url":"https://api.github.com/repos/eddelbuettel/anytime/issues/comments/255861168","html_url":"https://github.com/eddelbuettel/anytime/issues/25#issuecomment-255861168","issue_url":"https://api.github.com/repos/eddelbuettel/anytime/issues/25","id":255861168,"user":{"login":"kevinushey","id":1976582,"avatar_url":"https://avatars.githubusercontent.com/u/1976582?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinushey","html_url":"https://github.com/kevinushey","followers_url":"https://api.github.com/users/kevinushey/followers","following_url":"https://api.github.com/users/kevinushey/following{/other_user}","gists_url":"https://api.github.com/users/kevinushey/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinushey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinushey/subscriptions","organizations_url":"https://api.github.com/users/kevinushey/orgs","repos_url":"https://api.github.com/users/kevinushey/repos","events_url":"https://api.github.com/users/kevinushey/events{/privacy}","received_events_url":"https://api.github.com/users/kevinushey/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T20:46:38Z","updated_at":"2016-10-24T20:46:38Z","body":"Here's what I see in RStudio with `gdb` attached to the R process -- some lovely STL template code...\r\n\r\n```\r\nThread 1 \"rsession\" received signal SIGSEGV, Segmentation fault.\r\n0x0000000000c25dfd in std::_Rb_tree<char, std::pair<char const, boost::date_time::string_parse_tree<char> >, std::_Select1st<std::pair<char const, boost::date_time::string_parse_tree<char> > >, std::less<char>, std::allocator<std::pair<char const, boost::date_time::string_parse_tree<char> > > >::_M_erase(std::_Rb_tree_node<std::pair<char const, boost::date_time::string_parse_tree<char> > >*) ()\r\n(gdb) bt\r\n#0  0x0000000000c25dfd in std::_Rb_tree<char, std::pair<char const, boost::date_time::string_parse_tree<char> >, std::_Select1st<std::pair<char const, boost::date_time::string_parse_tree<char> > >, std::less<char>, std::allocator<std::pair<char const, boost::date_time::string_parse_tree<char> > > >::_M_erase(std::_Rb_tree_node<std::pair<char const, boost::date_time::string_parse_tree<char> > >*)\r\n    ()\r\n#1  0x0000000000c260c8 in boost::date_time::date_input_facet<boost::gregorian::date, char, std::istreambuf_iterator<char, std::char_traits<char> > >::~date_input_facet() ()\r\n#2  0x0000000000c26216 in boost::date_time::time_input_facet<boost::posix_time::ptime, char, std::istreambuf_iterator<char, std::char_traits<char> > >::~time_input_facet() ()\r\n#3  0x00007f6a0e02ef54 in std::locale::_Impl::~_Impl() ()\r\n   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6\r\n#4  0x00007f6a0e02f0f9 in std::locale::~locale() ()\r\n   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6\r\n#5  0x00007f69e95d2cfc in std::basic_ios<char, std::char_traits<char> >::~basic_ios (this=0x7fffb0636f88, __in_chrg=<optimized out>)\r\n    at /usr/include/c++/5/bits/basic_ios.h:282\r\n#6  std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_istringstream (this=0x7fffb0636f10, \r\n    __in_chrg=<optimized out>, __vtt_parm=<optimized out>)\r\n    at /usr/include/c++/5/sstream:433\r\n#7  testFormat (fmt=\"%m/%d/%Y\", s=\"22/3/2016\", tz=\"\") at anytime.cpp:292\r\n#8  0x00007f69e95cedd2 in anytime_testFormat (fmtSEXP=<optimized out>, sSEXP=<optimized out>, \r\n    tzSEXP=<optimized out>) at RcppExports.cpp:50\r\n#9  0x00007f6a0ee258b0 in ?? () from /usr/lib/R/lib/libR.so\r\n#10 0x00007f6a0ee5bbff in Rf_eval () from /usr/lib/R/lib/libR.so\r\n#11 0x00007f6a0ee5e0f8 in ?? () from /usr/lib/R/lib/libR.so\r\n#12 0x00007f6a0ee5b9f1 in Rf_eval () from /usr/lib/R/lib/libR.so\r\n#13 0x00007f6a0ee5d0b5 in Rf_applyClosure () from /usr/lib/R/lib/libR.so\r\n#14 0x00007f6a0ee5b7cd in Rf_eval () from /usr/lib/R/lib/libR.so\r\n#15 0x00007f6a0ee82ff2 in Rf_ReplIteration () from /usr/lib/R/lib/libR.so\r\n#16 0x00007f6a0ee83371 in ?? () from /usr/lib/R/lib/libR.so\r\n#17 0x00007f6a0ee83424 in run_Rmainloop () from /usr/lib/R/lib/libR.so\r\n#18 0x0000000000d50702 in rstudio::r::session::runEmbeddedR(rstudio::core::FilePath const&, rstudio::core::FilePath const&, bool, bool, SA_TYPE, rstudio::r::session::Callbacks const&, rstudio::r::session::InternalCallbacks*) ()\r\n#19 0x0000000000d31f8d in rstudio::r::session::run(rstudio::r::session::ROptions const&, rstudio::r::session::RCallbacks const&) ()\r\n#20 0x000000000069ec99 in main ()\r\n```\r\n\r\nThe error seems to indicate that the crash is occurring when attempting to construct a `std::istringstream`, which seems extra bizarre: https://github.com/eddelbuettel/anytime/blob/master/src/anytime.cpp#L292"}}
{"actor":{"display_login":"kevinushey"}}