If anyone is up to playing with more in depth debugging tools, then I suspect it might be possible to hunt down exactly where the corruption occurs.
Firstly you'll need to install the debugging tools for windows:
http://msdn.microsoft.com/library/window...s.85).aspx
Note that you download the SDK installer, and during install only select debugging tools.
Next, you'll need to use the gflags utility to enable page verification (more details on it here):
http://msdn.microsoft.com/en-us/library/...85%29.aspx
Depending on the problem standard page verification might be enough to catch the thread causing the problem. If it's not then it might need full page verification.
After installing go into:
C:\Program Files (x86)\Windows Kits\8.1\Debuggers\x86\
Note that it needs to be the 32bit version, as kodi is 32bit.
To enable standard heap testing:
gflags /p /enable kodi.exe
I actually recommend full heap verification use as it can give a more accurate stack trace of what's scribbling memory, but needs more memory to run:
gflags /p /enable kodi.exe /full
And to disable:
gflags /p /disable kodi.exe
Warning, using the wrong options can enable page heap verification on the whole system (and that'll be very slow)
Hopefully if there's a crash the dump will show a more accurate location of which stack caused the problem.
Note that there's one other possible cause, which is a buffer underflow, and that needs different options:
gflags /p /enable kodi.exe /full /backwards