<span style="border-collapse:collapse;font-family:arial, sans-serif;font-size:13px">Hi Weihai,<br><br>You have discovered an important bug in ADMB (not Emacs or ADMB-IDE) that was created sometime after the 10.1 release.<br>

<br>I also get an error if I rename the 'simple' example to 'sim' or shorter. The error is reported in the Dos shell:<br><br> C:\simple>admb sim<br> C:\simple>sim<br><br> Error: Invalid index 0 used for array range [1, 3]<br>

 in "unsigned char & adstring::operator()(int i)".<br> Index out of bounds<br><br>What happens in Msys is mysterious and not relevant for the general ADMB user.<br><br>Can I ask you to report this bug through <a href="mailto:users@admb-project.org" style="color:rgb(0, 0, 204)" target="_blank">users@admb-project.org</a> and/or the Redmine system? I'm leaving the office and going to the countryside for some days. There's no need to Emacs or Msys in the bug report, just the Dos shell.<br>

<br>All the best,<br><br>Arni<br><br>P.S. Well, if you want to be extra helpful you could check out slightly earlier versions from SVN and find out which SVN commit introduced the bug (hopefully not before SVN version 1). Or maybe it would take Johnoel less time to locate the bug...<br>

<br><br><br>On Fri, 15 Jul 2011, Weihai Liu wrote:<br><br><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

Hi Arni,<br><br>I currently build the admb from svn source on windows, when I use the emacs, which use your two files from admb-IDE, version for .emacs is 4.5.0-1, version for admb.el is 6.4, the build works fine, but when I run it, it throw me the following error, after trials, I found out if I use short filename(<=3 characters), then I got this error, otherwise it is ok for long filename.<br>

<br>Error: Invalid index 0 used for array range [1, 3] in "unsigned char &<br>adstring::operator()(int i)".<br>Index out of bounds<br><br>if my tpl file is sim.tpl, or si.tpl then it not run, if they are simple.tpl, then it runs fine. This only happened when I use emacs. If I run it from Msys, it works totally fine. So I guess the problem come from admb.el file about the run admb function, and it is likely there are something changed for new admb, since the sim.tpl(one of my old model has this name) works fine in emacs for older admb 9.<br>

<br>So if you have new admb on your side, you can try to run sim.tpl(rename simple.tpl as) to see if it runs. thanks<br><br>-- <br>Weihai Liu</blockquote></span>