The reason for your error is that your permutation process stops as soon as your elements are in reverse alphabetical order.
When your code permutes "b", "c", "a", it swaps to cab, then cba, then your first while loop in the permute function determines that b ([1]) is greater than a ([2]), then subtracts from j (now 0), then determines that c ([0]) is greater than b([1]) and once again subjects from j (now -1). The negative one causes the loop to end and the func to return false.
One solution to this is to sort the input into alphabetical order, then do the permutations and that should work for you.