Open-SAMP-API icon indicating copy to clipboard operation
Open-SAMP-API copied to clipboard

crash when using api

Open 0xFFFFFFFFFFFFFFFFFF opened this issue 7 years ago • 3 comments

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;
}

0xFFFFFFFFFFFFFFFFFF avatar Jul 20 '17 12:07 0xFFFFFFFFFFFFFFFFFF

Is just SendChat crashing?

ghost avatar Jul 22 '17 10:07 ghost

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

0xFFFFFFFFFFFFFFFFFF avatar Jul 22 '17 10:07 0xFFFFFFFFFFFFFFFFFF

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.)

ghost avatar Jul 22 '17 10:07 ghost