Closed Raptor007 closed 2 months ago
This seems to be a problem with sv threads
on those platforms, so I've disabled that feature on the dedicated server for now.
Strangely even with sv threads 6
the problem does not appear on Windows.
Okay, it gets stranger: The problem occurs on Mac OS X with or without sv threads
, on Linux only with sv threads
, and never on Windows.
Current best guess is that my ModelArrays copy constructor and/or destructor are not behaving as expected if std::vector< std::pair< ModelArrays, std::string > >
has to internally resize its storage when adding new pairs. This would explain why it behaves so inconsistently across platforms.
Replacing with std::pair< ModelArrays*, std::string >
using new/delete seems to have solved the problem without impairing performance. Just need to make this hasn't introduced any memory leaks.
One minor leak found and fixed: ModelArrays::Resize was not setting Allocated upon first resizing from 0. (It was expecting BecomeCopy to do it, but that doesn't happen if there are no arrays allocated yet.) Zero leaks detected after fixing this.
This bug fix is now live on the dedicated server.
Found and fixed some additional issues that effected all platforms, such as picking too small of a block size when detecting collisions between two fast-moving starfighters.
Sometimes flying near a capital ship without actually touching it causes a fighter to explode, including player ships.
For some reason, this does not seem to effect games hosted by the Windows version.
The dedicated server is Linux, so this currently effects "Fly Online" games. Keep your distance (but don't look like you're keeping your distance).