You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to make my Video to ascii program multithreaded, by adding this queue i created a bug that i just cant fix and i figured out what is causing it just now.
Whenever i have a queue as a member variable in my class an error occurs, and if i comment the member variable declaration out it doesnt happen anymore.
Also you can criticize my code overall if you want, im learning
If simply adding the unused queue member to your class causes this bug, as seen in the video, then there's almost certainly undefined behaviour elsewhere in your program, unrelated to the queue itself, that just happens to present itself when the memory layout changes due to the inclusion of the queue.
Activity
cameron314 commentedon Sep 9, 2022
If simply adding the unused queue member to your class causes this bug, as seen in the video, then there's almost certainly undefined behaviour elsewhere in your program, unrelated to the queue itself, that just happens to present itself when the memory layout changes due to the inclusion of the queue.
benjibst commentedon Sep 9, 2022
Thanks for the answer, i will try to fix it.
My temporary fix was to just store the queue somewhere else but thats not a really good solution