iorlas / JT2

Jungle Timer for the LoL game. Second edition. First was on ansi C with dirty hacks. New edition uses D3D9Proxy dll and CPP with boost.
8 stars 5 forks source link

Crash at DrawText #33

Closed iorlas closed 13 years ago

iorlas commented 13 years ago

Reproduce: Start the game. Inject. Run Cheat engine. Crash.

iorlas commented 13 years ago

Problem somewhere in the device recreation. On cheat engine run, device marks as lost, so LoL tries to run Reset(). Usually, it must be like this one in the console:

r3dRenderLayer::RestoreResources

But we our, it cant recreate resources, so we need to recheck it.

iorlas commented 13 years ago

Need to try OnLost/Reset call for recreating resources like a font. http://www.mikoweb.eu/index.php?node=24

iorlas commented 13 years ago

Btw, maybe something with a inner counter of D3D. Need to recheck d3d proxy library: http://www.codeguru.com/cpp/g-m/directx/directx8/article.php/c11453/Intercept-Calls-to-DirectX-with-a-Proxy-DLL.htm

iorlas commented 13 years ago

unable to reset d3d device, 8876086c

iorlas commented 13 years ago

All is ok, fix commit is comming.

iorlas commented 13 years ago

So, better to unload resources before call device->Reset. And load again after. Not needed to check it by myself, app will handle it.