Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Tekkn0logik's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    37
    Reputation
    12
    Thanks
    52
    My Mood
    Amused

    Game crashes after a few minutes when D3D is used.

    Well, I've written a hack which uses D3D, and it seems to work almost perfectly. However, at seemingly random times, it'll crash Combat Arms. Is this because it was detected by HackShield or what? It's crashed the game both in the lobby and in-game although it usually crashes around 1 minute after the game is started.

    Here's a log which it outputs. Seems the exception happens in d3d9.dll which makes me think something's wrong with a detour. Or possibly it's just hackshield. I've tried both unpacked and packed with UPX and both turned out the same.

    Code:
    2010/9/8 ----- 2:8:16 - CombatArms Debug Start!
    
    Exception code: C0000005
    
    
    Fault address:  6FB015AC 01:000405AC C:\Windows\system32\d3d9.dll
    
    
    
    
    EAX:00000002
    EBX:03E16FE4
    ECX:03E16FE0
    EDX:00000000
    ESI:00000060
    EDI:12EBDA20
    
    
    CS:EIP:001B:6FB015AC
    
    
    SS:ESP:0023:0012ED5C  EBP:0012ED8C
    
    
    DS:0023  ES:0023  FS:003B  GS:0000
    
    
    Flags:00010206
    
    
    
    Call stack:
    
    Address   Frame     Logical addr  Module
    
    
    Call_Static[0]: 6FB015AC  0012ED8C  0001:000405AC C:\Windows\system32\d3d9.dll
    
    Call_Static[1]: 6FB015AC  0012EE08  0001:000405AC C:\Windows\system32\d3d9.dll
    
    Call_Static[2]: 6FB015AC  0012EF54  0001:000405AC C:\Windows\system32\d3d9.dll
    
    Call_Static[3]: 6FB015AC  0012EF80  0001:000405AC C:\Windows\system32\d3d9.dll
    
    Call_Static[4]: 6FB015AC  0012F070  0001:000405AC C:\Windows\system32\d3d9.dll
    
    Call_Static[5]: 6FB015AC  0012F258  0001:000405AC C:\Windows\system32\d3d9.dll
    
    Call_Static[6]: 6FB015AC  0012F288  0001:000405AC C:\Windows\system32\d3d9.dll
    
    Call_Static[7]: 6FB015AC  377E934C  0001:000405AC C:\Windows\system32\d3d9.dll
    
    
    
    
    Client_Version: VER_US_2.1008.05
    
    
    Player uID: 20932607
    
    
    CPUSpeed: 2394 MHz
    
    Identifier: x86 Family 6 Model 23 Stepping 10 
    
    ProcessType: Intel Pentium (II/Pro)
    
    VideoCard: Mobile Intel(R) 45 Express Chipset Family (Microsoft Corporation - WDDM 1.1)
    
    
    System_Memory
    
    Total: 2147483647
    
    Use:  947384319
    
    [debug_info_end]
    
    2010/9/8 ----- 2:8:16 - CombatArms Debug End
    And, here's all my code related to Direct3d.

    Code:
    HRESULT WINAPI DrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, int BaseVertexIndex, UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimCount)
    {
    	HRESULT res;
    	if(lightChams) {
    		IDirect3DDevice9_SetRenderState(pDevice, D3DRS_ZENABLE, D3DZB_FALSE);
    		SetLightChams(pDevice, 255, 255, 0, 0);
    	}
    
    	res = origDIP(pDevice, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimCount);
    	if(lightChams) {
    		IDirect3DDevice9_SetRenderState(pDevice, D3DRS_ZENABLE, D3DZB_TRUE);
    		SetLightChams(pDevice, 255, 0, 255, 255);
    	}
    	return res;
    }
    
    
    HRESULT WINAPI EndScene(LPDIRECT3DDEVICE9 pDevice)
    {
    	RECT rct;
    	char buf[128];
    	int y = 20, k;
    	PTCHack ptc;
    	
    	if(hFont == NULL)
    		D3DXCreateFont(pDevice, 16, 0, 0, 0, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &hFont);
    	
    	if(menu.isEnabled) {
    		D3DRECT rec = { 15, 15, 215, 315 };
    		IDirect3DDevice9_Clear(pDevice, 1, &rec, D3DCLEAR_TARGET, DGRAY, 0, 0);
    		
    		for(k = 0; k < menu.nItems; k++) {
    			ptc = menu.items[k];
    			sprintf(buf, "%s: %s", ptc.name, ptc.on ? "on" : "off");
    			MAKECOORD(&rct, 20, y);
    			ID3DXFont_DrawText(hFont, NULL, buf, -1, &rct, DT_NOCLIP, k == menu.selection ? CYAN : RED);
    			y += 20;
    		}
    	}
    
    	return origEndScene(pDevice);
    }
    Any ideas?

    Edit: random side question: what does the LT in LTClient stand for?

  2. #2
    -ExileD-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    https://mpgh.net Posts: 25,987
    Posts
    552
    Reputation
    32
    Thanks
    795
    My Mood
    Lurking
    You do know you cant hook DrawIndexedPrimitive without a HS bypass?

    The LT in LTClient stand for LithTech - It's the game engine that CA runs on.

  3. The Following User Says Thank You to -ExileD- For This Useful Post:

    Tekkn0logik (09-07-2010)

  4. #3
    Tekkn0logik's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    37
    Reputation
    12
    Thanks
    52
    My Mood
    Amused
    Quote Originally Posted by -ExileD- View Post
    You do know you cant hook DrawIndexedPrimitive without a HS bypass?

    The LT in LTClient stand for LithTech - It's the game engine that CA runs on.
    Well, I'd better get working on a bypass then. Is it as ridiculously hard as people make it out to be?

    And thanks for the bit about lithtech, I would have never figured that out.
    Last edited by Tekkn0logik; 09-07-2010 at 01:43 PM.

  5. #4
    Kallisti's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,019
    Reputation
    52
    Thanks
    376
    My Mood
    In Love
    Quote Originally Posted by Tekkn0logik View Post
    Well, I'd better get working on a bypass then. Is it as ridiculously hard as people make it out to be?

    And thanks for the bit about lithtech, I would have never figured that out.
    you dont find bypasses. You make them.
    Nobody bothers sharing bypasses anymore

    未来が見えなくて怖いから
    未来が見えてしまって悲しいから
    目を閉じて優しい思い出に浸ってしまう




  6. #5
    CodeDemon's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    vagina
    Posts
    1,070
    Reputation
    50
    Thanks
    940
    My Mood
    Fine
    Quote Originally Posted by Kallisti View Post


    you dont find bypasses. You make them.
    Nobody bothers sharing bypasses anymore
    I don't see him stating anywhere about finding a bypass /


    Damn replying to posts on an iPod is hard.

    And yes, the dip is causing your crash. I see somebody put the sticky to good use/
    Last edited by CodeDemon; 09-07-2010 at 02:03 PM.

  7. #6
    -ExileD-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    https://mpgh.net Posts: 25,987
    Posts
    552
    Reputation
    32
    Thanks
    795
    My Mood
    Lurking
    Quote Originally Posted by Tekkn0logik View Post
    Well, I'd better get working on a bypass then. Is it as ridiculously hard as people make it out to be?

    And thanks for the bit about lithtech, I would have never figured that out.
    Many "pro" coders such as Gordon claim it's easy. But most of us are having trouble doing it.

    I'm hooking it currently and it's not Dcing at all, But my chams wont show up. So it leaves me to two things.
    a - It's not hooking properly
    b - The DIP is Hooking and my chams are not working/outdated.

  8. #7
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by -ExileD- View Post
    Many "pro" coders such as Gordon claim it's easy. But most of us are having trouble doing it.

    I'm hooking it currently and it's not Dcing at all, But my chams wont show up. So it leaves me to two things.
    a - It's not hooking properly
    b - The DIP is Hooking and my chams are not working/outdated.
    You Cant Hook Dip With Gellins Detours...

  9. #8
    -ExileD-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    https://mpgh.net Posts: 25,987
    Posts
    552
    Reputation
    32
    Thanks
    795
    My Mood
    Lurking
    Quote Originally Posted by whit View Post


    You Cant Hook Dip With Gellins Detours...
    So thats why D= Sucks.

  10. #9
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,404
    Reputation
    157
    Thanks
    4,003
    My Mood
    Flirty
    Quote Originally Posted by whit View Post


    You Cant Hook Dip With Gellins Detours...
    Im pretty sure you can. I think i did but i DC'd about 1-2 min in.

  11. #10
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by ac1d_buRn View Post


    Im pretty sure you can. I think i did but i DC'd about 1-2 min in.
    Hmm Weird Its Like It Dont Even Hook It At All With Me../

  12. #11
    LightzOut's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    185
    Reputation
    11
    Thanks
    25
    Your going to need either an alternative hook or a bypass to use DIP.

  13. #12
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by LightzOut View Post
    Your going to need either an alternative hook or a bypass to use DIP.
    I Can Already Use Dip Just Saying You Cant Hook It With Gellins Detours...

  14. #13
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,404
    Reputation
    157
    Thanks
    4,003
    My Mood
    Flirty
    Quote Originally Posted by whit View Post


    I Can Already Use Dip Just Saying You Cant Hook It With Gellins Detours...
    [php]
    DWORD DIP = vTable[82]
    pDrawIndexedPrimitive = (oDrawIndexedPrimitive)DetourCreate (( BYTE* )DIP, ( BYTE* )myDrawIndexedPrimitive, DETOUR_TYPE_JMP );
    [/php]

    Like that?

  15. #14
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Quote Originally Posted by ac1d_buRn View Post


    [php]
    DWORD DIP = vTable[82]
    pDrawIndexedPrimitive = (oDrawIndexedPrimitive)DetourCreate (( BYTE* )DIP, ( BYTE* )myDrawIndexedPrimitive, DETOUR_TYPE_JMP );
    [/php]

    Like that?
    Ya That How I Was Doing It In Gellins Base But It Seemed Not Too Work So Idk...

  16. #15
    Gordon`'s Avatar
    Join Date
    Dec 2007
    Gender
    male
    Posts
    283
    Reputation
    24
    Thanks
    325
    why are you using IDirect3DDevice9_Clear when you can use pDevice->Clear, same with SetRenderState etc.

    maybe the registers are fucked up, try to save then at the beginning of the function (__asm pushad) and restore them before returning at the end of the function (__asm popad)

    doesnt look like hackshield is detecting something, cause then it wouldnt generate the debug file.

    also check the detoursize. normally its 5 on a stdcall function (all direct3ddevice9 functions are stdcall) but it depends on how the detour is done (JMP, NOP NOP JMP, PUSH RET, etc)
    Last edited by Gordon`; 09-07-2010 at 07:25 PM.


  17. The Following 2 Users Say Thank You to Gordon` For This Useful Post:

    kotentopf (09-07-2010),Tekkn0logik (09-07-2010)

Page 1 of 2 12 LastLast

Similar Threads

  1. [Help] (Source Code Included)Game Crashes after I inject my hack
    By johnnydicamillo in forum WarRock Hack Source Code
    Replies: 4
    Last Post: 12-16-2010, 05:57 PM
  2. [Help] warrock crashes after a few seconds?? ( lazy admins)
    By prosniper in forum WarRock Discussions
    Replies: 15
    Last Post: 08-02-2010, 05:07 PM
  3. [Help] warrock crashes after a few seconds??
    By prosniper in forum WarRock Discussions
    Replies: 15
    Last Post: 08-02-2010, 12:04 AM
  4. WarRock crashes after a few minutes when using D3D hack
    By taylan in forum C++/C Programming
    Replies: 5
    Last Post: 03-17-2010, 08:11 AM
  5. Game crashes after Game Start
    By Iamazn in forum Combat Arms Hacks & Cheats
    Replies: 1
    Last Post: 12-25-2008, 01:25 PM