The error happens at this function, this doesnt mean, this function causes it.
Probably this means the problem is detected when the memory where the string is stored is accessed.
SigSEV means: "invalid memory access" and there should be a line number displayed, where the progamm fails.
If there is something wrong with the memory of the string argument, the error should occur when the content of the string is accessed.
So set a breakpoint there and examine the content of the string, or/and insert a Writeln or debugln to see the contents.
Probably the string is trashed by an array overflow or is uninitialized.
If the program is large or recursive, or the string is very large, stack overflow could be a reason.
(I believe there is a write protected guard page at the end of the stack segment, that causes SigSEV at stack overflow, but I do not know it)
Also I recommend to pass the string not by value but by reference as "constref" or "var" parameter to reduce unnecessary stack consumption and for performance.