I made some investigation and I found that the problem is in the parsing of the command line, exactly in line 301 of file rmd_parseargs.c
while ((arg_id = poptGetNextOpt(popt_context)) > 0) {
arg_return->x is 0 just before this line and is set with some random number right after, so the problem might be in popt library
As a very ugly hack to check that the problem is exactly in that line I tried to reset to 0 arg_return->x in the next line and now it works!
I made some investigation and I found that the problem is in the parsing of the command line, exactly in line 301 of file rmd_parseargs.c
while ((arg_id = poptGetNextOpt( popt_context) ) > 0) {
arg_return->x is 0 just before this line and is set with some random number right after, so the problem might be in popt library
As a very ugly hack to check that the problem is exactly in that line I tried to reset to 0 arg_return->x in the next line and now it works!