Results 1 to 15 of 15
  1. #1
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    161
    My Mood
    Aggressive

    [HELP] Runtime Error! (Working Menu)

    So I got my menu finally working.



    It originally has 45 features, but when put all 45 it crashes (I am going to fix that), also need to re-align the title.

    When I closed the D3D9 Test Environment I got his error:



    Does anyone know where originally this comes from, or how to fix it?

    When I tried the hack in Combat Arms, I joined a game, and Combat Arms crashed, you can hear the Error message box pop-up but nothing shows.

    Please help a fellow coder

  2. #2
    Mr.Mageman's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    87
    Reputation
    11
    Thanks
    17
    Are you releasing the font and lines?? if not you shuld...

  3. #3
    whatup777's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    CA Source Code Section
    Posts
    4,030
    Reputation
    147
    Thanks
    351
    My Mood
    Dead
    Yeah thats what I thought.
    Quotes I live by.


    A foolish person learns from his mistakes, I wise person learns from others.
    Quote Originally Posted by AVGN View Post



    mhm

    i live in texas

    i was at the grocery store with my son. He saw a mexican guy, and he said "Look daddy! a mower man!"

    he's 4 yrs old

  4. #4
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    161
    My Mood
    Aggressive
    I release the Font once, in the PostReset:

    Code:
    			if (pFont != NULL){
    				pFont->Release();
    			}

  5. #5
    CodeDemon's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    vagina
    Posts
    1,074
    Reputation
    50
    Thanks
    936
    My Mood
    Fine
    C Run-Time Error R6031

    As Magicman and Whatup said make sure you are releasing your font.

  6. #6
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,035
    Reputation
    340
    Thanks
    2,784
    My Mood
    Sad
    Don't use that test environment. The test environment itself does not close properly (check it yourself by just opening and closing the application).

    Use another, or make your own

  7. #7
    Mr.Mageman's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    87
    Reputation
    11
    Thanks
    17
    Quote Originally Posted by -Dimensions- View Post
    I release the Font once, in the PostReset:

    Code:
    			if (pFont != NULL){
    				pFont->Release();
    			}
    you shuld release them when the process closes as folowing:

    Code:
    BOOL APIENTRY DllMain( HMODULE hModule,
                           DWORD  ul_reason_for_call,
                           LPVOID lpReserved
                         )
    {
        switch (ul_reason_for_call)
        {
        case DLL_PROCESS_ATTACH:
        //Create your threads here to startup routines
        break;
        case DLL_THREAD_ATTACH:
        case DLL_THREAD_DETACH:
        case DLL_PROCESS_DETACH:
        pLine->Release();
        pFont->Release();
            break;
        }
        return TRUE;
    }

  8. The Following User Says Thank You to Mr.Mageman For This Useful Post:

    -Dimensions- (08-27-2010)

  9. #8
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    161
    My Mood
    Aggressive
    Quote Originally Posted by Mr.Mageman View Post


    you shuld release them when the process closes as folowing:

    Code:
    BOOL APIENTRY DllMain( HMODULE hModule,
                           DWORD  ul_reason_for_call,
                           LPVOID lpReserved
                         )
    {
        switch (ul_reason_for_call)
        {
        case DLL_PROCESS_ATTACH:
        //Create your threads here to startup routines
        break;
        case DLL_THREAD_ATTACH:
        case DLL_THREAD_DETACH:
        case DLL_PROCESS_DETACH:
        pLine->Release();
        pFont->Release();
            break;
        }
        return TRUE;
    }
    Thanks for the reply, but when I tried to use your code, the Test Environment didn't open. Then I tried this:

    Code:
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    	DisableThreadLibraryCalls(hDll);
    	if (dwReason == DLL_PROCESS_ATTACH)
    	{
    		CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3D_Hook, NULL, NULL, NULL);
    		pFont->Release();
    	}
    
    	return TRUE;
    }
    and test9.exe stopped responding.

    Any more solutions?

    Edit: Thanks for the reply though.

    Another Edit:

    I tried:

    Code:
    	switch (dwReason)
    	{    
    		case DLL_PROCESS_ATTACH:
    		CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3D_Hook, NULL, NULL, NULL);
    		break;
    		case DLL_THREAD_ATTACH:
    		case DLL_THREAD_DETACH:
    		case DLL_PROCESS_DETACH:
    		pFont->Release();
    		break;
        }
    and still got the same error.

    More help please
    Last edited by -Dimensions-; 08-27-2010 at 10:11 AM.

  10. #9
    Mr.Mageman's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    87
    Reputation
    11
    Thanks
    17
    Quote Originally Posted by -Dimensions- View Post
    Thanks for the reply, but when I tried to use your code, the Test Environment didn't open. Then I tried this:

    Code:
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    	DisableThreadLibraryCalls(hDll);
    	if (dwReason == DLL_PROCESS_ATTACH)
    	{
    		CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3D_Hook, NULL, NULL, NULL);
    		pFont->Release();
    	}
    
    	return TRUE;
    }
    and test9.exe stopped responding.

    Any more solutions?

    Edit: Thanks for the reply though.
    Why the fuck are you releasing the font at startup??

    do like this instead:

    Code:
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    	DisableThreadLibraryCalls(hDll);
    
    	if (dwReason == DLL_PROCESS_ATTACH)
    	{
    		CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)D3D_Hook, NULL, NULL, NULL);
    	}
            
    	if (dwReason == DLL_PROCESS_DEATTACH)
    	{
    		pFont->Release();
                    pLine->Release();
    	}
    
    	return TRUE;
    }

  11. #10
    Stephen's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Location
    Engine.exe
    Posts
    4,690
    Reputation
    184
    Thanks
    1,147
    My Mood
    Aggressive
    Use the Release folder not the Debug

  12. #11
    -Dimensions-'s Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    243
    Reputation
    2
    Thanks
    161
    My Mood
    Aggressive
    Quote Originally Posted by Stephen View Post
    Use the Release folder not the Debug
    Umm... I know that...

    Quote Originally Posted by Mr.Mageman View Post


    Why the fuck are you releasing the font at startup??

    do like this instead:

    Code:
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    	DisableThreadLibraryCalls(hDll);
    
    	if (dwReason == DLL_PROCESS_ATTACH)
    	{
    		CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)D3D_Hook, NULL, NULL, NULL);
    	}
            
    	if (dwReason == DLL_PROCESS_DEATTACH)
    	{
    		pFont->Release();
                    pLine->Release();
    	}
    
    	return TRUE;
    }

    Code:
    1>.\Base.cpp(579) : error C2065: 'DLL_PROCESS_DEATTACH' : undeclared identifier
    1>.\Base.cpp(582) : error C2065: 'pLine' : undeclared identifier
    1>.\Base.cpp(582) : error C2227: left of '->Release' must point to class/struct/union/generic type
    1>        type is ''unknown-type''
    No Such thing as PROCESS_DEATTACH.

    More help please!

  13. #12
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    My Mood
    Sleepy
    Quote Originally Posted by -Dimensions- View Post
    Umm... I know that...




    Code:
    1>.\Base.cpp(579) : error C2065: 'DLL_PROCESS_DEATTACH' : undeclared identifier
    1>.\Base.cpp(582) : error C2065: 'pLine' : undeclared identifier
    1>.\Base.cpp(582) : error C2227: left of '->Release' must point to class/struct/union/generic type
    1>        type is ''unknown-type''
    No Such thing as PROCESS_DEATTACH.

    More help please!
    pLine = ID3DXLine = You don't have it
    DLL_RPOCESS_DEATTACH = DLL_PROCESS_DETACH

    kthxbai.

  14. #13
    GameTrainerMaker's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    465
    Reputation
    17
    Thanks
    514
    2 second google search if you still need a fix

    Need fix for Microsoft Visual C++ Runtime Library Runtime Error

  15. #14
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    My Mood
    Sleepy
    Quote Originally Posted by GameTrainerMaker View Post
    2 second google search if you still need a fix

    Need fix for Microsoft Visual C++ Runtime Library Runtime Error
    Nice 6 day bump

  16. #15
    GameTrainerMaker's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    465
    Reputation
    17
    Thanks
    514
    yea i saw it in his sig that he needed help, lol!! and after i posted i seen the last post haha

Similar Threads

  1. [Help Request] runtime error. plz help me '-'
    By qqhhqqli in forum Vindictus Help
    Replies: 6
    Last Post: 05-17-2011, 12:01 AM
  2. [Help] working long knife, need help bypassing error
    By tdct in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 3
    Last Post: 01-01-2011, 09:41 PM
  3. Help with some c++ runtime errors
    By hobosrock696 in forum C++/C Programming
    Replies: 8
    Last Post: 09-10-2010, 02:55 PM
  4. Help 1 Error on this menu Pub : C++ :
    By ultahackers in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 8
    Last Post: 08-25-2010, 04:33 PM
  5. Runtime ERROR help.
    By warrick983 in forum Combat Arms Hacks & Cheats
    Replies: 10
    Last Post: 10-07-2008, 09:17 PM