-
Notifications
You must be signed in to change notification settings - Fork 30
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
DoublePriorityQueue panicked at 'called Option::unwrap()
on a None
value'
#34
Comments
To clarify: I was using the priority queue differently beforehand, inserting all graph nodes which means about 50 million for my largest dataset. However, this new method keeps the number of current nodes commonly below 100, which either way didn't solve the issue described. |
Hi @kleinesfilmroellchen, sorry for the delay, but I have been very busy and I could not respond to this issue as promptly as I wanted. |
That's hard to do, as the bug usually occurs after several thousand operations on the queue. However, through some debugging I found the following:
Hope this helps. I have to switch to standard library BinaryHeap because deadline, but thanks for investigating this. |
Thank you for your report. Could you post at least the full log? It would be very helpful |
I don't quite understand. What I posted above is the full log, everything else is stuff from my application. I just added a |
@kleinesfilmroellchen I think I fixed the bug and I could not reproduce it anymore. I would be very grateful if you could confirm it. Thank you in advance for your time |
Just verified, yes, it doesn't crash now and the algorithm results are fully correct. Thank you so much, our project will probably switch back to priority_queue! |
I have now convinced myself that this is a bug in the library, as I'm commonly hitting this unwrap() that's inside priority_queue code. My use case is a Dijkstra implementation that uses
to get the next node out of a
DoublePriorityQueue<usize, u32>
. For several of my data sets and queue sizes of >~ 1 million elements, I'm hitting a None unwrap here:I'm too unfamiliar with the library internals to track the cause down. However, this is an example of a queue state that seems to cause it:
Happens on Rust Nightly 2021-10-27 and Rust Stable 1.56.0 x86_64-pc-windows-msvc.
The text was updated successfully, but these errors were encountered: