added a message to the ROV display when the ROV init time is too long
diff --git a/src/packages/xdc/rov/Model.xs b/src/packages/xdc/rov/Model.xs
index b1e21cb..36202f7 100644
--- a/src/packages/xdc/rov/Model.xs
+++ b/src/packages/xdc/rov/Model.xs
@@ -1,13 +1,13 @@
 /* --COPYRIGHT--,EPL
- *  Copyright (c) 2008 Texas Instruments and others.
+ *  Copyright (c) 2008-2015 Texas Instruments Incorporated
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
  *  http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  *  Contributors:
  *      Texas Instruments - initial implementation
- * 
+ *
  * --/COPYRIGHT--*/
 /*
  *  ======== Model.xs ========
@@ -17,11 +17,10 @@
  *  ======== start ========
  */
 function start(vers, executable, recap, sym, mem, callBack)
-{   
+{
     xdc.om.$$bind('$name', 'rov');
     xdc.global.Program = xdc.useModule('xdc.rov.Program');
-    Program.debugPrint("Beginning of Model.start");
-    
+
     /* Check Model compatibility. */
     if (vers != this.vers) {
         Program.debugPrint("Incompatible version of ROV Model. Model version " +
@@ -29,15 +28,15 @@
         throw (new Error("Incompatible version of ROV Model. Model version " +
                          this.vers + ", client version " + vers + "."));
     }
-    
+
     /* Store off the objects passed in */
     this.$private.sym = sym;
     this.$private.mem = mem;
     this.$private.callBack = callBack;
     this.$private.recap = recap;
-        
+
     xdc.useModule('xdc.rov.support.ScalarStructs');
-    
+
     /* Store off the list of all modules in the recap file */
     var mnames = [];
     for (var m in this.$private.recap.$modules) {
@@ -45,31 +44,43 @@
             mnames.push(m);
         }
     }
-    
+
     Program.$unseal('moduleNames');
     Program.moduleNames.$unseal();
     Program.moduleNames = mnames.sort();
     Program.moduleNames.$seal();
     Program.$seal('moduleNames');
-    
+
     Program.$$bind('build', this.$private.recap.build);
-        
+
     Program.$$bind('$modules', this.$private.recap.$modules);
 
     /* Read construct objects */
-    fetchConstructObjects(executable); 
+    var rovFile = executable.replace(/(\/Debug)|(\/Release)/, "");
+    rovFile = rovFile.replace(/.out$/, "");
+    var startTime = java.lang.System.currentTimeMillis();
+    fetchConstructObjects(executable);
+    if (java.lang.System.currentTimeMillis() - startTime > 30000) {
+        callBack.updateStartupProgress(90, "Parsing DWARF data was taking too "
+            + "long.\nTo speed up the ROV startup, with some loss of "
+            + "functionality , you can create a new empty file " + rovFile
+            + ".rov.json. For a detailed explanation of this feature, see "
+            + "http://rtsc.eclipse.org/docs-tip/Runtime_Object_Viewer"
+            + "#Retrieving_constructed_objects.");
+            java.lang.Thread.currentThread().sleep(10000);
+    }
 
     /* Notify the CallBack that we are about to start loading the packages. */
     callBack.updateStartupProgress(120, "Loading packages ...");
-    
+
     /* Indicates whether getModuleDesc has been called on all modules. */
     Program.$private.allModsRead = false;
-    
+
     Program.$$bind('loadModFailed', "Failed to load module");
-    
-    /* 
-     * Load all of the packages so the user gets this hit during 
-     * startup rather than on the first view. 
+
+    /*
+     * Load all of the packages so the user gets this hit during
+     * startup rather than on the first view.
      */
     for each (var mod in this.$private.recap.$modules) {
         /* 
@@ -431,7 +442,7 @@
             return (i);
         }
     }
-    
+
     return (-1);
 }
 
@@ -457,55 +468,17 @@
  *           "name": "sem",
  *        },
  *     ]
- * 
+ *
  *   The .rov.json should of the same name as the executable (.out) and
  *   can be in the same directory as, one directory level above or two directory
  *   levels above the executable.
  */
-function fetchConstructObjects(executable) 
+function fetchConstructObjects(executable)
 {
     var constructInstArr = [];
     var binaryParser = "";
     var ofReader = null;
 
-    /* Read from the object file */
-    try {
-        binaryParser = Program.build.target.binaryParser; 
-        if (binaryParser !== undefined) {
-
-            /* Parse the package name from the class name so we can load it. */
-            var parserPackage = 
-                binaryParser.substring(0, binaryParser.lastIndexOf('.'));
-    
-            /* Load the parser's package */
-            xdc.loadPackage(parserPackage);
-            
-            /* Get the parser class */
-            var binaryParserClass = Packages[binaryParser];
-            
-            /* Get the Global Variables */
-            ofReader = new binaryParserClass();
-            ofReader.parse(executable);
-            var varList = ofReader.getGlobalVariablesByType(".*_Struct$");
-            ofReader.close(); /* close file handle */
-
-            /* Run through the list and add only constructed objects */
-            for (var i = 0; i < varList.length; i++) {
-                var varObj = {};
-                varObj.name = varList[i].name;
-                varObj.type = varList[i].type;
-                constructInstArr[varObj.name] = varObj;    
-            }
-        }
-    }
-    catch (e) {
-        if (ofReader != null) {
-            ofReader.close();
-        }
-        Program.debugPrint("The binary parser '" + binaryParser + "' could not" 
-                           + " get global variables info from " + executable);
-    }
-
     /* Read from the .rov.json */
     try {
         var ePath = executable.replace(/\\/g, '/');
@@ -528,7 +501,7 @@
 
         if (constructFilePath != "") {
             var constructFile = File.open(constructFilePath, "r");
-        
+
             var constructText = "";
             var line;
             while ((line = constructFile.readLine()) != null) {
@@ -537,6 +510,11 @@
             constructFile.close();
 
             /* Convert json text to javascript object */
+            if (constructText.trim().length == 0) {
+                // empty file, just return to avoid an exception from eval
+                Program.$$bind('$constructInst', constructInstArr);
+                return;
+            }
             var constructInst2 = eval('(' + constructText + ')');
 
             /* Run through all the user specified construct objects */
@@ -547,12 +525,52 @@
                 /* Add it to an Array */
                 constructInstArr[varObj.name] = varObj;
             }
+            /* Add it to the Program instance for later use */
+            Program.$$bind('$constructInst', constructInstArr);
+            return;
         }
-    } 
-    catch(e) {
-        Program.debugPrint("Failed to load construct objects from: " + constructFilePath);
     }
-  
+    catch(e) {
+        Program.debugPrint("Cannot open " + fName + ". " + e.toString());
+    }
+
+    /* Read from the object file */
+    try {
+        binaryParser = Program.build.target.binaryParser; 
+        if (binaryParser !== undefined) {
+
+            /* Parse the package name from the class name so we can load it. */
+            var parserPackage =
+                binaryParser.substring(0, binaryParser.lastIndexOf('.'));
+
+            /* Load the parser's package */
+            xdc.loadPackage(parserPackage);
+
+            /* Get the parser class */
+            var binaryParserClass = Packages[binaryParser];
+
+            /* Get the Global Variables */
+            ofReader = new binaryParserClass();
+            ofReader.parse(executable);
+            var varList = ofReader.getGlobalVariablesByType(".*_Struct$");
+            ofReader.close(); /* close file handle */
+
+            /* Run through the list and add only constructed objects */
+            for (var i = 0; i < varList.length; i++) {
+                var varObj = {};
+                varObj.name = varList[i].name;
+                varObj.type = varList[i].type;
+                constructInstArr[varObj.name] = varObj;
+            }
+        }
+    }
+    catch (e) {
+        if (ofReader != null) {
+            ofReader.close();
+        }
+        Program.debugPrint("The binary parser '" + binaryParser + "' could not"
+                           + " get global variables info from " + executable);
+    }
     /* Add it to the Program instance for later use */
     Program.$$bind('$constructInst', constructInstArr);
 }