i see SIGSEGV on calls to queue.isEmpty. The queue is initialized using newLoonyQueue. It has not received any items yet. I tried if- and while - makes no difference. I tried std/atomics and threading/atomics. It feels a bit like a timing/init-problem. Though i never managed to make it work reliably. Goes like this - the whole app runs thru and finishes. Then on the next run it breaks early. On the following start i might run and finish or break in-between.
I use the main-thread to fill the queue and one separate thread to read and process the items from the queue ? A queue-items contains a seq[int], int, string, so nothing special here.
nim r -d:b32 --gc:arc --threads:on -d:useMalloc -d:debug -d:nimOldCaseObjects Mapi.nim
/Users/asc/sw/nim/ctrie/champ/Mapi.nim(30) warden
/Users/asc/.nimble/pkgs/loony-0.1.12/loony.nim(68) isEmpty
/Users/asc/.choosenim/toolchains/nim-1.6.6/lib/pure/concurrency/atomics.nim(336) load
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Error: execution of an external program failed: '/Users/asc/.cache/nim/Mapi_d/Mapi_558E24AF8FBA3F576C55E835091AA4F6A61AFFB3 '
If you can provide a complete example, I don't mind taking a look. Have you tried running it in a debugger to see what's happening? I don't have mainline nim 1.6.6; do you have 1.6.5, by any chance?
Hi,
i see SIGSEGV on calls to
queue.isEmpty
. The queue is initialized usingnewLoonyQueue
. It has not received any items yet. I triedif
- andwhile
- makes no difference. I triedstd/atomics
andthreading/atomics
. It feels a bit like a timing/init-problem. Though i never managed to make it work reliably. Goes like this - the whole app runs thru and finishes. Then on the next run it breaks early. On the following start i might run and finish or break in-between. I use the main-thread to fill the queue and one separate thread to read and process the items from the queue ? A queue-items contains aseq[int], int, string
, so nothing special here.Im on Nim 1.6.6 / macOS
this is my thread-proc ::
Traceback for :
nim r -d:b32 --gc:arc --threads:on -d:useMalloc -d:debug -d:nimOldCaseObjects Mapi.nim