Skip to content

build v3.13.0rc1 on windows failed with -1073741819 error code. #123414

Closed as not planned

Description

@liudonghua123

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.75

image

I 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.

python313.zip

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Activity

  1. liudonghua123 commented on Aug 28, 2024

    @liudonghua123
    Author

    Here is some suggestions from GPT4.

    The error code -1073741819 corresponds to the Windows error code 0xC0000005, 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.dll suggests that something is going wrong during the build or initialization process involving this specific DLL.

    Possible Causes

    1. 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.

    2. Compiler Issues: If you're using an incompatible or incorrectly configured compiler, it could lead to access violations.

    3. 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.

    4. Configuration Issues: Incorrect build configurations (like mismatched 32-bit vs 64-bit settings) can also cause such errors.

    5. 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

    1. Rebuild the Project: Clean the build environment and try building from scratch to ensure there’s no corruption.

    2. Check Compiler and Configuration:

      • Ensure you're using the recommended compiler version and that all paths, libraries, and dependencies are correctly configured.
      • Verify that you’re targeting the correct architecture (32-bit vs 64-bit).
    3. Inspect Event Viewer Logs: Look for additional error messages or warnings leading up to the crash that might provide more context.

    4. Debugging:

      • Use a debugger to attach to the process and see where exactly the crash occurs in the code.
      • You can also try running the DLL in isolation (if possible) to see if the issue can be reproduced in a simpler environment.
    5. Check for External Interference:

      • Disable any antivirus software or other security tools temporarily to see if they are causing the issue.
      • Ensure that your environment is stable (e.g., no ongoing Windows updates).
    6. 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?

  2. liudonghua123 commented on Aug 28, 2024

    @liudonghua123
    Author

    image

  3. liudonghua123 commented on Aug 28, 2024

    @liudonghua123
    Author

    I see some errors like Exception thrown: read access violation. v->ob_type was 0xFFFFFFFFFFFFFF9F. when execute python.exe in Visual Studio.

    Any ideas?

    image

  4. ZeroIntensity commented on Aug 28, 2024

    @ZeroIntensity
    Member

    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.)

  5. liudonghua123 commented on Aug 28, 2024

    @liudonghua123
    Author

    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.)

    @ZeroIntensity I tried to build a debug build in the visual studio, but it's the same.

  6. zooba commented on Aug 28, 2024

    @zooba
    Member

    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 PATH environment variable that is substituting its own DLL in place of the real ones, or that something has installed into System32 files 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.

  7. liudonghua123 commented on Aug 28, 2024

    @liudonghua123
    Author

    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.

  8. zooba commented on Aug 28, 2024

    @zooba
    Member

    The two dll files are attached above, is there any method or tools to compare them.

    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 set or dir env:; and feel free to replace any personal information)?

  9. liudonghua123 commented on Aug 29, 2024

    @liudonghua123
    Author

    @zooba Hi, here is my environments and reproduce steps. I use dumpbin to check the exports of the two dlls. It's quite different.

    image

    Details
    Liu.D.H  cpython  git(v3.13.0rc1)   0ms  08:45 > PCbuild\win32\python.exe -V
    Python 3.13.0rc1
    
    Liu.D.H  cpython  git(v3.13.0rc1)   533ms  08:46 > PCbuild\win32\python.exe 
    
    Liu.D.H  cpython  git(v3.13.0rc1)   36ms  08:46 > echo %errorlevel%
    -1073741819
    
    Liu.D.H  cpython  git(v3.13.0rc1)   7ms  08:46 > cp PCbuild\win32\python313.dll PCbuild\win32\python313.dll.build
    
    Liu.D.H  cpython  git(v3.13.0rc1)   242ms  08:46 > cp ..\python-3.13.0rc1-embed-win32\python313.dll PCbuild\win32\python313.dll
    
    Liu.D.H  cpython  git(v3.13.0rc1)   219ms  08:47 > PCbuild\win32\python.exe -V
    Python 3.13.0rc1
    
    Liu.D.H  cpython  git(v3.13.0rc1)   35ms  08:47 > PCbuild\win32\python.exe 
    Python 3.13.0rc1 (tags/v3.13.0rc1:e4a3e78, Jul 31 2024, 20:45:29) [MSC v.1940 32 bit (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> exit
    
    Liu.D.H  cpython  git(v3.13.0rc1)   2.897s  08:47 > set
    ALLUSERSPROFILE=C:\ProgramData
    ANDROID_HOME=D:\android\Android_SDK
    APPDATA=C:\Users\Liu.D.H\AppData\Roaming
    CHROME_CRASHPAD_PIPE_NAME=\\.\pipe\crashpad_1468_IDQGHGGXTYCHRBOA
    CLINK_DIR=C:\Program Files (x86)\clink
    clink_dummy_capture_env= 
    COLUMNS=207
    CommonProgramFiles=C:\Program Files\Common Files
    CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
    CommonProgramW6432=C:\Program Files\Common Files
    COMPUTERNAME=LDH-DESKTOP
    ComSpec=C:\WINDOWS\system32\cmd.exe
    DriverData=C:\Windows\System32\Drivers\DriverData
    EFC_7068=1
    FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
    FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer
    FPS_BROWSER_USER_PROFILE_STRING=Default
    GIT_HOME=C:\Program Files\Git
    GOPATH=C:\Users\Liu.D.H\go
    HOMEDRIVE=C:
    HOMEPATH=\Users\Liu.D.H
    JAVA_HOME=C:\Program Files\Java\jdk-21\
    LINES=35
    LOCALAPPDATA=C:\Users\Liu.D.H\AppData\Local
    LOGONSERVER=\\LDH-DESKTOP
    MSYS2_HOME=C:\msys64
    NUMBER_OF_PROCESSORS=8
    NVM_HOME=C:\Users\Liu.D.H\AppData\Roaming\nvm
    NVM_SYMLINK=C:\Program Files\nodejs
    OneDrive=C:\Users\Liu.D.H\OneDrive
    ORIGINAL_XDG_CURRENT_DESKTOP=undefined
    OS=Windows_NT
    Path=C:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\Liu.D.H\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files (x86)\NetSarang\Xshell 7\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Wasmer\bin;C:\Program Files (x86)\Wasmer\globals\wapm_packages\.bin;D:\apps\go\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;D:\apps\;C:\Program Files\nodejs\;C:\Program Files\dotnet\;C:\Ruby32-x64\bin;C:\Users\Liu.D.H\.cargo\bin;C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python312\Scripts\;C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python312\;C:\Users\Liu.D.H\AppData\Local\Programs\Python\Launcher\;C:\Users\Liu.D.H\AppData\Local\Microsoft\WindowsApps;C:\Users\Liu.D.H\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Liu.D.H\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\Liu.D.H\AppData\Local\Programs\oh-my-posh\bin;D:\apps;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Users\Liu.D.H\go\bin;D:\apps\LLVM\bin;C:\Users\Liu.D.H\AppData\Roaming\npm;D:\apps\flutter\bin;C:\Program Files\Java\jdk-21\\bin;D:\android\Android_SDK\tools;D:\android\Android_SDK\build-tools\34.0.0;D:\android\Android_SDK\cmdline-tools\latest\bin;D:\android\Android_SDK\platform-tools;C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\msys64\ucrt64\bin;C:\Users\Liu.D.H\AppData\Local\Microsoft\WinGet\Links;C:\Users\Liu.D.H\.dotnet\tools
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW
    POSH_CURSOR_LINE=9
    POSH_INSTALLER=ws
    POSH_PID=7016
    POSH_SHELL_VERSION=clink v1.6.21.f97375
    POSH_THEME=C:\Users\Liu.D.H\AppData\Local\Programs\oh-my-posh\themes\liudonghua.omp.json
    POSH_THEMES_PATH=C:\Users\Liu.D.H\AppData\Local\Programs\oh-my-posh\themes
    PROCESSOR_ARCHITECTURE=AMD64
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=3c03
    ProgramData=C:\ProgramData
    ProgramFiles=C:\Program Files
    ProgramFiles(x86)=C:\Program Files (x86)
    ProgramW6432=C:\Program Files
    PROMPT=$P$G
    PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
    PUBLIC=C:\Users\Public
    PUB_HOSTED_URL=https://pub.flutter-io.cn
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\WINDOWS
    TEMP=C:\Users\LIUD~1.H\AppData\Local\Temp
    TMP=C:\Users\LIUD~1.H\AppData\Local\Temp
    USERDOMAIN=LDH-DESKTOP
    USERDOMAIN_ROAMINGPROFILE=LDH-DESKTOP
    USERNAME=Liu.D.H
    USERPROFILE=C:\Users\Liu.D.H
    WASMER_CACHE_DIR=C:\Users\Liu.D.H\.wasmer\cache
    WASMER_DIR=C:\Program Files (x86)\Wasmer
    windir=C:\WINDOWS
    TERM_PROGRAM=vscode
    TERM_PROGRAM_VERSION=1.92.2
    LANG=en_US.UTF-8
    COLORTERM=truecolor
    GIT_ASKPASS=c:\Users\Liu.D.H\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\askpass.sh
    VSCODE_GIT_ASKPASS_NODE=C:\Users\Liu.D.H\AppData\Local\Programs\Microsoft VS Code\Code.exe
    VSCODE_GIT_ASKPASS_EXTRA_ARGS=
    VSCODE_GIT_ASKPASS_MAIN=c:\Users\Liu.D.H\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\askpass-main.js
    VSCODE_GIT_IPC_HANDLE=\\.\pipe\vscode-git-2dfcf5abc5-sock
    
    Liu.D.H  cpython  git(v3.13.0rc1)   19ms  08:47 >
    Liu.D.H  cpython  git(v3.13.0rc1)   23ms  08:56 > dumpbin /exports PCbuild\win32\python313.dll > python313.dll.exports
    
    Liu.D.H  cpython  git(v3.13.0rc1)   73ms  08:57 > dumpbin /exports PCbuild\win32\python313.dll.build > python313.dll.build.exports
    
    Liu.D.H  cpython  git(v3.13.0rc1)   159ms  08:58 > diff python313.dll.exports python313.dll.build.exports > python313.dll.exports.diff
    
    Liu.D.H  cpython  git(v3.13.0rc1)   89ms  08:58 >
    

    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 as Tools\msi\buildrelease.bat -x86 -b.

    Details
    Liu.D.H  cpython  git(v3.13.0rc1)   951ms  09:04 > PCBuild\build -c Release -p Win32
    Using py -3.12 (found 3.12 with py.exe)
    Fetching external libraries...
    bzip2-1.0.8 already exists, skipping.
    mpdecimal-4.0.0 already exists, skipping.
    sqlite-3.45.3.0 already exists, skipping.
    xz-5.2.5 already exists, skipping.
    zlib-1.3.1 already exists, skipping.
    Fetching external binaries...
    libffi-3.4.4 already exists, skipping.
    openssl-bin-3.0.13 already exists, skipping.
    tcltk-8.6.14.0 already exists, skipping.
    Finished.
    Using "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\MSBuild.exe"  (found in the PATH)
    Using py -3.12 (found 3.12 with py.exe)
    
    "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\MSBuild.exe"  "D:\code\python\windows-python-installer\cpython\PCbuild\pcbuild.proj" /t:Build /m /nologo /v:m /clp:summary /p:Configuration=Release /p:Platform=Win32 /p:IncludeExternals=true /p:IncludeCTypes=true /p:IncludeSSL=true /p:IncludeTkinter=true /p:DisableGil= /p:UseTestMarker= /p:GIT="C:\Program Files\Git\cmd\git.exe" /p:UseJIT= /p:UseTIER2=
    
      _freeze_module.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_freeze_module.exe
      Updated files: importlib._bootstrap.h, importlib._bootstrap_external.h, zipimport.h, codecs.h, _sitebuiltins.h, os.h, importlib.util.h, runpy.h
      Killing any running python.exe instances...
      Regenerate Global Objects
      # not changed: D:\code\python\windows-python-installer\cpython\Include\internal\pycore_global_strings.h
      # not changed: D:\code\python\windows-python-installer\cpython\Include\internal\pycore_runtime_init_generated.h
      # not changed: D:\code\python\windows-python-installer\cpython\Include\internal\pycore_unicodeobject_generated.h
      # not changed: D:\code\python\windows-python-installer\cpython\Include\internal\pycore_global_objects_fini_generated.h
      Generated sources are up to date
      Getting build info from "C:\Program Files\Git\cmd\git.exe"
      Building tags/v3.13.0rc1:e4a3e786a5e tags/v3.13.0rc1
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\python313.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\python313.exp
      Generating code
      Finished generating code
      pythoncore.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\python313.dll
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_ctypes_test.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_ctypes_test.exp
      Generating code
      Finished generating code
      _ctypes_test.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_ctypes_test.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testbuffer.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testbuffer.exp
      Generating code
      Finished generating code
      _testbuffer.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testbuffer.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\python3.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\python3.exp
      Generating code
      Finished generating code
      python3dll.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\python3.dll
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testcapi.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testcapi.exp
      Generating code
      Finished generating code
      _testcapi.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testcapi.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testlimitedcapi.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testlimitedcapi.exp
      Generating code
      Finished generating code
      _testlimitedcapi.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testlimitedcapi.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testinternalcapi.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testinternalcapi.exp
      Generating code
      Finished generating code
      _testinternalcapi.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testinternalcapi.pyd
      Generating code
      Finished generating code
      _testembed.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testembed.exe
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testimportmultiple.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testimportmultiple.exp
      Generating code
      Finished generating code
      _testimportmultiple.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testimportmultiple.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testmultiphase.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testmultiphase.exp
      Generating code
      Finished generating code
      _testmultiphase.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testmultiphase.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testsinglephase.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testsinglephase.exp
      Generating code
      Finished generating code
      _testsinglephase.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testsinglephase.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testconsole.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testconsole.exp
      Generating code
      Finished generating code
      _testconsole.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testconsole.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testclinic.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testclinic.exp
      Generating code
      Finished generating code
      _testclinic.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testclinic.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testclinic_limited.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testclinic_limited.exp
      Generating code
      Finished generating code
      _testclinic_limited.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_testclinic_limited.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\xxlimited.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\xxlimited.exp
      Generating code
      Finished generating code
      xxlimited.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\xxlimited.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\xxlimited_35.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\xxlimited_35.exp
      Generating code
      Finished generating code
      xxlimited_35.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\xxlimited_35.pyd
      Generating code
      Finished generating code
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_elementtree.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_elementtree.exp
      Generating code
      Generating code
      Generating code
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_zoneinfo.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_zoneinfo.exp
      Generating code
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_multiprocessing.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_multiprocessing.exp
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\pyshellext.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\pyshellext.exp
      Generating code
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_asyncio.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_asyncio.exp
      Generating code
      Generating code
      Generating code
      Finished generating code
      Finished generating code
      Finished generating code
      Finished generating code
      Finished generating code
      Finished generating code
      Finished generating code
      Finished generating code
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_decimal.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_decimal.exp
      Generating code
      pylauncher.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\py.exe
      Finished generating code
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_overlapped.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_overlapped.exp
      Generating code
      Finished generating code
      venvwlauncher.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\venvwlauncher.exe
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\pyexpat.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\pyexpat.exp
      Generating code
      Finished generating code
      _multiprocessing.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_multiprocessing.pyd
      _zoneinfo.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_zoneinfo.pyd
      venvlauncher.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\venvlauncher.exe
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_queue.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_queue.exp
      Generating code
      Finished generating code
      _asyncio.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_asyncio.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\select.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\select.exp
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\unicodedata.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\unicodedata.exp
      Generating code
      Generating code
      Finished generating code
      _elementtree.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_elementtree.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\winsound.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\winsound.exp
      Generating code
      Finished generating code
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_uuid.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_uuid.exp
      Finished generating code
      Generating code
      Finished generating code
      pywlauncher.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\pyw.exe
      pyshellext.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\pyshellext.dll
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_wmi.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_wmi.exp
      Generating code
      Finished generating code
      _overlapped.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_overlapped.pyd
      _decimal.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_decimal.pyd
      pyexpat.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\pyexpat.pyd
      select.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\select.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_ctypes.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_ctypes.exp
      Generating code
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_bz2.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_bz2.exp
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\sqlite3.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\sqlite3.exp
      Finished generating code
      _queue.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_queue.pyd
      winsound.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\winsound.pyd
      Generating code
      tuklib_cpucores.c
      tuklib_physmem.c
      check.c
      crc32_fast.c
      Generating code
      crc32_table.c
      crc64_fast.c
      crc64_table.c
      sha256.c
      _uuid.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_uuid.pyd
      unicodedata.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\unicodedata.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_socket.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_socket.exp
      Generating code
      Finished generating code
      Finished generating code
      alone_decoder.c
      alone_encoder.c
      auto_decoder.c
      block_buffer_decoder.c
      block_buffer_encoder.c
      block_decoder.c
      block_encoder.c
      block_header_decoder.c
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_tkinter.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_tkinter.exp
      block_header_encoder.c
      block_util.c
      common.c
      _wmi.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_wmi.pyd
      Generating code
      easy_buffer_encoder.c
      easy_decoder_memusage.c
      easy_encoder.c
      easy_encoder_memusage.c
      Finished generating code
      easy_preset.c
      filter_buffer_decoder.c
      filter_buffer_encoder.c
      filter_common.c
      filter_decoder.c
      filter_encoder.c
      filter_flags_decoder.c
      filter_flags_encoder.c
      _ctypes.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_ctypes.pyd
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_hashlib.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_hashlib.exp
      hardware_cputhreads.c
      hardware_physmem.c
      index.c
      Generating code
      index_decoder.c
      Finished generating code
      index_encoder.c
      _bz2.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_bz2.pyd
      index_hash.c
      outqueue.c
      stream_buffer_decoder.c
      stream_buffer_encoder.c
      stream_decoder.c
      stream_encoder.c
      stream_encoder_mt.c
      _socket.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_socket.pyd
      _tkinter.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_tkinter.pyd
      stream_flags_common.c
      stream_flags_decoder.c
      stream_flags_encoder.c
      vli_decoder.c
      vli_encoder.c
      vli_size.c
      delta_common.c
      delta_decoder.c
      delta_encoder.c
      fastpos_table.c
      lzma2_decoder.c
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_ssl.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_ssl.exp
      lzma2_encoder.c
      lzma_decoder.c
      lzma_encoder.c
      lzma_encoder_optimum_fast.c
      lzma_encoder_optimum_normal.c
      lzma_encoder_presets.c
      lz_decoder.c
      _hashlib.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_hashlib.pyd
      lz_encoder.c
      Generating code
      lz_encoder_mf.c
      price_table.c
      arm.c
      armthumb.c
      ia64.c
      powerpc.c
      simple_coder.c
      simple_decoder.c
      simple_encoder.c
      sparc.c
      x86.c
      Finished generating code
      _ssl.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_ssl.pyd
      Finished generating code
      liblzma.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\liblzma.lib
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_lzma.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_lzma.exp
      Generating code
      sqlite3.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\sqlite3.dll
      Finished generating code
         Creating library D:\code\python\windows-python-installer\cpython\PCbuild\win32\_sqlite3.lib and object D:\code\python\windows-python-installer\cpython\PCbuild\win32\_sqlite3.exp
      Generating code
      _lzma.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_lzma.pyd
      Finished generating code
      _sqlite3.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\_sqlite3.pyd
      Generating code
      Finished generating code
      python.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\python.exe
    D:\code\python\windows-python-installer\cpython\PCbuild\python.vcxproj(134,5): warning MSB3073: The command "setlocal
    D:\code\python\windows-python-installer\cpython\PCbuild\python.vcxproj(134,5): warning MSB3073: set PYTHONPATH=D:\code\python\windows-python-installer\cpython\Lib
    D:\code\python\windows-python-installer\cpython\PCbuild\python.vcxproj(134,5): warning MSB3073: "D:\code\python\windows-python-installer\cpython\PCbuild\win32\python.exe" "D:\code\python\windows-python-inst 
    aller\cpython\PC\validate_ucrtbase.py" ucrtbase" exited with code -1073741819.
      Wrote D:\code\python\windows-python-installer\cpython\PCbuild\win32\LICENSE.txt
      Generating code
      Finished generating code
      pythonw.vcxproj -> D:\code\python\windows-python-installer\cpython\PCbuild\win32\pythonw.exe
    
    Build succeeded.
    
    D:\code\python\windows-python-installer\cpython\PCbuild\python.vcxproj(134,5): warning MSB3073: The command "setlocal
    D:\code\python\windows-python-installer\cpython\PCbuild\python.vcxproj(134,5): warning MSB3073: set PYTHONPATH=D:\code\python\windows-python-installer\cpython\Lib
    D:\code\python\windows-python-installer\cpython\PCbuild\python.vcxproj(134,5): warning MSB3073: "D:\code\python\windows-python-installer\cpython\PCbuild\win32\python.exe" "D:\code\python\windows-python-inst 
    aller\cpython\PC\validate_ucrtbase.py" ucrtbase" exited with code -1073741819.
        1 Warning(s)
        0 Error(s)
    
    Time Elapsed 00:02:58.95
    
    Liu.D.H  cpython  git(v3.13.0rc1)   2m 59.668s  09:08 > PCbuild\win32\python.exe -V
    Python 3.13.0rc1
    
    Liu.D.H  cpython  git(v3.13.0rc1)   606ms  09:13 > PCbuild\win32\python.exe
    
    Liu.D.H  cpython  git(v3.13.0rc1)   26ms  09:16 > echo %errorlevel%
    -1073741819
    
    Liu.D.H  cpython  git(v3.13.0rc1)   6ms  09:16 >
    
  10. zooba commented on Aug 29, 2024

    @zooba
    Member

    I use dumpbin to check the exports of the two dlls. It's quite different.

    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 -xdf should 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.

  11. nineteendo commented on Feb 5, 2025

    @nineteendo
    Contributor

    Any updates on this? Or should I do a bisect?

  12. ZeroIntensity commented on Feb 5, 2025

    @ZeroIntensity
    Member

    What is there to bisect? I don't think @zooba was able to reproduce this.

  13. nineteendo commented on Feb 5, 2025

    @nineteendo
    Contributor

    I'm getting the same error...

  14. ZeroIntensity commented on Feb 5, 2025

    @ZeroIntensity
    Member

    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.

  15. nineteendo commented on Feb 5, 2025

    @nineteendo
    Contributor

    I'm getting the same exit code, I'll check what happens if I run the same command.

  16. nineteendo commented on Feb 5, 2025

    @nineteendo
    Contributor

    Image

      _freeze_module.vcxproj -> C:\Users\wanne\cpython\PCbuild\win32\_freeze_module_d.exe
      Assertion failed: PyUnicode_GET_LENGTH(string) != 1, file C:\Users\wanne\cpython\Include\internal\pycore_unicodeobjec
      t_generated.h, line 54
    C:\Users\wanne\cpython\PCbuild\_freeze_module.vcxproj(473,5): error MSB3073: The command ""C:\Users\wanne\cpython\PCbui
    ld\win32\_freeze_module_d.exe" "importlib._bootstrap" "C:\Users\wanne\cpython\Lib\importlib\_bootstrap.py" "C:\Users\wa
    nne\cpython\PCbuild\obj\314win32_Debug\_freeze_module\importlib._bootstrap.g.h"" exited with code -2147483645.
    
    Build FAILED.
    
    C:\Users\wanne\cpython\PCbuild\_freeze_module.vcxproj(473,5): error MSB3073: The command ""C:\Users\wanne\cpython\PCbui
    ld\win32\_freeze_module_d.exe" "importlib._bootstrap" "C:\Users\wanne\cpython\Lib\importlib\_bootstrap.py" "C:\Users\wa
    nne\cpython\PCbuild\obj\314win32_Debug\_freeze_module\importlib._bootstrap.g.h"" exited with code -2147483645.
        0 Warning(s)
        1 Error(s)
    
    Time Elapsed 00:01:11.64
    
  17. ZeroIntensity commented on Feb 6, 2025

    @ZeroIntensity
    Member

    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.

  18. nineteendo commented on Feb 6, 2025

    @nineteendo
    Contributor

    Should I reinstall Visual Studio build tools for Python too?

  19. nineteendo commented on Feb 6, 2025

    @nineteendo
    Contributor

    Ah, that was it. I must have broken something while bisecting.

  20. ZeroIntensity commented on Feb 6, 2025

    @ZeroIntensity
    Member

    I think this is just collecting dust and leads to false-positives with bug reports, so I'm going to close this for now.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsbuildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions