# How to avoid kernel shutdown when importing a file

I am importing a CIF file and the Kernel shutdown (Mathematica 10). The only instruction is this

Import["myfilename.cif"]

I tried CheckAbort unsuccessfully. How can I catch the error and keep running?

The input file can be downloaded from COD 1504113.cif

• The kernel crash is a bug, most likely in string pattern matching. Which version are you using and would it be possible to provide the input file? Sep 15, 2015 at 22:37
• @ilian I edited the question with version and input file
– jss
Sep 16, 2015 at 10:26

## 1 Answer

The kernel crash is a bug which arises from deep recursion in string pattern matching. It has been fixed in version 10.1.0 and later, by updating to a more modern version of the PCRE library and switching to a non-recursive approach in certain cases.

I am not aware of a workaround applicable to older versions, but it doesn't crash with 10.1 and 10.2:

Import["http://nanocrystallography.research.pdx.edu/static/mcodcif/1/50/41/1504113.cif"]
// Short

(* {"_656" -> ".", "_656" -> ".", <<154>>, "_symmetry_space_group_name_H-M" -> "P -1"} *)

• I just upgraded to version 10.2 and problem solved!
– jss
Sep 18, 2015 at 14:36