Skip to content

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

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

Open
mrichman opened this issue Jul 29, 2024 · 1 comment
Open

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

mrichman opened this issue Jul 29, 2024 · 1 comment

Comments

@mrichman
Copy link

Trivial example:

example.nim:

import htmlgen
import jester

routes:
  get "/":
    resp h1("Hello world")

example.nimble:

requires "jester >= 0.6.0"
requires "httpbeast >= 0.4.1"

Output:

nim c -r example.nim
Hint: used config file '/usr/local/Cellar/nim/2.0.8/nim/config/nim.cfg' [Conf]
Hint: used config file '/usr/local/Cellar/nim/2.0.8/nim/config/config.nims' [Conf]
...............................................................................................................................................................................
/Users/mrkrchm/.nimble/pkgs2/jester-0.6.0-4834f85e61ae39f6b6acfb74d3bbba62d8779b66/jester.nim(1345, 9) Hint: Asynchronous route: match. [User]
Hint:  [Link]
ld: warning: ignoring duplicate libraries: '-lm'
Hint: mm: orc; threads: on; opt: none (DEBUG BUILD, `-d:release` generates faster code)
83324 lines; 2.729s; 167.797MiB peakmem; proj: /Users/mrkrchm/Projects/Nim/jester/example.nim; out: /Users/mrkrchm/Projects/Nim/jester/example [SuccessX]
Hint: /Users/mrkrchm/Projects/Nim/jester/example [Exec]
INFO Jester is making jokes at http://0.0.0.0:5000
Starting 8 threads
Listening on port 5000
Traceback (most recent call last)
/Users/mrkrchm/.nimble/pkgs2/httpbeast-0.4.1-b23e57a401057dcb9b7fae1fb8279a6a2ce1d0b8/httpbeast.nim(83) eventLoop
/usr/local/Cellar/nim/2.0.8/nim/lib/system/orc.nim(46) nimIncRefCyclic
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Error: execution of an external program failed: '/Users/mrkrchm/Projects/Nim/jester/example'
@ThomasTJdev
Copy link
Contributor

You might want to have a look at this Jester fork. @dom96 is not updateing Jester and Httpbeast, so they don't support Nim v2.0 even though there are open PR's to do it: dom96/httpbeast#91

I would suggest that you switch to Mummy which is multithreaded webserver, and then use Mummy utils to mimic some of Jester's nice sugar for routes 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

2 participants