s_CurMgr fall down, go <poof> menu

Shout-Out

User Tag List

Results 1 to 9 of 9
  1. #1
    Sillyboy72's Avatar Member
    Reputation
    13
    Join Date
    Jan 2009
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    s_CurMgr fall down, go <poof>

    So... let's just ignore that fact that I don't just steal wow's ObjectFromGuid hotness...

    Here is mine:
    Code:
    WowObject *WowObjectFromGuid(ULONGLONG Guid)
    {
    	WowObject *pCurrent = *(WowObject**) (Mgr + 0xAC);	
    	
    	while ( pCurrent && ((DWORD)pCurrent & 1) == 0 )
    	{
    		if (pCurrent->guid == Guid)
    		{
    			return pCurrent;
    		}
    
    		pCurrent = pCurrent->Next;
    	}
    
    	return NULL;
    }
    But here's the thing... while I call this a zillion million jillion times, just fine... every once in awhile it goes coo-coo for coco puffs.

    btw, I call this via hooked EndScene. Looking at other running threads, I certainly do see anything that should be stomping my guts.

    Yet, what I call "Mgr" sometimes points to la-la land.

    Static address 0x11CA310 points to s_CurMgr.

    Consulting windbg during a crash...
    0:000> dd 0x11CA310 L1
    011ca310 0ae7a578

    0:000> dd 0ae7a578+0x28A4 L1
    0ae7ce1c 00000000

    Uhhh... wha? Tis null? wtf?

    This was literally while flying around in the game.

    Theories?

    s_CurMgr fall down, go &lt;poof&gt;
  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)
    Null pointer checks are out of the question or something?

  3. #3
    kynox's Avatar Member
    Reputation
    830
    Join Date
    Dec 2006
    Posts
    888
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Static address 0x11CA310 points to s_CurMgr.

    Consulting windbg during a crash...
    0:000> dd 0x11CA310 L1
    011ca310 0ae7a578

    0:000> dd 0ae7a578+0x28A4 L1
    0ae7ce1c 00000000


    points to s_curConnection*.

    Obviously something major is happening if the structure is being recreated. Possibly zoning/changing battlegrounds?

  4. #4
    Sillyboy72's Avatar Member
    Reputation
    13
    Join Date
    Jan 2009
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    Null pointer checks are out of the question or something?
    There is only a pointer to check for null, if you are attempting to grab the current manager ... over and over. I was holding onto it, assuming it was stayin' valid for the entire session. Apparently a bad assumption, which ... I find weird.

    Code:
    BYTE *GetMgr()
    {
    	BYTE **ppClientConnection = (BYTE**) 0x11CA310;
    	BYTE *pClientConnection = *ppClientConnection;
    	BYTE **ppMgr = (BYTE**) &pClientConnection[0x28A4];
    	return *ppMgr;
    }
    Apparently I would be better off holding (what I was calling) ppMgr instead, and checking for null before a deref.

    Curious if others have seen similiar. I see others use s_CurMgr, implying they only grab it once as well...

    Hrm, might be time to review some code and seeing if I am overflowing a buffer, cuz I am crazy skeptical this pointer suddenly goes to null...

  5. #5
    kynox's Avatar Member
    Reputation
    830
    Join Date
    Dec 2006
    Posts
    888
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ugly:
    Code:
    BYTE *GetMgr()
    {
        BYTE **ppClientConnection = (BYTE**) 0x11CA310;
        BYTE *pClientConnection = *ppClientConnection;
        BYTE **ppMgr = (BYTE**) &pClientConnection[0x28A4];
        return *ppMgr;
    }
    Clean:
    Code:
    DWORD* dwGetMgr()
    {
        DWORD dwClientConnection = *(DWORD*)0x11CA310;
        if ( pClientConnection )
            return *(DWORD*)( dwClientConnection + 0x0x28A4 );
        return NULL;
    }

  6. #6
    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)
    Originally Posted by kynox View Post
    Ugly:
    Code:
    BYTE *GetMgr()
    {
        BYTE **ppClientConnection = (BYTE**) 0x11CA310;
        BYTE *pClientConnection = *ppClientConnection;
        BYTE **ppMgr = (BYTE**) &pClientConnection[0x28A4];
        return *ppMgr;
    }
    Clean:
    Code:
    DWORD* dwGetMgr()
    {
        DWORD dwClientConnection = *(DWORD*)0x11CA310;
        if ( pClientConnection )
            return *(DWORD*)( dwClientConnection + 0x0x28A4 );
        return NULL;
    }

    You fail. Did you even read that "clean" code before you posted it? >_>

  7. #7
    Sillyboy72's Avatar Member
    Reputation
    13
    Join Date
    Jan 2009
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kynox View Post
    Ugly:

    LOL. No doubt. Isn't that shweet?

    I think I know what's going on here. I think I am getting DC'd... as a result of jamming results from a atan2() call directly into my "facing". I need to wow-ize my angle (0 to 2pi) since atan2 returns -pi to pi.

    So, client connection goes bye-bye when I DC, and I crash. While I could watch for the null, seems even more useful to avoid the DC

    Still, your clean codez is heading to the pasta factory :wave:

    edit: LOL, man in green 1, kynox 0. I really thought there were only 2 issues with the code. More like 4
    Last edited by Sillyboy72; 02-05-2009 at 10:27 AM.

  8. #8
    kynox's Avatar Member
    Reputation
    830
    Join Date
    Dec 2006
    Posts
    888
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Sillyboy72 View Post

    LOL. No doubt. Isn't that shweet?

    I think I know what's going on here. I think I am getting DC'd... as a result of jamming results from a atan2() call directly into my "facing". I need to wow-ize my angle (0 to 2pi) since atan2 returns -pi to pi.

    So, client connection goes bye-bye when I DC, and I crash. While I could watch for the null, seems even more useful to avoid the DC

    Still, your clean codez is heading to the pasta factory :wave:

    edit: LOL, man in green 1, kynox 0. I really thought there were only 2 issues with the code. More like 4
    Thats what i get for writing code in a small forum box after 2 hours of wiping to 3 drakes and extremely tired.

  9. #9
    Cursed's Avatar Contributor
    Reputation
    270
    Join Date
    Jun 2007
    Posts
    1,380
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kynox View Post
    Thats what i get for writing code in a small forum box after 2 hours of wiping to 3 drakes and extremely tired.
    Dont be sad kynox Take this +Rep for all the contributions you have done

    Edit: I hate to tell you, I have to spread first-.- But you can remind me!

Similar Threads

  1. Npc in the air, falling down on the ground
    By zimonken in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 03-07-2009, 03:18 PM
  2. I'm falling down from high objects ( ex : Obstacle course )
    By massanaconda in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 02-09-2009, 02:01 PM
  3. [Rogues] Falling down from Booty Bay/Ratchet docks? NP!
    By Willy in forum World of Warcraft Exploits
    Replies: 9
    Last Post: 03-10-2008, 12:02 PM
  4. [Cool] Fall down with STYLE! :D
    By -Lex in forum World of Warcraft Model Editing
    Replies: 27
    Last Post: 02-20-2008, 09:50 AM
All times are GMT -5. The time now is 08:17 AM. 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