Segmentation fault
Hello. Maybe someone has encountered this problem and knows how to fix it. The server crashes with the error "Segmentation fault" often, rarely, in absolutely different cases. It is displayed directly in the console of the NodeJS part.
I have a frequent and not a little data exchange between PAWN and NodeJS, at some point, an error can pop up, and can work without incident for several days.
I already wanted to try to watch everything through the package - "segfault-handler", but at startup I get an error - "wrong ELF class: ELFCLASS64".
Installed plugins:
crashdetect.so samp-node.so FCNPC.so sscanf.so filemanager.so streamer.so mysql_static.so gvar.so env.so
Packages used:
"devDependencies": {
"@types/node": "^16.18.41",
"sequelize-cli": "^6.6.1",
"typescript": "^4.5.4"
},
"dependencies": {
"@sa-mp/node": "^0.2.0",
"dotenv": "^16.3.1",
"iconv-lite": "^0.6.3",
"mysql2": "^3.6.0",
"reflect-metadata": "^0.1.13",
"segfault-handler": "^1.3.0",
"sequelize": "^6.32.1",
"sequelize-typescript": "^2.1.5",
"telegraf": "^4.12.2",
"tsyringe": "^4.8.0"
}
A stupid solution is for you to start another node project, such as nest.js, to do the interaction between api and the database, and to call the api interface of another node project for the samp-node server, such as through http ajax.
@Revalto this is a problem that occurs when you are running 32bit systems and trying to access 64bit programs, or a 32bit program trying to load a 64bit library.
it's possible one of npm packages depends on a 64bit library, figure out which one and maybe you can find a 32bit version or find a workaround.
@Revalto this is a problem that occurs when you are running 32bit systems and trying to access 64bit programs, or a 32bit program trying to load a 64bit library.
it's possible one of npm packages depends on a 64bit library, figure out which one and maybe you can find a 32bit version or find a workaround.
A quick search suggests you can get npm to install 32bit versions of packages: https://stackoverflow.com/a/62022819
npm by default will download the precompiled versions of modules for your system which is likely 64bit while SAMP is 32bit and as a result samp-node is.