Bug introduced in 9.0 and fixed in 9.0.1
Just to be clear, this all works perfectly in v22.214.171.124. It only fails me in v9.0. I use 64-bit Linux, 64-bit versions of Mathematica, and I have 16GB of RAM.
I have a data file formatted as follows:
Date,Open,High,Low,Close,Volume,OpenInt 19700102,1.6047,1.6140,1.6047,1.6140,881445,0 19700105,1.6140,1.6235,1.6047,1.6235,549208,0 19700106,1.6140,1.6140,1.6047,1.6140,508527,0 19700107,1.6140,1.6424,1.6140,1.6424,752620,0
There are 10839 rows of data in the file. I store the first col of data in a list called "dataDate", the second col of data in "dataOpen", etc... All works great until I try to print the data back to the screen. Version 8 displays the data as expected; but version 9 borks, the kernel resets, and all function definitions and data structures are reset.
Here's the updated, simple code:
data = Import["pg.us.txt", "Data"]; (* Read the first row of data, to get the column headings *) dataColumnHeadings = data[[1, All]] (* Store each column of data in a separate list, removing the first element with Rest *) dataDate = Rest[data[[All, 1]]]; dataOpen = Rest[data[[All, 2]]]; dataHigh = Rest[data[[All, 3]]]; dataLow = Rest[data[[All, 4]]]; dataClose = Rest[data[[All, 5]]]; dataVolume = Rest[data[[All, 6]]]; dataOpenInt = Rest[data[[All, 7]]]; Length[dataDate] Length[dataOpen] Length[dataHigh] Length[dataLow] Length[dataClose] Length[dataVolume] Length[dataOpenInt]
Now, if I try to display the contents of any of the seven lists, (by simply typing the list's name and evaluating it), it works perfectly in version 8. But in version 9, any attempt to evaluate a list by evaluation of its name causes Mathematica 9 to bork: all imported data is lost as all variables are undefined, user-defined functions cleared, etc. (blue text instead of black text). It takes about 6-7 seconds for the error to occur, after you evaluate the list name and it displays the truncated output.
Here are links to my updated test notebook and data file if anyone would be kind enough to see if this is just a problem with my machine, or a bug:
UPDATE: As I stated in a response below, removing the "Rest" function, used to remove the first element of each list, seems to fix the problem. Perhaps I'll try to remove the first element in some other manner; or perhaps try to use "Rest" in a three step process (wasting RAM):
dataDate = data[[All, 1]]; dataDate2 = Rest[dataDate]; Clear[dataDate];
UPDATE 2: It doesn't matter how much I mess with the list data: as soon as I use the "Rest" command on it, and display the results to screen, the program borks. I'm calling this a bug and contacting Wolfram. This is what I get for being an early adopter...