Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamer crash with sampgdk on windows[Maybe linux too] #13

Closed
TheHoda opened this issue Jul 10, 2014 · 1 comment
Closed

Streamer crash with sampgdk on windows[Maybe linux too] #13

TheHoda opened this issue Jul 10, 2014 · 1 comment

Comments

@TheHoda
Copy link

TheHoda commented Jul 10, 2014

Finally I could find out the main problem with streamer.

I call streamer hooks normally with InvokeNative but when the executing line arrives at streamer code in internal.cpp :

        case STREAMER_OPC:
    { 
        CHECK_PARAMS(2, "Streamer_CallbackHook"); 
        cell *playerid = NULL; 
        amx_GetAddr(amx, params[2], &playerid); //THIS CAUSE THE CRASH
        sampgdk::logprintf("Streamer_CallbackHook4  ppid %d", playerid);
        return static_cast<cell>(core->getCallbacks()->OnPlayerConnect(static_cast<int>(*playerid)));
                        sampgdk::logprintf("Streamer_CallbackHook5");
    }

after amx_GetAddr the playerid is still null so accessing the address that it points too cause crash on next line >> *playerid

Don't know if this is a streamer problem or GDK so I posted it on GDK page too.
Please close it if it's unrelated with streamer code or please shed some light if you know anything!

@TheHoda
Copy link
Author

TheHoda commented Jul 10, 2014

By the way why you don't use static_cast(params[2]) to get player id instead of amx_GetAddr !?
You just used static_cast(params[1]) to get streamer type!

@TheHoda TheHoda closed this as completed Jul 11, 2014
@samp-pinch samp-pinch mentioned this issue Oct 11, 2017
@AbdulOmarCR AbdulOmarCR mentioned this issue Sep 26, 2022
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant