<div dir="ltr"><div>Indeed, it looks as if I had not tested it, I thought I had... This <a href="https://github.com/SimonRit/RTK/commit/d1450e8946414072f65f2a6f71007193459577de">patch</a> should fix it.<br></div>Thanks for the report!<br>Simon<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 5, 2015 at 12:44 PM, Chao Wu <span dir="ltr"><<a href="mailto:wuchao04@gmail.com" target="_blank">wuchao04@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Simon,<br>
<br>
There is still an issue with gengetopt. The config file cannot be read.<br>
The problem seems to be at around line 62 in rtkMacro.h:<br>
    char *configFile = args_info.config_arg; points configFile to the<br>
address storing the config file name, but next<br>
    cmdline_parser_##ggo_filename##_free(&args_info); frees all string<br>
field of args_info, including args_info.config_arg, therefore the<br>
content pointed by configFile becomes invalid.<br>
<br>
Regards,<br>
Chao<br>
<div class="HOEnZb"><div class="h5"><br>
2014-12-12 14:10 GMT+01:00 Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr">simon.rit@creatis.insa-lyon.fr</a>>:<br>
> My fix did not work. Cyril (Mory) reported that multiple options were read<br>
> twice. I hope this new fix will work but don't hesitate to report other<br>
> issues with gengetopt.<br>
> Thanks again for you reports,<br>
> Simon<br>
><br>
> On Wed, Dec 10, 2014 at 9:27 PM, Steven Pollmann <<a href="mailto:spollmann@robarts.ca">spollmann@robarts.ca</a>><br>
> wrote:<br>
>><br>
>> That makes sense, thanks for the quick usage explanation, and fix.<br>
>> (Disabling the override issue makes sense, and I didn't have time to trace<br>
>> through gengetopt.  I thought I was missing something, as none of the<br>
>> non-flag arguments were being reset (to null, or default values, and thus<br>
>> thought 'override' meant something else!).<br>
>><br>
>> Thanks again, glad the info was helpful.<br>
>><br>
>> Steve<br>
>><br>
>><br>
>> On 14-12-10 4:01 AM, Simon Rit wrote:<br>
>><br>
>> Hi,<br>
>> Thanks for the report, very useful information. I could reproduce the bug<br>
>> and I hope that I have fixed it. Briefly:<br>
>> - I have changed the code because Ben Champion reported memory leaks and I<br>
>> noticed that they occured in deprecated functions of gengetopt that I don't<br>
>> use anymore,<br>
>> - the way the new macro (as well as the previous one) is written is: first<br>
>> read the command line to find if a config file is passed, then read the<br>
>> config file and finally read the command line again to check that everything<br>
>> has been passed.<br>
>> - your fix was not perfect because we would not have checked that the<br>
>> required options were set,<br>
>> - it turns out that disabling the override option did the job.<br>
>> Everything sworks fine now but let met know if you notice something wrong<br>
>> again. Thanks again,<br>
>> Simon<br>
>><br>
>> On Wed, Dec 10, 2014 at 1:39 AM, Steven Pollmann <<a href="mailto:spollmann@robarts.ca">spollmann@robarts.ca</a>><br>
>> wrote:<br>
>>><br>
>>> A recent update to rtkMacro.h seems to have caused the ggo command line<br>
>>> processor to ignore command line flags. (i.e. I can't get any verbose output<br>
>>> with '-v').<br>
>>> It seems to happen after making a second call to:<br>
>>><br>
>>> cmdline_parser_##ggo_filename##_ext(argc, argv, &args_info, &args_params)<br>
>>><br>
>>> Removing this second call, has resolved the issue for me.<br>
>>> I'm not sure, however, what the intended use of the second call was for<br>
>>> (it occurs immediately after:<br>
>>><br>
>>> args_params.check_required = 1;<br>
>>><br>
>>> which I feel could just be moved above the first call, as it happens<br>
>>> regardless, but I may be missing something.<br>
>>><br>
>>> I've attached my quickly modified rtkMacro.h for comparison to the latest<br>
>>> github commit.<br>
>>><br>
>>> Anyhow, hopefully this info is useful, and doesn't only affect me.<br>
>>><br>
>>> Steve<br>
>>><br>
>>> Our system setup:<br>
>>> -Ubuntu 14.04 x64<br>
>>> -gcc 4.8.2<br>
>>> -cuda 6.5<br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> Rtk-users mailing list<br>
>>> <a href="mailto:Rtk-users@public.kitware.com">Rtk-users@public.kitware.com</a><br>
>>> <a href="http://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a><br>
>>><br>
>><br>
>><br>
><br>
> _______________________________________________<br>
> Rtk-users mailing list<br>
> <a href="mailto:Rtk-users@public.kitware.com">Rtk-users@public.kitware.com</a><br>
> <a href="http://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a><br>
><br>
</div></div></blockquote></div><br></div>