Skip to content
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

.pdb rename error for rust godot crate in version 4.3 #102206

Open
Per6 opened this issue Jan 30, 2025 · 2 comments
Open

.pdb rename error for rust godot crate in version 4.3 #102206

Per6 opened this issue Jan 30, 2025 · 2 comments

Comments

@Per6
Copy link

Per6 commented Jan 30, 2025

Tested versions

this bug appeared when upgradig from 4.2.2 to 4.3

System information

Windows 10 Godot 4.3.stable rust 1.84.0 rust_crate:"godot" 0.2.2

Issue description

The original PDB path size in bytes is too small: 'rust_ext.pdb'. Expected size: 13 or more bytes, but available 12. platform/windows/os_windows.cpp:410 - Failed to rename the PDB file. The original PDB file for 'C:\Users\BlueSheep3\Desktop\Coding\Godot Games\paradox-puzzles\rust\target\debug/~rust_ext.dll' will be loaded.
This error appears each time when compiling

Steps to reproduce

this only happens on my brothers pc and does not on mine, so no clue how to reproduce, i downloaded the exact project using github.

when making the pathname to 13 or more it sais this instead of the error: platform/windows/windows_utils.cpp:182 - The original path size of 'rust_ext_hi.pdb' in bytes was too small to fit the new name, so it was shortened to '~rust_e_999.pdb'.

or for 13 characters: platform/windows/windows_utils.cpp:182 - The original path size of 'rust_ext2.pdb' in bytes was too small to fit the new name, so it was shortened to '~rust_999.pdb'.

This happens for my brother and doesnt happen for me on version 4.3 using rust_ext on windows. we have the same laptop model

Minimal reproduction project (MRP)

no reproducability possible but might be related to: 87117

@Per6 Per6 changed the title 4.3 on load error .pdb rename warning for rust godot crate in version 4.3 Jan 30, 2025
@Per6 Per6 changed the title .pdb rename warning for rust godot crate in version 4.3 .pdb rename error for rust godot crate in version 4.3 Jan 30, 2025
@akien-mga
Copy link
Member

CC @DmitriySalnikov @dsnopek

@DmitriySalnikov
Copy link
Contributor

DmitriySalnikov commented Jan 31, 2025

As far as I remember, it's actually more of a warning than an error.

When temp files are created, so as not to block compilation and debugging, the path to the PDB file inside the DLL is replaced with a new one. And since it is impossible to fit a longer string instead of the old one, it is necessary to shorten this name as much as possible.

The warning that the name has been shortened implies that the full path to the PDB is usually written when compiling, not just the name, so it is possible to overwrite the updated name without shortening it.

Possible solutions to the shortening warning:

  • Delete the warning print
  • Print a warning in --verbose mode only
  • Build a library with a flag to write the full path to the PDB (If it's even possible after this PR)

Possible solutions for too short a path error:

  • Change the format of the temporary file name (for writing and checking existing files) so that a maximum of 10 temporary PDB files can be written in a minimal format, for example ~5.pdb.

And as far as I remember, when testing, I created files named ~lib_***.pdb, which should allow us to write a new string for rust_ext.pdb. Possible regression after #99834, but I'm not sure.

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

No branches or pull requests

4 participants