ba0f3 / dnsclient.nim

Simple DNS Client & Library in pure Nim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

jots opened this issue · comments

commented

Thank you for creating this!

I'm trying to use it like:

# after nimble install https://github.com/ba0f3/dnsclient.nim
import dnsclient
let client = newDNSClient()
client.sendQuery("google.com") # cannot specify MX: Error: undeclared identifier: 'MX'

running it I get:

 ./getdns
Traceback (most recent call last)
getdns.nim(6)            getdns
dnsclient.nim(47)        sendQuery
streams.nim(86)          setPosition
SIGSEGV: Illegal storage access. (Attempt to read from nil?)

however if I run you dnsclient it works fine. any ideas?

Are you using devel version of Nim?

commented
nim --version
Nim Compiler Version 0.18.0 [Linux: amd64]

I think your code is good because if I just run your dnsclient it works fine. it's only when i try to use it as a library. pretty sure I'm doing something wrong.

First of all, I forgot to export definations from private/protocol. Second, this lib is stil in WIP, it does not support 'authority' section yet.

i will try to finish it as soon as I have spare time

commented

thank you.

I just made some progress, just give it try :)