When the inventory spans two pages, if you swap between them enough times without closing the inventory window the game will crash with the message:
ERROR: [VM] Stack index 4130 out of valid range [0..4095]
King's Quest VI (CD/Windows/English)
ScummVM 1.3.0git4605-g42a0ebc
MacOS 10.6
This sounds like a script bug
Lowering the priority of this one for now, since it's an adge case and doesn't affect normal gameplay (this helps distinguish which bugs are release critical)
The number of stack frames grows by 4 every time you switch pages. At some point that overflows the stack. I don't think this is something we can fix.
Closing, but added on wiki at http://wiki.scummvm.org/index.php/SCI/Bugs#Script_bugs .
was a script bug, that also occurs in sierra SCI
fixed today using a script patch via commit e14fc8a8561725c74d2923aed995de3dcfff68e7