Known problems and workarounds

Distance 3.5 Release 6

File last updated: 26 March 2002


  • If you are installing Distance 3.5 under Windows 2000/Xp and already have Office 2000/Xp installed, you may get the following behaviour: The first time you run Distance 3.5, the windows installer starts up, and prompts you to insert the Office CD.  When you insert the CD, some disk activity takes place, and then things continue as normal.  (Microsoft Query and some other small components are installed.)  This only happens the first time Distance is run.  This behaviour is a “feature” of the Windows Installer (see Microsoft Knowledge Base article Q243335, available from  We have not been able to find a work-around - but let us know if you have any suggestions!
  • On some networked systems, you may not have the appropriate permissions to write some system files to the network drive.  For example, one user reported that they could not write the file DAO350.DLL to the shared drive.  Their install log contained the entry:

    The file 'X:\\MSAPPS7\\DAO\\DAO350.DLL' could not be opened. Please
    check that your disk is not full and that you have access to the
    destination directory.
  • In cases like this, you should contact your network administrator and work with them to resolve the problem.  The solution in the above example was to manually copy the file into the appropriate location and use the Revsvr32 program to register it.
  • Some users have reported that the Setup program crashes during install the first time they run it, but then runs correctly when they try a second time.  We have not been able to reproduce this, but suggest running the program a second time if you get a problem.
  • Distance will not install on some dual boot Windows 3.x/Windows NT machines. Error message “Entry Point Not Found” occurs during installation, and the installed program can not be run. [3 May 99]
  • Distance crashes with run time error 13 (Incompatible types) on some South American PCs. This problem is fixed for Distance 4, but is unlikely ever to be fixed in Distance 3.5. [9 Dec 1999]
  • Distance crashes with run time error 91: “Object variable or With block not set”, after initial splash screen is displayed but before main window. Solutions: 1. If you downloaded Distance 3.5 release 6 before September 25th 2001, then download it again from this site, and re-install.  The new download has some extra support files added that should prevent the problem.  2. Download the DAO 3.51 installation package from the Support, Updates and Extras page of the Distance web site. Extract the archive and run setup.exe. Distance should now work. If not, let us know! [Updated 25 Sept 2001]


  • Choosing a large number of or closely spaced intervals (either in Data Filter, Intervals, or Model Definition, Detection Function, Diagnostics) can lead to error messages when running the analysis. These errors are caused by difficulties in plotting the detection function histogram. On some computers, the errors can trigger a Windows system crash (“Blue Screen of death”). [30 June 99]
  • Models with the hazard rate key function occasionally do not converge to the maximum likelihood solution. Unfortunately, Distance does not produce any diagnostics to warn that this has happened. The only case where we have found this problem so far is where the number of parameters was 1 less than the number of intervals (grouped data) and so the model should fit the data perfectly, but it didn’t. We are looking in to this problem. [30 June 99]
  • Size-bias regression for cluster size: when you truncate your data for estimating cluster size in the Data Filter and then choose size-bias regression in the Model Definition, the regression ignores the cluster size truncation. This behavior is by design, because cluster size regression is supposed to bypass the need to truncate the data at the shoulder to estimate mean cluster size. However, for consistency, we will either change the behavior for the next version of Distance or will add warnings to this effect in the on-line manual. [8 July 1999]
  • If you estimate expected cluster size globally, but detection function by stratum, Distance returns an “incompatible levels” error. This shouldn’t happen when expected cluster size is the mean of the observed clusters or is estimated by a regression of cluster size on x. It is more understandable for regression of cluster size on g(x), since there is now more than one detection function curve; nevertheless it should still be possible to calculate a g(x) for each observed cluster. This will be resolved in a future version of Distance.[30 June 1999]
  • Post-stratification: When you post-stratify by a field in the observation layer, Distance doesn’t take account of any data selection criteria you have defined in the Data Filter when creating the stratum levels. It does use the selection criteria to produce the samples (transects) and observations, which means that the stratum density estimates will be correct. The only effect of this bug is that you may get some inappropriate stratum levels in the results – the actual density estimates should still be correct. For example, imagine that you have a field called “size class” in the observation layer, with size classes Large, Medium, and Small. Imagine further that you have 10 transects, numbered 1 to 10, and that you didn’t observe any animals of the small size class in transects 8-10. Imagine that you’ve defined a data filter that selects only transects 8-10. If you then do an analysis post-stratified by size class, using this data filter, you wouldn’t expect the size class Small to be included in the analysis, as there are none of them in transects 8-10. With this bug, the size class Small is made into a stratum; however the density estimate for this class will be 0, so if you have defined the global density estimate to be the sum of the stratum estimates then you’ll still get the correct global estimate. Workaround: ignore the inappropriate post-strata levels in the results pages! [8 July 1999]
  • Running an analysis returns an error (red) status, and the log tab contains the message: “** Error: An error occured within the analysis engine. This could be due to a problem in the Distance analysis engine, or could be becuase the analysis was reset just as it was finishing. **” Possible causes: you are running an analysis with more than 5000 samples (transects). Note that even if you don’t have 5000 transects, you can get >5000 when you post-stratify by a field in the observation layer, as the actual number of samples then becomes the number of samples multiplied by the number of strata. Solution: download and install the large dataset version of the analysis engine from the Distance web page (under Support, Updates and Extras”). (Internal note: The analysis engine tries to return a more useful error message in the log file, but this message occurs because the engine doesn’t return status 3, but crashes with the message “forrtl: severe (25): record number outside range, unit 13, file c:\temp\for1ff.tmp” so the log file is not read) [27 August 1999]
  • Bootstrapping: a large number of boostraps with some datasets can cause the analysis engine to crash, resulting in the analysis running with errors and giving the message: “Error: An error occurred within the analysis engine. This could be due to a problem in the Distance analysis engine, or could be because the analysis was reset as it was finishing.” Please contact program authors if you are experiencing this problem, and send a sample project file.[9 Dec 1999]
  • When no areas are specified (or area is 0) and you run a stratified analysis, Distance should return an error if you try to estimate global density as the mean of the stratum densities, weighted by stratum area.  Instead it wrongly calculates global density as the sum of the stratum densities.  [6 June 2000]
  • Distance 3.5 cannot fit more than 6 adjustment terms.  When you try to fit more than 6 the analysis engine terminates with the “An error occurred within the analysis engine” message.  without warning.  This can happen either through manually specifying 6 adjustment parameters, or when automatic model selection leads it to try 6 adjustment terms. [20 Nov 2000]
  • When more than one GOF test is performed, the Analysis Browser displayes the p value for the chi-sq test from the first test, but the Estimation Summary - Detection Function page of the results details shows the p value from the last test.  Need to standardize.  [12 July 2001]
  • Bootstrap CV and confidence limit estimates do not include variance due to multipliers. This means that the bootstrap results underestimate variance when multipliers with SEs>0 are specified. [9 Jan 2002]
  • When right truncation of a percentage of data is chosen or no truncation (ie truncation by largest distance), the truncation is done separately for each component of estimation (detection function, cluster size and encounter rate), and is done at the chosen level of estimation (e.g., globally, by stratum or sample).  This means that if you choose different levels of estimation for different components, you get different trunctions – e.g., detection function by stratum yields different truncations for each stratum, and cluster size globally yields yet another trunction for cluster size.  This also means that AIC for stratified and non-stratified analyses are generally not comparable.  [21 Feb 02]

Other significant problems

  • General/Installation: Distance crashes with run time error 91: “Object variable or With block not set”, after initial splash screen is displayed but before main window. This can occur when Distance is first installed, or after another program has been installed. It occurs because of a problem with the Microsoft Data Access Objects (DAO) setup. Solution: download the DAO 3.51installation package from the Support, Updates and Extras page of the Distance web site. Extract the archive and run setup.exe. Distance should now work. [20 July 99]
  • General: Small memory leak in analysis interface. Symptom: The amount of memory allocated to Distance in Windows gradually grows as analyses are run. Workaround: If you’re doing a lot of analyses, periodically exit and re-start the program. [23 Nov 98]
  • General: Resetting/stopping an analysis while it is finishing (and results are being loaded) can sometimes lead to the analysis generating an error, rather than being reset. [23 Nov 98]
  • General: Distance will not work on Windows systems that use the double-byte character set (most East Asian versions of Windows - e.g., Japanese and Chinese). This is mostly because the of the control used to implement New and Open dialog boxes. Symptom: program crashes when you choose File | New Project or File | Open Project. Please let us know if this is causing an insurmountable problem for you and we can discuss how to address it. It is quite a big job to work-around and we would likely need to do it through a contract. [23 Nov 98]
  • Analysis Browser: Under some circumstances, if you delete all the analyses in your project and then click on “New Analysis”, the message “No Analyses Selected” comes up and no new analysis is created. Workaround: (1) Always leave one analysis in the project - don’t delete them all; (2) If you have deleted all of your analyses and experience this problem, email your project file to the program authors and they will fix it. [3 May 99]
  • Analysis Browser/Details: Under rare circumstances, when you try to create a new analysis, the analysis is created and Analysis Details opens, but you then get a run-time error 380. This can also happen when an analysis that has not been run is opened.  Workaround: open an analysis that has already been run.  Put your mouse over the area between the results text and the comments box, and click and drag to make the comments box as small as possible.  Close that analysis details.  Now creating a new analysis should work.  [Note: this happens because the results comments window is larger than allowed – crash occurs at either of two instances of the line: txtResults.Height = fraResults.Height - txtResults.Top in CMifAnalysisDetails, as fraResults.Height is smaller than txtResults.Top.  Need If < 0 Then… or an On Error Resume Next.] [LJT 10 April 2001]
  • Analysis Details: When opening the results tab for an analysis with an extremely large number of results pages (e.g., with hundreds of strata), you get the message “Distance Internal error: Out of Stack Space” or “Out of memory” The error source is given as “MifAnalysisDetails.ShowNewResultsPage”. Distance sometimes crashes at some point after this. Caused by a bug in Visual Basic 5, triggered when there are too many results pages in an analysis [Internal note: The stack space error comes from the InStr part of the line intStartOfPage = InStr(intStartofPage, flxstrOutputs.Txt, vbCrLf); the out of memory error comes from the Mid part of txtResults.Text = Mid(flxstrOutputs.Text,…)]. Workaround1: use the data selection features to split the analysis into two analyses with less strata, creating two analyses with smaller results pages. Then manually combine the results from these two analyses to produce an overall density estimate. Workaround 2: Create a text results file using Model Definition Properties, Misc, Results files and view it using Notepad, thereby avoiding the need to use the Results tab in Analysis Details [15 Dec 99 updated 20 Jan 00]
  • Analysis Details: Under some circumstances, when viewing a hi-res plot page, Distance quits completely and Windows gives an error message “An unexpected error occurred…”.  This particularly tends to happen in analyses with many plots, and appears to occur only in Windows 9x (not NT).  It is caused by a similar problem to the above: stack error in an InStr command, and is a Visual Basic/Windows problem.  Workaround1: switch to text-plots (in Tools | Preferences | Analysis Details, uncheck the show hi-res plot checkbox).  Workaround 2: Rather than using the default 3 plots per model, specify your own cutpoints for a single plot, (in Model definition | Models | Disagnostics).  [6 June 00]
  • Analysis Details: When viewing some results pages that are extremely long, the end of the page is cut off.  Workaround: Use the “copy to clipboard” button to copy into clipboard, and paste into a word processor to view. [6 April 00]
  • Data Import: Columns may not import correctly if they contain only one text character (e.g., M and F for Male and Female). Workaround: make sure at least some cells in the column have more than one letter (e.g., MA for Male, F for Female). [23 Nov 98]
  • Data Import: General problems importing text columns that contain some rows with only numbers in them (e.g., a stratum label column with rows: 71, 72, 73, 74, 7A - in this case the 7A label is not recognized and is omitted from the imported data, causing all transects in stratum 7A to be placed in stratum 74). Workaround: make all rows for the text columns contain at least one non-numeric character (e.g., in the above example, change the rows to something like A71, A72, A73, A74, A7A). [20 Dec 99]
  • Data Import: In tab-delimited files, Distance sometimes does not recognize the delimiters and shows the data as comprising one large column. Workarounds: try clicking on another delimiter, and then click back on Tab. Alternatively, try starting the import wizard again. [30 June 99]
  • Data Import: If you try to import data from a text file whose filename includes symbols (e.g., $, £, %), you get error 3125 between the Step 1 and Step 2 pages. The message is: The database engine can’t find ‘[Filename]’. Make sure it is a valid parameter or alias name, that it doesn’t include invalid characters or punctuation, and that the name isn’t too long. This is caused by a limitation in the database component. Workaround: rename text file to all text and try again. [29 June 99]
  • Data Import: One unconfirmed report of Distance crashing without an error message, after several cycles of: create project, import 2-5000 records, run an analysis.  Crashes before the first import screen comes up.  Possible memory leak?  Please contact program authors if you get this problem. [6 April 00]
  • Data Import: Get error message “Can’t update. Database or object is read-only.” One reason this occurs is because of the file extension. By default, the import engine can only import files with extensions: txt, csv, tab, asc, htm or html. See Microsoft knowledge base articles Q247861 and Q239105 for more information. Solution: (i) change the extension of your import file to one of the above; (ii) edit registry to allow the extension you are using (see above Microsoft articles for details). [12 Nov 01]
  • Import Project: The data part of the project may not be correctly imported in non-English locales (where . indicates 000s and , indicates decimal point). Workaround: switch to an English locale (in Windows Control panel, Regional Settings) while importing old projects. [21 Dec 98]
  • Import Project: In the import project wizard, when you press Finish, you get the error message “Can’t update. Database or object is read-only”. This occurs becase the file extension “.tmp” is not in the list of allowed extensions for text file data import (see Microsoft knowledge base articles Q247861 and Q239105 for more information). The workaround is to edit the registry to add it. Follow these steps: [26 March 02]
    • Exit Distance
    • On the Windows Start menu, choose Run and type “regedit”
    • In Regedit, use the tree view on the left hand pane to locate the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\3.5\Engines\Text
    • Double click on the key DisabledExtensions on the right hand pane - A new window should open, and the Value Data should show “!txt,csv,tab,asc,htm,html”. Add “tmp” to the end of the list, so it is now: “!txt,csv,tab,asc,htm,html,tmp”
    • Click OK, and then exit Regedit
    • Restart Distance - project import should work fine now.
  • Model Definition: You can’t post-stratify by a field in the stratum layer. This problem is not likely to be fixed in Distance 3.5, but will be resolved in version 4. [30 June 99]
  • Opening projects: If, while opening a project, you get an error message “MS Jet Engine cannot open file”, Source ModDbEngine.OpenLocalDB then you should check that your project file is not read only.  Distance cannot open read-only files.  (To check, find the project file in Windows Explorer, right click on it and select Properties.  Look under Attributes and if Read Only is checked, then uncheck it.)  Note that this also means that you can’t open project files straight off a CD-ROM.

Minor problems with user interface

  • General: When coming up with a new default name for analyses/ data filters/model definitions, it doesn’t work correctly when there are already numbers at the end: e.g., “Truncation at < 100” becomes “Truncation at < 1”. [23 Nov 98]
  • General: When cursor is over a toolbar or splitter, the hourglass disappears prematurely, or doesn’t appear at all while program is busy with a long task. (This is a problem with the toolbar and splitter controls.) [23 Nov 98]
  • General: New/Open/Browse/Import file dialogs - If you repeat-click too quickly on the up button, or select a file too quickly, the dialog (and program) crashes. (This is a problem with the dialog component) [23 Nov 98]
  • Analysis Browser: When running an analysis, the header and main grids resize at different times. [23 Nov 98]
  • Analysis Browser: When you click on a new tab, the inputs side of the display seems to “flicker” [23 Nov 98]
  • Analysis Browser: The right hand side of the table resets itself to bring the left-most column into view whenever new data is loaded into the table (e.g., new analysis, run analysis, etc) [23 Nov 98]
  • Analysis Browser: When you run, delete or reset an analysis, the Browser scrolls to the top, rather than staying at the point of the selected analysis [18 Feb 99]
  • Analysis Browser: Get an error message if you try to create a new analysis based on one whose name is comprized only of numbers [29 June 99]
  • Analysis Details: Distance crashes if you create a new data filter or model definition based on one whose name is comprized only of numbers [29 June 99]
  • Analysis Details (D35Engine): Under Estimation summary, Density & Abundance, it is not clear that the 95% confidence interval given is always analytic, even if you ask for bootstrap intervals.  (The bootstrap intervals are given on later pages under Bootstrap summary).  Should add a footnote to this page explaining how the intervals were calculated. [6 June 00]
  • Analysis Details (D35Engine): When there are no stratum areas, Bootstrap summary page erroneously gives abundance estimates (of -1), when this output should be turned off. [6 June 00]
  • Analysis Details (D35Engine): Under Bootstrap summary - Density & Abundance, under certain circumstances the exponent can be missing from the Estimate column. (You can work out what it should be by looking at the confidence intervals column.) [6 June 00]
  • Data Explorer: Cells are occasionally not merged when there are a very large number to be merged – e.g., a transect containing many hundreds of observations (This is a problem with the tab control) [23 Nov 98]
  • Data Explorer Add Field Dialog: Data type and modeling type are in a different order to that shown in the header rows of the Data Explorer [29 June 99]
  • Data Explorer: Various features (e.g., add field, rename field) are flakey when there are a very large number of records (> 32 700). [8 July 99]
  • Data Explorer: Column resizing. When you resize a column in the top row (e.g., all of “Region” as opposed to “ID”, “Label”, etc subcolumns): (a) shrinking it at this level results in a shrinkage less than you asked for, and stretching it results in more stretching than you asked for; (b) when in the Expanded View, shrinking as per above actually increases the width of the column (as does expanding it). [31 Oct 99]
  • Data Filter: Distance crashes with run-time error 3265 if you change a data layer or field name that is part of the data selection criteria of a Data Filter and then try to open that data filter [30 June 99]
  • Help/Stats file: In the help file documentation under “Saving Output to File”, module 1, parameter 1 should read “Density of clusters if clustered” and 2 should read “Density of individuals” [27 August 99]
  • Main Form: Initial size doesn’t take account of the size and location of the taskbar [23 Nov 98]
  • Model Definition: Bootstrap and Plot files get an extension of .txt if you do not type in an extension. (This is a problem with the File Dialog control – the extension type cannot be changed by selecting .. They promise to address it in the next version of the control.) [23 Nov 98]
  • Model Definition: Allows detection function by stratum, cluster size by all even when using size bias regression methods: this produces an “incompatible levels” error message when run the analysis. Need to prevent this in both the Levels of estimation and cluster size tabs. [23 Nov 98]
  • New Project Setup Wizard: Measurement units conversion: if you enter your own units, but then go back to using one of the defaults, the “Convert” box does not switch back to Automatic. [23 Nov 98]