-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Avoid abseil containers with SeqManager compare functions #1369
Conversation
Fixes #1366 ### Details - As demonstrated in temporal PR #1368, standard C++ STD containers do not throw (even in debug mode) when using `Compare` functions in maps/sets that do not honor transitivity, i.e. `comp(a,b) && comp(b,c) -> comp(a,c)`. - So let's not use abseil containers in those cases. ### Bonus tracks - Dupicate CI actions in debug mode. - Make mediasoup Rust building honor `MEDIASOUP_BUILDTYPE` env variable if given. - Fix an amazing bug in `AudioLevelObserver.cpp` which failed to compile because it uses a `absl::btree_multimap` without including the `absl/container/btree_map.h` header (it didn't fail before due to some absl header included by yet anothe included file, etc).
UPDATE: Fixed here: 3b23846 OMG... https://github.com/versatica/mediasoup/actions/runs/8613704210/job/23605569292?pr=1369 I'm reproducing it in local:
console.info
console.error
console.error
|
UPDATE: Fixed here: 3b23846 Ok, here the coredump:
It is in WebRtcServer::~WebRtcServer()
{
MS_TRACE();
MS_DUMP_STD("------ 1");
this->shared->channelMessageRegistrator->UnregisterHandler(this->id);
MS_DUMP_STD("------ 2");
for (auto& item : this->udpSocketOrTcpServers)
{
delete item.udpSocket;
item.udpSocket = nullptr;
delete item.tcpServer;
item.tcpServer = nullptr;
}
this->udpSocketOrTcpServers.clear();
MS_DUMP_STD("------ 3");
for (auto* webRtcTransport : this->webRtcTransports)
{
MS_DUMP_STD("------ 3.1");
webRtcTransport->ListenServerClosed();
MS_DUMP_STD("------ 3.2");
}
MS_DUMP_STD("------ 4");
this->webRtcTransports.clear();
MS_DUMP_STD("------ 5");
}
|
UPDATE: Fixed here: 3b23846 Ok, I've added more logs and I see what it's happening:
|
I've fixed the bug here: 3b23846 |
Fixes #1366
Details
Compare
functions in maps/sets that do not honor transitivity, i.e.comp(a,b) && comp(b,c) -> comp(a,c)
.Bonus tracks
AudioLevelObserver.cpp
which failed to compile because it uses aabsl::btree_multimap
without including theabsl/container/btree_map.h
header (it didn't fail before due to some absl header included by yet anothe included file, etc).