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

crash when using api #39

Open
0xFFFFFFFFFFFFFFFFFF opened this issue Jul 20, 2017 · 3 comments
Open

crash when using api #39

0xFFFFFFFFFFFFFFFFFF opened this issue Jul 20, 2017 · 3 comments

Comments

@0xFFFFFFFFFFFFFFFFFF
Copy link

0xFFFFFFFFFFFFFFFFFF commented Jul 20, 2017

My game does crash instantly as soon as I make a simple API call. SAMP does catch the exception at 0x02170245. My game is not modded, I am running everything through WINE, tho. I am compiling on a Windows 7 virtual machine in order to run it on my host with WINE.

#pragma comment(lib, "bin/Open-SAMP-API.lib")

#include "SAMP_API.h"
#include <iostream>

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

int main()
{
	std::cout << "started" << std::endl;
	SendChat("test");
	return 0;
}
@ghost
Copy link

ghost commented Jul 22, 2017

Is just SendChat crashing?

@0xFFFFFFFFFFFFFFFFFF
Copy link
Author

Just tried GetPlayerHealth, it does crash also. Seems like no API-call is working.

@ghost
Copy link

ghost commented Jul 22, 2017

I think then it's crashing because of WINE, maybe Wine "simulate" the Windows memory not completely and something went wrong somewhere. You just can try to debug it by yourself (e.g. what's at 0x02170245, it is inside the memory range of the API, etc.)

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