http://bugs.winehq.org/show_bug.cgi?id=11584
--- Comment #30 from Tiemen Schreuder tietmen@hotmail.com 2008-04-10 03:41:00 --- Created an attachment (id=12039) --> (http://bugs.winehq.org/attachment.cgi?id=12039) Selection of recursion stack overflow, CoD4
I've attached a stack dump by winedbg, the PreLoad causing the problem is indeed the "target" one. This Preload calls: LoadTexture > LoadLocation > read_from_framebuffer_texture > ActivateContext > FindContext > Preload, etc.
Shouldn't this call chain happen at least once on a new context, to read back the texture, but stop once it tries to ActivateContext again?
I'm currently recompiling with the change you suggested (in combination with my patch). I will also try without the patch and just your change and let you know the results.