Skip to content

[TF2/ALL] Temporary workaround for debug build of libprotobuf corrupting data (on MSVC). #1303

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zxz41
Copy link

@zxz41 zxz41 commented May 22, 2025

Description

Currently there's an issue with the debug build of libprotobuf.lib, causing inventory data to become corrupt when converted from an API response (TF2 inventory.)

As a temporary solution until a compatible debug build of libprotobuf.lib is created. This will link against the release build of libprotobuf.lib.

However to be able to link objects together, we unfortunately have to allow iterator debug level mismatch and set the iterator debug level to 0 for all projects.

This should be only applying to projects built on the Source SDK.
This have not been tested on Linux/OSX. (But shouldn't break anything there.)
I've tested it both compiling game and gamedlls

For a more in-depth explanation see #663 (comment)

There's an issue with the debug build of protobuf not playing nice (likely only happening with MSVC). We have to rely on using the release build, but the iterator debug level is in the way. So we have to go about and satisfying it's conditions.
@zxz41
Copy link
Author

zxz41 commented May 22, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant