[Developers] adprogram_name
dave fournier
davef at otter-rsch.com
Sat Aug 6 08:34:42 PDT 2011
On 11-08-04 08:18 AM, Jim Ianelli wrote:
For example in model7.cpp there is code to strip .exe from the name.
It should check that n>4
int n=adprogram_name.size();
if (n>4) // added this
{
if (adprogram_name(n - 3) == '.'
&& adprogram_name(n - 2) == 'e'
&& adprogram_name(n - 1) == 'x'
&& adprogram_name(n) == 'e')
{
n -= 4;
}
}
> Recompiled ADMB from source code the other day and things are working
> ok---except that adprogram_name seems to be acting strangely.
>
> A model called "tm" (for transcendental mindlessness) that compiles
> fine and runs from within gdb perfectly gives the following message
> when run outside of gdb (i.e., normally):
>
> tm
>
> Error: Invalid index / used for array range [1, 2] in "unsigned char &
> adstring::operator()(int i)". Index out of bounds
>
> If I run it outside with the following:
>
> .\tm
>
> It works.
>
> Printing out the program name (to dig deeper) I see that the above
> command (from within gdb) give:
>
> C:\Users\jianelli\Desktop\fsct/tm.exe
>
> The classic windows vs unix slash war.
>
> Oddly, if I switch to drive d: and run C:tm it works fine.
>
> Not sure if this is something that is an easy fix but it is sure a
> lame error that will turn people away quickly if not fixable (or maybe
> I'm alone with this issue?) I recall Buck Stockhausen had a similar
> naming convention issue that changed the behavior in a recent email.
>
> Cheers,
>
> Jim
>
>
> _______________________________________________
> Developers mailing list
> Developers at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/developers/attachments/20110806/9168751f/attachment.html>
More information about the Developers
mailing list