2

Bug introduced in 10.0 and fixed in 10.1

Bug related to the Suggestion Bar Bug


While getting used to the new data type Date Object in Version 10 I noted that there seems to be a bug which on my machine (Windows 7) seems to be time-dependent, e.g. DateObject will cause an error after repeated use.

As an example all of a sudden a simple line like the following:

DateRange[DateObject[{2014, 1, 1}], DateObject[{2014, 12, 31}]]

Will return this error in Mathematica 10.0.1 :

error message

Starting with a fresh notebook I observe the following:

repeated application

The first call to DataRange will run without any error but after repeated application - note that I had to eventually abort the Table[ ... ] expression because it was not done after 5 minutes - the same statement will cause the error.

I also note that there seems to be tremendous overhead in using DateObject:

overhead

Has somebody else noted something similar and is this a known bug?

Michael E2
  • 235,386
  • 17
  • 334
  • 747
gwr
  • 13,452
  • 2
  • 47
  • 78
  • Your code appears to work correctly here. Perhaps some resource (packlet) didn't load properly? – Mr.Wizard Oct 24 '14 at 10:32
  • I have not loaded anything consciously besides starting Mma 10. Note, that the code (as shown) will work on my machine without any problems at first; the problem will arise after some time only. – gwr Oct 24 '14 at 11:11
  • 2
    OK,I have reproduced it (OS X, v.10.0.1). It clearly seems to be related to the (already reported link) bug concerning the Suggestion Bar. Try to Minimize/Disable the bar and make the tests again ... This solution works for me. – SquareOne Oct 24 '14 at 13:02
  • @Square1 Thank you, that seems to indeed resolve the issue which is a definite bug then. With regard to overhead it also seems to pays off to use DateList-form to generate a DateRanges and then Map DateObject to the result. – gwr Oct 24 '14 at 14:26
  • 1
    The problem still persists in Version 10.0.2 - the suggestion bar needs to stay deactivated. – gwr Dec 12 '14 at 19:52
  • This seems to be fixed in 10.1 (or at least is does not occur on a Mac). – Michael E2 Aug 05 '15 at 20:31
  • I've updated the bug information in accordance the format here. – Michael E2 Aug 06 '15 at 12:32

1 Answers1

2

As kindly posted above by Square1 the error indeed is related to the Suggestion Bar Bug and will not appear if the Suggestion Bar is disabled in the preferences.

What I still find a slight nuisance is the overhead related to DateObject:

Table[ DateRange[DateObject[{2014, 1, 1}], DateObject[{2014, 12, 31}]], {1000}]; 
// AbsoluteTiming

(* {67.372854, Null} *)

DateObject /@ Table[ DateRange[ {2014, 1, 1}, {2014, 12, 31}], {1000}]; 
// AbsoluteTiming

(* {28.443627, Null} *)

Maybe I am missing something here, but I would expect the implementation to be smarter here?

gwr
  • 13,452
  • 2
  • 47
  • 78