Clientcrash - but it works for several minutes menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    streppel's Avatar Active Member
    Reputation
    78
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Clientcrash - but it works for several minutes

    Hey all

    (NOTE: NOT WOW RELATED)

    so i got my bot base working so far and thought that i'd write a simple assistbot.
    i'm calling the games function via blackmagics asm injection class. I tested all the functions i'm using for this and they all work fine.
    The problem is: the bot works for several minutes, but suddenly the client crashes. i'm not sure why it crashes as,like i said, all the functions work correctly and for several minutes.

    i made sure i free the memory i used too, so this shouldn't be the problem here either.

    What could cause those crashes and how would i fix it?

    thx for your help

    Clientcrash - but it works for several minutes
  2. #2
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It would help if you actually provided your code, the relevant error information dumps, etc etc. Otherwise we'd just be guessing.

    Alternatively, you could just wait for someone telepathic, but I think you'll be waiting a while...

  3. #3
    streppel's Avatar Active Member
    Reputation
    78
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well,there actually is no error dump, the client just crashes and my bot doesn't give me anything else then which function it was tyring to use when it crashed
    this is the function that is called upon crash
    public void AssistFight(uint id) { try { - Pastebin.com

    this is the original game function:
    [ASM (NASM)] .text:10022526 ; public: void __thiscall n3EngineClientAnarchy_t::N3Msg_AssistFi - Pastebin.com

    this is the decompiled code ida gave me:
    [C] int __stdcall n3EngineClientAnarchy_t__N3Msg_AssistFight(int a1) { int resul - Pastebin.com

    like i said,it works for a few minutes and then all of the sudden crashes

  4. #4
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll bet you it's thread issues.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  5. #5
    streppel's Avatar Active Member
    Reputation
    78
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but why would it work for minutes then?

  6. #6
    schlumpf's Avatar Retired Noggit Developer

    Reputation
    755
    Join Date
    Nov 2006
    Posts
    2,759
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by streppel View Post
    but why would it work for minutes then?
    Because race conditions are race conditions, not crashs. If its ABABABABABABABAB für minutes, then A&B at the same time, it might **** things up.

  7. #7
    streppel's Avatar Active Member
    Reputation
    78
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    EDIT:

    you were so right,it was a threading problem
    i did implement a solution to hijack the mainthread now and it ran for 15 minutes straight without any problem, so i guess this problem is fixed.
    thank you guys, +rep

    EDIT2:

    ok with the help of this post http://www.mmowned.com/forums/world-...ndexecute.html
    i managed to made my bot a little more stable
    the problem is, that it still tends to crash after some time(before it was like 5 minutes,now half an hour but still not what i'd like here like several hours)
    i tryed to implement the Thread WaitForSingleObject, but don't know if the implementation is correct this way, cause in the example of the code above it was a wait for 2 seconds, but if i'd pass those 2000ms to WaitForSingleObject it would always wait this long.

    and this is my new code:
    http://pastebin.com/K7YBJ6cq
    to stresstest this i ran this function in a loop with a 100ms wait. it went well for about half a minute,then crashed again. (normally i'm doing like a 600ms wait there, what was when i got 30 minutes working, but it should work even with a 100ms wait,not?)

    as always thanks for your help and sorry for me being not smart enough yet to find those problems myself.
    Last edited by streppel; 06-15-2011 at 12:13 PM.

  8. #8
    streppel's Avatar Active Member
    Reputation
    78
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *push*
    sorry for bumping but as i wrote above, the problem still exists

  9. #9
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't wait for the main thread because it won't exit like the thread CreateRemoteThread created will when it is finished. Also, this is not the way to avoid sync issues because the main thread may be in the middle of the function when you hijack it.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  10. #10
    streppel's Avatar Active Member
    Reputation
    78
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so the other way would be like hooking endscene.
    this is where i'd have a problem: the game is using directx7 /direct3d and some opengl. which function should i hook there?

  11. #11
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by streppel View Post
    so the other way would be like hooking endscene.
    this is where i'd have a problem: the game is using directx7 /direct3d and some opengl. which function should i hook there?
    You can hook any game function that is pulsed every frame - doesn't have to be a DirectX or OpenGL one.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  12. #12
    streppel's Avatar Active Member
    Reputation
    78
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by MaiN View Post
    You can hook any game function that is pulsed every frame - doesn't have to be a DirectX or OpenGL one.
    but one of those would be the best as they are called every frame, right?

  13. #13
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There has to be a function in the game that is called every frame. Find it and hook it. Alternatively, you could use an EndScene hook, which is easier. A lot easier.

  14. #14
    streppel's Avatar Active Member
    Reputation
    78
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lanman92 View Post
    There has to be a function in the game that is called every frame. Find it and hook it. Alternatively, you could use an EndScene hook, which is easier. A lot easier.
    like i said,there is no endscene function i could hook. at least i don't find it with CheatEngine being attached and enumerating the dlls and symbols.

    i found a function that is called "d3dkmtrender" and seems to be what i'd want.

    EDIT:
    ok,it works SOOOOO great, i can't thank you enough for your help aswell as RivalFr who i currently can't rep anymore
    Last edited by streppel; 06-16-2011 at 08:17 AM.

  15. #15
    streppel's Avatar Active Member
    Reputation
    78
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *push*
    sorry for pushing such an old thread
    i'm now trying to let my bot do it's stuff again, i hooked getcursorpos and some game render function(ofc jsut one at a time), still both of the methods don't seem to change anything as my bot crashes after several minutes again.
    all methods i'm using ingame keep it running and work for sure, still it crashes, so i think it would be a race condition/threading issue once again. it would be great if one of you could help me on this one.

    thanks again
    streppel

    EDIT:
    ok,i'm stupid,i changed my hooking method from Hooking->Executing->Unhooking to Hooking at bot start and Unhooking at bot end...works great. thanks anyway
    Last edited by streppel; 11-24-2011 at 02:17 PM.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Guide] 10K - 30K Gold for 10 minutes work (weekly cooldown)!
    By Maccer in forum World of Warcraft Guides
    Replies: 52
    Last Post: 10-16-2013, 05:58 AM
  2. 100g and 6 quests for loremaster for a minute's work
    By kgribbe in forum World of Warcraft Guides
    Replies: 8
    Last Post: 06-11-2009, 07:28 AM
  3. Fishing guide - 100g for 10 minutes work among others
    By gareer in forum World of Warcraft Guides
    Replies: 7
    Last Post: 09-30-2008, 09:37 AM
All times are GMT -5. The time now is 08:15 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search