RevolutionAnalytics / RRO

Revolution R Open
http://mran.revolutionanalytics.com/download/
GNU General Public License v2.0
86 stars 25 forks source link

UPDATE WITH CORE CAUSE: MRO 3.2.3 Windows RGui crash when typing characters beyond width of resized window #273

Closed mekkim closed 8 years ago

mekkim commented 8 years ago

MRO 3.2.3 64-bit Windows clean install (after uninstalling all previous versions of RRO/R) crashes when typing characters beyond the GUI's current width if the RGui window is made vertically longer. The error is as follows:

Unhandled exception at 0x000007FEFEB87D0F (msvcrt.dll) in Rgui.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

My quick search links msvcrt.dll to Visual C++ redistributable. Does MRO 3.2.3 depend on a particular version of Visual C++ redistributable that isn't packaged with it?

Steps to reproduce:

Troubleshooting attempted:

j-martens commented 8 years ago

Thanks for your report. You can track progress here: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/rropen/iuW1XRarPPs/SQMzLkF0CwAJ

j-martens commented 8 years ago

Hello,

We have re-released Microsoft R Open 3.2.3 for Windows with a fix for this. You can download it from here: https://mran.microsoft.com/download/

Thanks, Josée

mekkim commented 8 years ago

UPDATE: After much testing, I have located the specific source of the issue. The culprit is the line for rows = XX in the Rconsole parameters file under Dimensions (in characters) of the console. The RGui will crash when resized if the value XX is less than the number of lines that are displayed on RGui startup, i.e., R version number, Copyright, Platform, Free software disclaimer, etc., etc.

The reason this crash was only occurring in MRO and not base R was because MRO pushes MORE lines to the the RGui console at startup (26 vs 19 for Base R). As such, users who had row = 25 in their RConsole settings, which was an old default from years ago, would see the crash in MRO but not Base R. Increasing the setting to 27 or higher, prevents the crash. Incidentally, setting the row = value to 18 or less will ALSO crash Base R, suggesting that it isn't, in fact, an MRO problem. I will report it to the RCore team.

In sum, the workaround is that users installing MRO must update any old RConsole preference files to have row = 27 or higher. Ideally, the MRO installer would look for this line in default locations, but that's a bit complicated and unnecessary if the RCore team fixes the underlying issue. Further, if the amount of text pushed by MRO to the RGui console at launch ever increases (such as with additional instructions, etc.), the row = xx value will have to be increased accordingly to avoid crashes.

nathansoz commented 8 years ago

We have provided a fix to Cran for the underlying issue and expect it will be incorporated in the next release of R.

mekkim commented 8 years ago

@nathansoz - Ah, excellent. Thanks for that! At least I can get working now by changing my RConsole file. :)

nathansoz commented 8 years ago

I believe we adjusted the default console file to have 35 lines as a workaround in the rerelease. I'm surprised that the console file you got from the rereleased installer didn't have that fix...

@j-martens can you test on Windows 7 and see if you can reproduce the issue still?

mekkim commented 8 years ago

@nathansoz You did adjust it to 35. The thing is that Base R (and MRO) look in two default locations for an RConsole preference file: c:/Program Files/Microsoft/MRO/R-3.2.3/etc/ folder or the equivalent install location and c:/users/<username>/documents/ - The latter overrides the former if it's present. I keep my RConsole file in the latter so that both MRO and Base R can use it, so its row value remained at 25 even with the re-release.

As such, the issue isn't specific to Win 7 or other version, but rather if the user has an older RConsole preference file in their documents folder.

mekkim commented 8 years ago

I see your fix here: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16698 - Awesome! That should do it! Thanks!