There's a few things wrong, that may or may not be the cause of your problem:
Use of freed memory
free(cmdLine);
scanOptions(argc, argv);
You can't free the cmdLine here, since your strtok() calls will assign pointers inside cmdLine to your argv. free() it after scanOptions() , though if you save any optarg pointers directly, they will point into space that you have free()'d - you use strdup() so youre safe in your case.
Resetting getopt()
If you have called getopt previously, you need to reset some of its variables so it can scan again, (see the getopt manpage for an explanation). You need to do:
optind = 0;
Wrong index in argv The first index in argv is by convention the program name, not any program arguments. So make sure your argv[0] isn't any of your arguments. But it needs to be a valid string and not e.g. a NULL pointer.
argv[1] should be the first argument.
Add a sentiel to argv
The traditional argv of main() ends with a NULL pointer, your emulated argv should too. After the while loop, do
argv[argc] = NULL;