5
$\begingroup$

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

$\endgroup$
  • 1
    $\begingroup$ 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? $\endgroup$ – ilian Sep 15 '15 at 22:37
  • $\begingroup$ @ilian I edited the question with version and input file $\endgroup$ – jss Sep 16 '15 at 10:26
6
$\begingroup$

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"} *)
$\endgroup$
  • $\begingroup$ I just upgraded to version 10.2 and problem solved! $\endgroup$ – jss Sep 18 '15 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.