Skip to content

CreateItem returns bit-shifted PublishedFileId #678

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
Zarkonnen opened this issue Feb 19, 2025 · 2 comments
Open

CreateItem returns bit-shifted PublishedFileId #678

Zarkonnen opened this issue Feb 19, 2025 · 2 comments

Comments

@Zarkonnen
Copy link

Zarkonnen commented Feb 19, 2025

I've encountered this issue running Steamworks.NET on Windows. It doesn't occur on Linux.

Reproduce

  • Call SteamUGC.CreateItem
  • Look at the resulting CreateItemResult_t

Expected

  • m_eResult is k_EResultOK
  • m_nPublishedFileId is the ID of the created item, eg 3430242989 for a test run I did.
  • The workshop item is created at ID 3430242989

Observed

  • m_eResult is k_EResultOK
  • m_nPublishedFileId is a different number, eg 14732781458309514128 for the same test run.
  • The workshop item is created at ID 3430242989

Upon closer inspection, (14732781458309514128 >> 32) == 3430242989.

Byte-by-byte, least significant byte first:

Expected:
173 90 117 204 0 0 0 0

Observed:
144 3 0 192 173 90 117 204

So the returned value is the expected value but shifted 32 bits to the left and with additional information inserted in the four lower bytes.

Using the observed file ID to then call SubmitItemUpdate causes a k_EResultFileNotFound error, whereas using the expected bit shifted ID works correctly.

This is on Release 2024.8.0.

@yaakov-h
Copy link

struct layout or padding problem, perhaps?

@Zarkonnen
Copy link
Author

struct layout or padding problem, perhaps?

Looks like it, yes. I'm using the DLLs shipped with 2024.8.0, so I don't know why it's not aligned.

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

No branches or pull requests

2 participants