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

Segmentation fault #29

Open
Revalto opened this issue Nov 4, 2023 · 3 comments
Open

Segmentation fault #29

Revalto opened this issue Nov 4, 2023 · 3 comments

Comments

@Revalto
Copy link

Revalto commented Nov 4, 2023

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"
  }
@dockfries
Copy link

dockfries commented Jan 22, 2024

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.

@ADRFranklin
Copy link
Collaborator

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

@tmfksoft
Copy link

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

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

4 participants