Created attachment 2015 [details]
The exact sequence of events with image caputures needed to reproduce the bug and error message that occurs
Steps to reproduce bug.
1. Open RGui.exe. Do not resize anything.
2. Press enter several times. Number of times is insignificant.
3. Resize the console window to make it larger.
4. Enter characters until they reach the side of the console at which point RGui.exe stops working with an error message.
The attached PDF file shows the exact sequence of events with image caputures needed to reproduce the bug and error message that occurs.
The bug is encountered frequently when the Rprofile.site file has additional lines added that are site specific and the first action the user performs after starting RGui is to resize the console windows.
Doing an initial investigation of the code in the current tree obtained by
svn checkout https://svn.R-project.org/R/trunk [RDEVEL-HOME]
reveals that if the code in src/gnuwin32/console.c is modified such that the code from lines 1554-55
1554: p->newfv = NUMLINES - ROWS;
1555: if (p->newfv < 0) p->newfv = 0;
are place after line 1913
1912: BORDERX = (WIDTH - COLS*FW) / 2;
1913: BORDERY = (HEIGHT - ROWS*FH) / 2;
the issue no longer occurs. This is an initial analysis of the problem and I would be happy to further investigate the problem to insure the robustness of the proposed code changes. email@example.com
This issue was originally investigated and characterized by Nathan Sosnovske and I have been assigned to report and track the bug for our organization going forwards.
Modify step two to say 2. Press enter enough times to cause the console to scroll.
Thanks for the report. I see the same problem, and your patch appears to fix it. I'll commit after a bit more analysis (same bug elsewhere?) and testing.