Please provide some published pl code that leads to the error,
so that it can be reproduced by others that want to
help you. You can upload it to gist or GitHub even
if it is 1000 of facts or so. Maybe you need to anonymize
it, because of privacy issues. The MAX_LG_STACKED_STRINGS is only a buffer. From the SWI-Prolog source it is seen that SWI-Prolog
does have an internal flag ALERT_BUFFER.
So my rough understanding is that there are multiple
MAX_LG_STACKED_STRINGS on the stack. Which would imply
that increasing this constant doesn’t solve the problem.
This would only increase a kind of block size. And the
fatal error could be due to some other problem
and/or there is an advice to rewrite your code. In as
far it could be also reproducible without the Python
interface and on all platforms. Maybe also inside SWISH.
Dunno, dont know what you are doing with strings, since
there is no published test case. You could maybe also switch on MSG_STRING_BUFFER debugger message, these messages show me
that SWI-Prolog uses multiple buffers:
DEBUG(MSG_STRING_BUFFER,
Sdprintf("Discarding string buffers %d..%d\n",
stack->top, stack->allocated));
DEBUG(MSG_STRING_BUFFER,
Sdprintf("Added string buffer entry %p with level %zd\n",
sb, (size_t)sb->frame));
Edit 31.07.2021:
A test case like here:
FATAL ERROR: Too many stacked strings #102
https://github.com/yuce/pyswip/issues/102