UTop crashes on closing comment if comment wasn't opened
$ utop -version The universal toplevel for OCaml, version 1.14, compiled for OCaml version 4.01.0
utop # *)Fatal error: exception (Invalid_argument "index out of bounds") Raised at file "format.ml", line 195, characters 41-52 Called from file "format.ml", line 423, characters 8-33 Called from file "format.ml", line 438, characters 6-24
I can't reproduce this, does it crash when you type exactly *)?
Yes (sorry for the delayed response). I invoke utop, keypress '*', keypress ')', keypress enter => crash.
I should probably specify: I'm using Ubuntu 14.04 / Linux 3.16.1-031601-generic
Do you have an ~/.ocamlinit?
Yes. Contains this:
(* Added by OPAM. *)
let () =
try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
with Not_found -> ()
;;
#use "topfind"
#require "core"
(* open Core.Std *)
Removing it or putting an invalid expression in it seems to fix the problem, but I'm not sure what's wrong with my ocamlinit?
I haven't tested this, but could it be the lack of ;; after each #require line?
Adding ;; after requires doesn't seem to change the issue.
The crash happens when my .ocamlinit contains the single line below:
#require "core" ;;