Isurwars / Correlation

This program calculates the main correlation functions of a material: Radial Distribution Function (J(r)), Pair Distribution Function (g(r)) and Plane Angle Distribution (PAD).
MIT License
17 stars 7 forks source link

Cryptic error for -w option #3

Closed awvwgk closed 3 years ago

awvwgk commented 3 years ago

The -w arguments seems to behave strangely, at f23d1383a96510a9085e418c5c401f7235286f0b I get for any input

Starting program: /home/awvwgk/projects/src/joss/Correlation/_build_debug/Correlation -w 0.02 test/test_2/Graphene.car
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid

Program received signal SIGABRT, Aborted.
0x00007ffff7ac5615 in raise () from /usr/lib/libc.so.6

With the patch c5a37aadbb7814b81ea4cc315ea71670a27d06ca the -w argument is always in error

Starting program: /home/awvwgk/projects/src/joss/Correlation/_build_debug/Correlation -w 0.02 test/test_2/Graphene.car
Invalid input: '[Inferior 1 (process 29177) exited with code 01]

Checking the state of optarg in the case 'w': reveals that it is null. Note that this does not happen if --bin_width is used to specify the option.

Isurwars commented 3 years ago

Catched, fixed in RC6.