Message Boards Message Boards


Calling UnitConvert from a fresh kernel crashes the kernel?

Posted 9 years ago
2 Replies
0 Total Likes

Hello Can anyone confirm that this crash is not unique to my system? Mac OS X x86 (64-bit) M10.

From a fresh kernel, this is the entire notebook.

six = 6

metersPerInch = UnitConvert[Quantity[1, "Inch"], "Meter"]

Mathematica gets a network timeout:

"Quantity::timeout: A network operation for Quantity timed out. Please try again later. >>"

Quantity::unkunit: Unable to interpret unit specification Inch. >>

and then the kernel dies.

Reevaluating the notebook removes the problem. I think I have seen a similar report on Community, but I can't find it (otherwise I'd link to it).

Thanks, WCC

POSTED BY: W. Craig Carter
2 Replies

I don't get a crash either (but I am on Windows).

If you want to bypass the unit interpretation you can use "Inches" and "Meters" since these are built-in (like many standard units). They don't require a round-trip to the Wolfram servers for interpretation and work just as well (and faster, since there is no server calls):

UnitConvert[Quantity[1, "Inches"], "Meters"]

For me, the timings are 0.002 seconds (no server round-trip) and 3.084 seconds (with server round-trip).

POSTED BY: Arnoud Buzing

No crash for me...

In[4]:= SystemInformation["Small"]

Out[4]= {"Kernel" -> {"SystemID" -> "MacOSX-x86-64", 
   "ReleaseID" -> " (5157628, 2014091001)", 
   "CreationDate" -> 
    DateObject[{2014, 9, 10}, TimeObject[{10, 10, 45}]]}, 
 "FrontEnd" -> {"OperatingSystem" -> "MacOSX", 
   "ReleaseID" -> " (5157628, 2014090901)", 
   "CreationDate" -> 
    DateObject[{2014, 9, 9}, TimeObject[{18, 41, 37.}]]}}
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract