Message Boards Message Boards

GROUPS:

Unexpected clearing of the variables. Is it a bug?

Posted 9 years ago
7979 Views
|
5 Replies
|
0 Total Likes
|

Dear all,

I have observed that in Mathematica 10.0 sometimes the variables are unexpectedly cleared when they are used. This did not happen in previous versions of Mathematica. I enclose an example of .nb file where this happens. (The last two input lines are not properly executed).

I have observed that this does not happen when the Clear[] command of the variables in question are not put in the same cell as that of the definition of the variables.

But I have the habit of clearing (before) the variables at the same cell where they are defined; as mentioned in previous versions it worked OK.

Could anybody check that the error is reproduced in his/her Mathematica 10.0? Thanks in advance.

Best,

Attachments:
POSTED BY: Arturo Ramos
5 Replies

With the new version 10.0.2 of Mathematica this issue seems to have been solved. Thanks to the people of Wolfram Research!

POSTED BY: Arturo Ramos

I'm not sure that I understand your "bug", but the last two lines do execute on my machine (10.0.1 in Windows 7 64 bit).

In[1]:= $Messages=.
In[2]:= Clear[sp1900,sp1900d]
sp1900=Table[i,{i,1,8000}];
sp1900d=Module[{t},t=Sort[sp1900];Table[{t[[i]],Length[t]-i+1},{i,1,Length[t]}]];
In[5]:= Clear[sp1900dsc,sp1900sc]
sp1900dsc=Drop[sp1900d,0] ;
sp1900sc=Drop[sp1900,0] ;
In[8]:= sp1900sc[[1]]
sp1900sc[[Length[sp1900sc]]]
Out[8]= 1
Out[9]= 8000
POSTED BY: Tim Mayes

Thanks Tim.

I have checked now that the behavior of the "bug" depends on the machine the previous .nb is run on.

-On my home machine/license (10.0.1 in Win 8.1, 64 bits) the "bug" does appear as in the notebook provided: the last outputs are then

Out[8]=sp1900sc[[1]]

Out[9]=Symbol

-On my office machine/license (10.0.1 in Win 7, 32 bits) the "bug" does not appear, the last outputs are correctly

Out[8]=1

Out[9]=8000

I really do not understand why the same program behaves differently on different machines. Perhaps it is a function of the number of bits of the operating system, but Tim reports that his Win 7 OS has 64 bits as well...

Or perhaps the difference is on Win 7 / Win 8.1...

What a mystery...

Best,

POSTED BY: Arturo Ramos

I am not seeing this behavior (in 10.0.1, on Linux). I can say that, generally speaking, when all definitions have been cleared it is an indication that the kernel has crashed.

POSTED BY: Daniel Lichtblau

Thanks Daniel.

The curious thing is that not all variables are cleared when that happens; so it is not a kernel crash. I use 10.0.1 on Windows, 64 bits. Maybe it is a problem of the Windows versiĆ³n.

POSTED BY: Arturo Ramos
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract