Repository navigation
build v3.13.0rc1 on windows failed with -1073741819 error code. #123414
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
OS-windowsbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
I tried to build 3.13.0rc1 on windows via call Tools\msi\buildrelease.bat -x86 -b. But it failed with the following error messages.
"D:\code\python\windows-python-installer\cpython\Tools\msi\bundle\releaselocal.wixproj" (Rebuild target) (1) ->
"D:\code\python\windows-python-installer\cpython\Tools\msi\tcltk\tcltk.wixproj" (Rebuild target) (17) ->
D:\code\python\windows-python-installer\cpython\Tools\msi\tcltk\tcltk.wxs(47): warning LGHT1076: ICE69: Mismatched component reference. Entry 'IDLE
' of the Shortcut table belongs to component 'idle_shortcut'. However, the formatted string in column 'Arguments' references file 'Lib_idlelib_idle.p
yw' which belongs to component 'Lib_idlelib_idle.pyw'. Components are in the same feature. [D:\code\python\windows-python-installer\cpython\Tools\msi
\tcltk\tcltk.wixproj]
D:\code\python\windows-python-installer\cpython\Tools\msi\tcltk\tcltk.wxs(32): warning LGHT1076: ICE69: Mismatched component reference. Entry 'reg7
7D28402A0186ED8B2B0155EF0F6CA8B' of the Registry table belongs to component 'idle_reg'. However, the formatted string in column 'Value' references fi
le 'Lib_idlelib_idle.pyw' which belongs to component 'Lib_idlelib_idle.pyw'. Components are in the same feature. [D:\code\python\windows-python-insta
ller\cpython\Tools\msi\tcltk\tcltk.wixproj]
5 Warning(s)
0 Error(s)
Time Elapsed 00:03:18.29
MSBuild version 17.11.2+c078802d4 for .NET Framework
Build started 2024/8/28 12:05:56.
Project "D:\code\python\windows-python-installer\cpython\Tools\msi\make_zip.proj" on node 1 (Build target(s)).
_Build:
setlocal
set PYTHONPATH=D:\code\python\windows-python-installer\cpython\Lib
rmdir /q/s "D:\code\python\windows-python-installer\cpython\PCbuild\obj\\313win32_Release\msi_python\zip_win32"
"D:\code\python\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\\win32\python.exe" "D:\code\python\windows-python-installer\cpython\PC\lay
out" -b "D:\code\python\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\\win32" -s "D:\code\python\windows-python-installer\cpython" -t "D
:\code\python\windows-python-installer\cpython\PCbuild\obj\\313win32_Release\msi_python\zip_win32" --zip "D:\code\python\windows-python-installer\c
python\Tools\msi\..\..\PCbuild\win32\en-us\python-3.13.0rc1-embed-win32.zip" --precompile --zip-lib --include-underpth --include-stable --flat-dlls
The system cannot find the file specified.
D:\code\python\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: The command "setlocal
D:\code\python\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073:
D:\code\python\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: set PYTHONPATH=D:\code\python\windows-python-installer\
cpython\Lib
D:\code\python\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: rmdir /q/s "D:\code\python\windows-python-installer\cpy
thon\PCbuild\obj\\313win32_Release\msi_python\zip_win32"
D:\code\python\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: "D:\code\python\windows-python-installer\cpython\Tools\
msi\..\..\PCbuild\\win32\python.exe" "D:\code\python\windows-python-installer\cpython\PC\layout" -b "D:\code\python\windows-python-installer\cpython\
Tools\msi\..\..\PCbuild\\win32" -s "D:\code\python\windows-python-installer\cpython" -t "D:\code\python\windows-python-installer\cpython\PCbuild\obj\
\313win32_Release\msi_python\zip_win32" --zip "D:\code\python\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\win32\en-us\python-3.13.0rc1-e
Tools\msi\..\..\PCbuild\\win32" -s "D:\code\python\windows-python-installer\cpython" -t "D:\code\python\windows-python-installer\cpython\PCbuild\obj\
\313win32_Release\msi_python\zip_win32" --zip "D:\code\python\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\win32\en-us\python-3.13.0rc1-e
\313win32_Release\msi_python\zip_win32" --zip "D:\code\python\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\win32\en-us\python-3.13.0rc1-e
mbed-win32.zip" --precompile --zip-lib --include-underpth --include-stable --flat-dlls" exited with code -1073741819.
Done Building Project "D:\code\python\windows-python-installer\cpython\Tools\msi\make_zip.proj" (Build target(s)) -- FAILED.
Build FAILED.
"D:\code\python\windows-python-installer\cpython\Tools\msi\make_zip.proj" (Build target) (1) ->
(_Build target) ->
D:\code\python\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: The command "setlocal
D:\code\python\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073:
D:\code\python\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: set PYTHONPATH=D:\code\python\windows-python-installer\
cpython\Lib
D:\code\python\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: rmdir /q/s "D:\code\python\windows-python-installer\cpy
thon\PCbuild\obj\\313win32_Release\msi_python\zip_win32"
D:\code\python\windows-python-installer\cpython\Tools\msi\make_zip.proj(27,9): error MSB3073: "D:\code\python\windows-python-installer\cpython\Tools\
msi\..\..\PCbuild\\win32\python.exe" "D:\code\python\windows-python-installer\cpython\PC\layout" -b "D:\code\python\windows-python-installer\cpython\
Tools\msi\..\..\PCbuild\\win32" -s "D:\code\python\windows-python-installer\cpython" -t "D:\code\python\windows-python-installer\cpython\PCbuild\obj\
\313win32_Release\msi_python\zip_win32" --zip "D:\code\python\windows-python-installer\cpython\Tools\msi\..\..\PCbuild\win32\en-us\python-3.13.0rc1-e
mbed-win32.zip" --precompile --zip-lib --include-underpth --include-stable --flat-dlls" exited with code -1073741819.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.75I found the following errors on Event Viewer.
Faulting application name: python.exe, version: 3.13.121.1013, time stamp: 0x66cea10b
Faulting module name: python313.dll, version: 3.13.121.1013, time stamp: 0x66cea0dc
Exception code: 0xc0000005
Fault offset: 0x00218da3
Faulting process id: 0x6358
Faulting application start time: 0x1DAF91189CEC6D0
Faulting application path: D:\code\python\windows-python-installer\cpython\PCbuild\win32\python.exe
Faulting module path: D:\code\python\windows-python-installer\cpython\PCbuild\win32\python313.dll
Report Id: ba1d8871-b397-4bd6-9cf4-525e16ce1260
Faulting package full name:
Faulting package-relative application ID:
I found it's the "D:\code\python\windows-python-installer\cpython\Tools\msi....\PCbuild\win32\python.exe" binary could not run. And if I replace python313.dll with the offical one, then it worked.
It's really strange. I didn't change any lines of code of v3.13.0rc1 tag.
CPython versions tested on:
3.13
Operating systems tested on:
Windows
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
OS-windowsbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Activity
liudonghua123 commentedon Aug 28, 2024
Here is some suggestions from GPT4.
The error code
-1073741819corresponds to the Windows error code0xC0000005, which is an "Access Violation" error. This typically occurs when a program tries to access memory that it shouldn't, often due to a null pointer dereference, buffer overflow, or similar issues.The fact that the error is pointing to
python313.dllsuggests that something is going wrong during the build or initialization process involving this specific DLL.Possible Causes
Corrupted or Incomplete Build: The DLL or some other components might be corrupted or not correctly built. This can happen if the build process was interrupted or if there were other errors that were not properly handled.
Compiler Issues: If you're using an incompatible or incorrectly configured compiler, it could lead to access violations.
Dependencies: Missing or incompatible dependencies could cause issues during the build or runtime. Make sure all required libraries and dependencies are correctly installed and compatible with your environment.
Configuration Issues: Incorrect build configurations (like mismatched 32-bit vs 64-bit settings) can also cause such errors.
Hardware/Environment Issues: Sometimes, these errors could be related to hardware issues, like faulty RAM, or environmental issues, like an incompatible Windows update or antivirus software interfering with the build process.
Steps to Troubleshoot
Rebuild the Project: Clean the build environment and try building from scratch to ensure there’s no corruption.
Check Compiler and Configuration:
Inspect Event Viewer Logs: Look for additional error messages or warnings leading up to the crash that might provide more context.
Debugging:
Check for External Interference:
Review Recent Changes: If you recently made any changes to the codebase or environment, consider reverting them to see if they are causing the problem.
Would you like to perform a specific troubleshooting step, or do you need help with debugging the issue further?
liudonghua123 commentedon Aug 28, 2024
liudonghua123 commentedon Aug 28, 2024
I see some errors like
Exception thrown: read access violation. v->ob_type was 0xFFFFFFFFFFFFFF9F.when execute python.exe in Visual Studio.Any ideas?
ZeroIntensity commentedon Aug 28, 2024
I'm not all that familiar with the Windows build, but out of curiosity, does this occur (or possibly, give a more insightful error) when using a debug build? (
PCbuild\build.bat -c Debug, per the devguide.)liudonghua123 commentedon Aug 28, 2024
@ZeroIntensity I tried to build a debug build in the visual studio, but it's the same.
zooba commentedon Aug 28, 2024
A Visual Studio trace (in particular, the full call stack) of the 32-bit build would be most interesting. The screenshot you've shown is a 64-bit build.
In either case, what's most likely is that you've got some app on your
PATHenvironment variable that is substituting its own DLL in place of the real ones, or that something has installed intoSystem32files that it shouldn't be trying to share. Please also make sure your compiler is up to date.Also, in future, don't bother pasting AI chat bot output here. They base their information off thing that we ourselves have written down (you'll notice that it suggests the same things as I just did). So check it and follow it, by all means, but no need to give our words back to us.
liudonghua123 commentedon Aug 28, 2024
I tested building via visual studio gui or pcbuild.bat for both 32 and 64 bit, it's just the same error. The build python.exe binary not working, exited with the same error code.
But when I replaced python313.dll with the official build, it's working. So maybe it's not PATH issues.
The two dll files are attached above, is there any method or tools to compare them.
zooba commentedon Aug 28, 2024
Only by running until yours breaks and tracing how it got there.
When I run my own 32-bit build of 3.13.0rc1, everything works. For it to be building differently, you must have a different compiler, or have some other environment variables set that are affecting the includes or libraries it is linking to. Perhaps if you post your entire environment when you build (either
setordir env:; and feel free to replace any personal information)?liudonghua123 commentedon Aug 29, 2024
@zooba Hi, here is my environments and reproduce steps. I use dumpbin to check the exports of the two dlls. It's quite different.
Details
python313.dll.exports.zip
And I also tried to build it via
PCBuild\build -c Release -p Win32. The python313.dll is almost the same asTools\msi\buildrelease.bat -x86 -b.Details
zooba commentedon Aug 29, 2024
Those look much the same to me. The one you built will have debug symbols handy, which is why it shows more information.
The only thing I can think of is interference from a past build, so a
git clean -xdfshould clean any old files up before trying again. But I expect you've already done a clean build so this won't help.Other than that, diagnosing the cause of the crash (where the invalid pointer is coming from) is probably the way forward. Knowing that it's a build related issue helps, but we still need to know which bit of code is behaving badly.
nineteendo commentedon Feb 5, 2025
Any updates on this? Or should I do a bisect?
ZeroIntensity commentedon Feb 5, 2025
What is there to bisect? I don't think @zooba was able to reproduce this.
nineteendo commentedon Feb 5, 2025
I'm getting the same error...
ZeroIntensity commentedon Feb 5, 2025
The same exit code, or a failure at that same line?
If it's the latter, then it would be great to try and diagnose the problem.
nineteendo commentedon Feb 5, 2025
I'm getting the same exit code, I'll check what happens if I run the same command.
nineteendo commentedon Feb 5, 2025
ZeroIntensity commentedon Feb 6, 2025
I suspect that return code is some sort of blanket for "something went horribly wrong," probably not the same issue. I'd follow Steve's suggestions and trying rebuilding with a fresh clone.
nineteendo commentedon Feb 6, 2025
Should I reinstall Visual Studio build tools for Python too?
nineteendo commentedon Feb 6, 2025
Ah, that was it. I must have broken something while bisecting.
ZeroIntensity commentedon Feb 6, 2025
I think this is just collecting dust and leads to false-positives with bug reports, so I'm going to close this for now.