-
Notifications
You must be signed in to change notification settings - Fork 45
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
invalid memory address or nil pointer dereference on dequeue #22
Comments
Hi, is this something you can recreate at will? That would help. |
I can only get this error, I do not seem able to successfully dequeue. Try dequeue, if nothing in the queue sleep for 0.5 seconds and then try dequeue again. Repeat till you can get something off the queue. And I immediately get that error and the program crashes |
Until we get this figured out, can you use the v2.1 tag? I'm at work today and won't be able to try until later this evening. |
No problem, if it helps debuging I am using go 1.14 but I downgraded to 1.12 and the issue persisted |
@dllz would you mind sharing a snippet of your code? |
Happy to share some, I tried a bunch of other releases and I ran into the issue so I think this is very much a me being stupid.
And then it is being initialized with
|
Quick one without thinking too much: you might want to try using "methods on pointers":
vs.
Also, dque has a nice |
Issue persists with pointers sadly, |
Hi dllz, Nothing jumps out at me right away either. Could you maybe change your comment above to be the contents of a stand-alone go file that can be run to show the problem? Then I can copy it into test.go and run
Whenever I have had to show a problem with the simplest possible problem demonstration program on any code I've written, I find it really helps my understanding of things, as well as helping others help me find the problem. Thanks!
|
Hi Jon. Sorry about that, I have cleaned up the code to hopefully solve your problem.
The calling code:
Webservice caller
root.go
main.go
|
Hey, just started using this library and I have run into an issue dequeuing a queue.
The text was updated successfully, but these errors were encountered: