Strange interaction between Module and ListPlot

Bug introduced in 10.0 and fixed in 10.1

Why is the variable a ending up assigned to {1,2,3} after executing

Module[{a},
a=Range[3];
ListPlot[a]
]

• What version are you using? I've tried this on Windows M9 and M10 and don't see the issue. – Andy Ross Nov 19 '14 at 3:23
• I am using Mathematica 10 in OS X Yosemite. – Daniel Chess Nov 19 '14 at 5:38
• I cannot reproduce this in M10.0.1.0 on OS X 10.9.5 – Marius Ladegård Meyer Nov 19 '14 at 6:31
• I can reproduce this on "10.0 for Mac OS X x86 (64-bit) (September 10, 2014)" using OS X Yosemite. Must be a platform-specific bug. You should report it to WRI. – Andy Ross Nov 19 '14 at 14:52
• @MichaelE2 It's not. One more problem caused by the Suggestions Bar. – Szabolcs Feb 17 '15 at 20:37

This is yet another bug caused by the Suggestions Bar.

Workaround:

• Go to Preferences... -> Interface, and uncheck "Show Suggestions Bar after last output".

I can reproduce it on OS X, Mathematica 10.0.2, but not in version 9.0.1.

Whenever I see that some people can reproduce a bug, some can't, I turn on the Suggestion Bar and check if it's the culprit. Very often it is. That's why I keep it off.

• A-ha! I turned off the Suggestions Bar long ago as soon as I found out that I could. I did not realize it also had such a side effect. Its popping in and out of existence is enough of a headache for me. +1 – Michael E2 Feb 17 '15 at 22:07

Very strange!

If you put an "a" after it works as expected:

Module[{a}, a = Range[3];
ListPlot[a]]
a


It also works if you suppress the Module's output (but not ListPlot's):

Module[{a}, a = Range[3];
Print@ListPlot[a]];

• This is yet another symptom of Sugestions Bar caused trouble. Putting the a at the end prevents the Suggestions Bar from messing with the previous output. – Szabolcs Feb 17 '15 at 20:38