allwpilib icon indicating copy to clipboard operation
allwpilib copied to clipboard

NetworkTables server crashes when publishers are rapidly created and closed

Open brettle opened this issue 2 months ago • 6 comments

I'm seeing fairly repeatable crashes that have ServerImpl.cpp:1859 in the stack trace when running code that is rapidly creating and removing (ie. closing) publishers. Here is the immediately preceding code:

https://github.com/wpilibsuite/allwpilib/blob/3d6b710293d1e78f2d43834068cf610f53440f0f/ntcore/src/main/native/cpp/net/ServerImpl.cpp#L1852-L1860

My theory is that another thread is removing one or more publishers after count is computed and as a result the mpack array is undersized. Is there something in place that is supposed to prevent that from occurring?

brettle avatar Jun 12 '24 02:06 brettle