[Developers] adprogram_name

John Sibert sibert at hawaii.edu
Sat Aug 6 20:54:45 PDT 2011


Thanks, Dave.

Jim, are going to commit these changes?

John

On 08/06/2011 11:59 AM, dave fournier wrote:
> On 11-08-04 08:18 AM, Jim Ianelli wrote:
>
> I checked it out. making that change to
>
> int n=adprogram_name.size();
> if (n>4)
> {
> if (adprogram_name(n - 3) == '.'
> && adprogram_name(n - 2) == 'e'
> && adprogram_name(n - 1) == 'x'
> && adprogram_name(n) == 'e')
> {
> n -= 4;
> }
> }
>
> in model7.cpp fixes the problem Jim encountered.
>
>
>> 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
>
>
> _______________________________________________
> Developers mailing list
> Developers at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/developers

-- 
John Sibert
Emeritus Researcher, SOEST
University of Hawaii at Manoa

Visit the ADMB project http://admb-project.org/




More information about the Developers mailing list