Open liudonghua123 opened 2 weeks ago
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.
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.
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?
I see some errors like Exception thrown: read access violation. v->ob_type was 0xFFFFFFFFFFFFFF9F.
when execute python.exe in Visual Studio.
Any ideas?
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.)
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.
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.
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.
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)?
@zooba Hi, here is my environments and reproduce steps. I use dumpbin to check the exports of the two dlls. It's quite different.
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
.
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.
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.I found the following errors on Event Viewer.
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