-
Notifications
You must be signed in to change notification settings - Fork 1
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
ThreadSanitizer reports a data race on startup #10
Comments
From the trace it seems like it is something SDL related. It makes sense because we don't use the thread library in the |
Yeah, in |
I think the sound still works fine in the game. I will test it again when I have the chance and will inform you. |
Confirmed: Sound works. |
Is this issue still present at the current commit? |
Yes, this issue is actually a race condition inside the SDL library - or perhaps in the PulseAudio library that it uses: It was just recently reported to the SDL maintainers but they've already set a target milestone on it and hope to fix it in SDL v2.28.0. I'll keep this ticket open so that I don't forget about it in the future and open a new ticket just like this one :-) |
So we can't do anything about this. Bottom line is that we upgrade to SDL 2.28.0 once it becomes available. Should we close this issue or should we keep it open in order to remember to keep an eye out for when it gets fixed? |
I'd prefer to keep it open because my memory is so bad that I'll likely open a new ticket about this in a week if I don't see this one :-D |
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've removed the asset and map loading threads to get rid of those races. I've replaced the remaining date-ticker-thread with a `std::jthread` which can be used to start a thread in a member function (unlike SDL_CreateThread). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've replaced the threads with `std::jthread`s which can be used to start a thread in a member function (unlike `SDL_CreateThread`). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've removed the asset and map loading threads to get rid of those races. I've replaced the remaining date-ticker-thread with a `std::jthread` which can be used to start a thread in a member function (unlike SDL_CreateThread). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've replaced the threads with `std::jthread`s which can be used to start a thread in a member function (unlike `SDL_CreateThread`). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've replaced the threads with `std::jthread`s which can be used to start a thread in a member function (unlike `SDL_CreateThread`). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've replaced the threads with `std::jthread`s which can be used to start a thread in a member function (unlike `SDL_CreateThread`). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've replaced the threads with `std::jthread`s which can be used to start a thread in a member function (unlike `SDL_CreateThread`). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've replaced the threads with `std::jthread`s which can be used to start a thread in a member function (unlike `SDL_CreateThread`). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've replaced the threads with `std::jthread`s which can be used to start a thread in a member function (unlike `SDL_CreateThread`). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've replaced the threads with `std::jthread`s which can be used to start a thread in a member function (unlike `SDL_CreateThread`). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've replaced the threads with `std::jthread`s which can be used to start a thread in a member function (unlike `SDL_CreateThread`). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've replaced the threads with `std::jthread`s which can be used to start a thread in a member function (unlike `SDL_CreateThread`). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've replaced the threads with `std::jthread`s which can be used to start a thread in a member function (unlike `SDL_CreateThread`). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
There are currently three extra threads started by the application. None do synchronization between the threads so there are race conditions. I've replaced the threads with `std::jthread`s which can be used to start a thread in a member function (unlike `SDL_CreateThread`). `bIsPaused` is made into a `std::atomic<bool>` and moved out of the `Date` struct. No further synchronization work has been done - but it's needed. One positive effect is that the memory leaks are now very small due to the auto-joining feature of the `std::jthread`. For me, 200 bytes are leaked which is likely unavoidable due to SDL internals. Perhaps PanosPetras#1 can be closed. Note: This has no impact on PanosPetras#10 Signed-off-by: Ted Lyngmo <ted@lyncon.se>
The text was updated successfully, but these errors were encountered: