{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/RTVS/issues/2680","repository_url":"https://api.github.com/repos/Microsoft/RTVS","labels_url":"https://api.github.com/repos/Microsoft/RTVS/issues/2680/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/RTVS/issues/2680/comments","events_url":"https://api.github.com/repos/Microsoft/RTVS/issues/2680/events","html_url":"https://github.com/Microsoft/RTVS/issues/2680","id":188458044,"number":2680,"title":"Output of pdf crashes Virtual Studio+RTVS (ggplot)","user":{"login":"FelixErnst","id":17824332,"avatar_url":"https://avatars.githubusercontent.com/u/17824332?v=3","gravatar_id":"","url":"https://api.github.com/users/FelixErnst","html_url":"https://github.com/FelixErnst","followers_url":"https://api.github.com/users/FelixErnst/followers","following_url":"https://api.github.com/users/FelixErnst/following{/other_user}","gists_url":"https://api.github.com/users/FelixErnst/gists{/gist_id}","starred_url":"https://api.github.com/users/FelixErnst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FelixErnst/subscriptions","organizations_url":"https://api.github.com/users/FelixErnst/orgs","repos_url":"https://api.github.com/users/FelixErnst/repos","events_url":"https://api.github.com/users/FelixErnst/events{/privacy}","received_events_url":"https://api.github.com/users/FelixErnst/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-10T09:25:30Z","updated_at":"2016-11-11T08:28:06Z","closed_at":null,"body":"When plotting 6 graphs on a single page using ggplot functions, ggsave as well as grid.arrange Virtual Studio crashes using RTVS and CRAN R 3.3.2. The same code works fine in RStudio and completes without error.\r\n\r\nI am a bit hesitant to put in all the code, since it is a lot. Pleace advice on how to proceed. The main function are called like this:\r\n\r\n```\r\np1 <- ggplot(df1, aes(Term, value, fill = variable, group = variable)) + bar + scale + theme + labelK + labs(title = paste0(title, \" - UP\"))\r\np2 <- ggplot(df2, aes(Term, value, fill = variable)) + bar + scale + theme + labelBP + labs(title = paste0(title, \" - UP\"))\r\np3 <- ggplot(df3, aes(Term, value, fill = variable)) + bar + scale + theme + labelKEGG + labs(title = paste0(title, \" - UP\"))\r\np4 <- ggplot(df4, aes(Term, value, fill = variable)) + bar + scale + theme + labelK + labs(title = paste0(title, \" - DOWN\"))\r\np5 <- ggplot(df5, aes(Term, value, fill = variable)) + bar + scale + theme + labelBP + labs(title = paste0(title, \" - DOWN\"))\r\np6 <- ggplot(df6, aes(Term, value, fill = variable)) + bar + scale + theme + labelKEGG + labs(title = paste0(title, \" - DOWN\"))\r\n            \r\ngridPlot <- grid.arrange(p1, p2, p3, ncol = 1, nrow = 3)\r\nggsave(paste0(filePrefix, \"_up.pdf\"), gridPlot, width = 297, height = 210, units = \"mm\")\r\ngridPlot <- grid.arrange(p4, p5, p6, ncol = 1, nrow = 3)\r\nggsave(paste0(filePrefix, \"_down.pdf\"), gridPlot, width = 297, height = 210, units = \"mm\")\r\ngridPlot <- grid.arrange(p1, p4, p2, p5, p3, p6, ncol = 2, nrow = 3)\r\nggsave(paste0(filePrefix, \".pdf\"), gridPlot, scale = 1, width = 594, height = 420, units = \"mm\")\r\n```\r\n\r\nEach df has the same structure of 6 columns the first presenting a term and 5 value columns. These are melted using\r\n\r\n`melt(df, id = \"Term\", measure = c(\"a\", \"b\", \"c\", \"d\", \"e\"))`\r\n\r\nprior to use in the script above "},"comment":{"url":"https://api.github.com/repos/Microsoft/RTVS/issues/comments/259906448","html_url":"https://github.com/Microsoft/RTVS/issues/2680#issuecomment-259906448","issue_url":"https://api.github.com/repos/Microsoft/RTVS/issues/2680","id":259906448,"user":{"login":"FelixErnst","id":17824332,"avatar_url":"https://avatars.githubusercontent.com/u/17824332?v=3","gravatar_id":"","url":"https://api.github.com/users/FelixErnst","html_url":"https://github.com/FelixErnst","followers_url":"https://api.github.com/users/FelixErnst/followers","following_url":"https://api.github.com/users/FelixErnst/following{/other_user}","gists_url":"https://api.github.com/users/FelixErnst/gists{/gist_id}","starred_url":"https://api.github.com/users/FelixErnst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FelixErnst/subscriptions","organizations_url":"https://api.github.com/users/FelixErnst/orgs","repos_url":"https://api.github.com/users/FelixErnst/repos","events_url":"https://api.github.com/users/FelixErnst/events{/privacy}","received_events_url":"https://api.github.com/users/FelixErnst/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T08:28:06Z","updated_at":"2016-11-11T08:28:06Z","body":"The version of RTVS is 0.5.21019.1228\r\n\r\nVS crashes in a number of ways: real crash with a forceful restart and windows trying the \"solve the problem\", I also get a number of different errors from the interactive window, which are not exactly reproducable, such as \r\n`Error in unlist(strsplit(as.character(x), .grid.pathSep))[index] : \r\n  only 0's may be mixed with negative subscripts`\r\nAs I mentioned the next try will give a different error or crash VS completely. \r\n\r\nNow to the positive stuff - using\r\n`options(device=windows)`\r\nsolved the problem. The script runs correctly and produces the correct output without any error"}}
{"actor":{"display_login":"FelixErnst"}}