# HG changeset patch # User wenzelm # Date 1587642586 -7200 # Node ID 936718dede803bc363654b654da742a125ba147f # Parent bb72e75cec617ed5ef55dbdaaaf01eb6b8e8a6b3 more robust Isabelle_System.init (amending c0bc99aad936): avoid non-termination on Windows (java.lang.StackOverflowError); diff -r bb72e75cec61 -r 936718dede80 src/Pure/System/isabelle_system.scala --- a/src/Pure/System/isabelle_system.scala Thu Apr 23 13:23:04 2020 +0200 +++ b/src/Pure/System/isabelle_system.scala Thu Apr 23 13:49:46 2020 +0200 @@ -51,23 +51,21 @@ @volatile private var _settings: Option[Map[String, String]] = None @volatile private var _services: Option[List[Service]] = None - private def uninitialized: Boolean = _services.isEmpty // unsynchronized check - def settings(): Map[String, String] = { - if (uninitialized) init() + if (_settings.isEmpty) init() // unsynchronized check _settings.get } def services(): List[Service] = { - if (uninitialized) init() + if (_services.isEmpty) init() // unsynchronized check _services.get } def init(isabelle_root: String = "", cygwin_root: String = ""): Unit = synchronized { - if (uninitialized) { + if (_settings.isEmpty || _services.isEmpty) { val isabelle_root1 = bootstrap_directory(isabelle_root, "ISABELLE_ROOT", "isabelle.root", "Isabelle root")