https://bugs.winehq.org/show_bug.cgi?id=12964
--- Comment #145 from Michael Müller michael@fds-team.de --- (In reply to Furyhunter from comment #144)
For some reason, PSOBB thinks it's getting more memory than it actually is to write texture information at this specific point during loading, and it is writing either before or after the pBits it was given.
Is it possible this is a texture format bug? I'm not sure what to do from here, but I will keep looking into it.
In case the game is writing past the memory block of the locked texture, it might expect the mipmap levels to directly follow the memory block of the texture. It is not officially supported, but there are also other games which rely on this. They try to be very efficient (or buggy) by writing over the end of the returned memory to directly update the mipmap levels. Wine does not yet support this, see bug 34480 for more information. You could add a hack to allocate twice the amount of system memory for a texture. One example for such a hack can be found at (just remove the checks for the resource size, the patch targets a specific game):
https://github.com/PlayOnLinux/wine-patches/blob/master/custom/LeagueOfLegen...