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

Frequent: SIGSEGV: Illegal storage access. (Attempt to read from nil?) #8

Closed
jfilby opened this issue Jul 4, 2023 · 2 comments
Closed

Comments

@jfilby
Copy link

jfilby commented Jul 4, 2023

My node module is causing Node to die quite often. It is typically (always?) a Nim GC function:

$HOME/.choosenim/toolchains/nim-1.6.14/lib/system/gc.nim(486) newObj
$HOME/.choosenim/toolchains/nim-1.6.14/lib/system/gc_common.nim(422) prepareDealloc

I'm not sure if a different GC would help, I think Denim uses the default? I usually specify the ORC GC when compiling the code I'm using for the node addon. I think it might help if Denim had an option to pass in extra args to the Nim compiler called by the Denim build command.

@georgelemon
Copy link
Member

georgelemon commented Jul 4, 2023

Actually, you can create a .nims file:

when defined napibuild:
  --define:release

useMalloc is added by default in build command. Maybe I should remove that so you can have full control

@jfilby
Copy link
Author

jfilby commented Jul 4, 2023

I'm a bit late to use .nims files, but this worked perfectly. I set the GC to ORC. So far no sign of the error, and I've tested quite thoroughly. I think useMalloc should indeed be optional (not added by default).

@jfilby jfilby closed this as completed Jul 4, 2023
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

2 participants