Skip to content

Conversation

MannixYang
Copy link

@MannixYang MannixYang commented Aug 15, 2025

Description

This is a Test PR.
Related issues #5786 .
The error occurred at Visual Studio 17 2022 X64.

Suggested changelog entry:

  • Placeholder.

@rwgk
Copy link
Collaborator

rwgk commented Aug 15, 2025

After you push the clang-tidy fix (remove the redundant virtual), could you please mark this PR as "Ready for review"? That's the trick to get the full CI matrix.

@MannixYang MannixYang marked this pull request as ready for review August 15, 2025 05:10
@MannixYang MannixYang requested a review from henryiii as a code owner August 15, 2025 05:10
@rwgk
Copy link
Collaborator

rwgk commented Aug 15, 2025

From

https://chatgpt.com/share/689ee2ee-514c-8008-9d6b-2566dec08a6e

"the reproducer only triggers under MSVC x64"

@MannixYang Did you already try to get a backtrace? That'll probably help enormously in homing in on the root cause. (ChatGPT has a few guesses.)

@MannixYang
Copy link
Author

@rwgk Sorry for replying to you so late.
I can't even catch the exception using try-except. Is there any other better way to get the backtrace in pybind11-test.

def test_animals():
    tiger = m.Tiger()
    try:
        tiger.clone()
    except Exception as e:
        pass

@rwgk
Copy link
Collaborator

rwgk commented Aug 21, 2025

I had a C++ backtrace in mind (not a Python backtrace).

I haven't used a C++ debugger on Windows for ... forever. Not sure when I'll get to it. If anyone seeing this is set up for Windows debugging: Could you please help?

@rwgk rwgk mentioned this pull request Aug 21, 2025
@rwgk
Copy link
Collaborator

rwgk commented Aug 31, 2025

One step further (but not a fix yet):

This I how I built:

cd C:\Users\rgrossekunst\forked\pybind11
python -m venv ..\Pybind11WinVenv
..\Pybind11WinVenv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -r tests\requirements.txt
pip install cmake ninja
(Pybind11WinVenv) PS C:\Users\rgrossekunst\forked\pybind11> pip list
Package         Version
--------------- -------
build           1.3.0
cmake           4.1.0
colorama        0.4.6
iniconfig       2.1.0
ninja           1.13.0
numpy           2.2.6
packaging       25.0
pip             25.2
pluggy          1.6.0
Pygments        2.19.2
pyproject_hooks 1.2.0
pytest          8.4.1
pytest-timeout  2.4.0
tomlkit         0.13.3
(Pybind11WinVenv) PS C:\Users\rgrossekunst\forked\pybind11>
cmake --build build --config Debug

This is crashing as expected:

cmake --build build --config Debug -t pytest

I managed to get a C++ traceback, with a lot of help from ChatGPT 5 Pro:

cd C:\Users\rgrossekunst\forked\pybind11
set PYTHONPATH=%CD%\build\tests;%CD%\tests
set _NT_SYMBOL_PATH=SRV*C:\symbols*https://msdl.microsoft.com/download/symbols;%CD%\build\tests
set PYTHONFAULTHANDLER=1
"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe" -logo C:\symbols\cdb_cmd.log -o -g -G -lines -c "sxe av; .symfix; .sympath+ SRV*C:\symbols*https://msdl.microsoft.com/download/symbols;%CD%\build\tests; .reload /f; g" "C:\Users\rgrossekunst\forked\Pybind11WinVenv\Scripts\python.exe" -m pytest -q tests\test_animal_cat_tiger.py::test_animals

At the cdb.exe prompt, paste this (multiple lines):

.symfix
.sympath srv*C:\symbols*https://msdl.microsoft.com/download/symbols;C:\Users\rgrossekunst\forked\pybind11\build\tests
.reload /f
.lines -e
.ecxr
!analyze -v
kvn 50
ln @rip
ub @rip-40
u @rip L40
lm vm pybind11_tests*
.dump /ma C:\symbols\pybind_av.dmp

Full output (long):

Microsoft (R) Windows Debugger Version 10.0.18362.1 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: "C:\Users\rgrossekunst\forked\Pybind11WinVenv\Scripts\python.exe" -m pytest -q tests\test_animal_cat_tiger.py::test_animals

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       SRV*C:\symbols*https://msdl.microsoft.com/download/symbols
OK                                             C:\Users\rgrossekunst\forked\pybind11\build\tests
Symbol search path is: SRV*C:\symbols*https://msdl.microsoft.com/download/symbols;C:\Users\rgrossekunst\forked\pybind11\build\tests
Executable search path is:
ModLoad: 00007ff6`cf9b0000 00007ff6`cf9f1000   venvlauncher.exe
ModLoad: 00007ffa`a9e10000 00007ffa`aa027000   ntdll.dll
ModLoad: 00007ffa`a87d0000 00007ffa`a8894000   C:\Windows\System32\KERNEL32.DLL
ModLoad: 00007ffa`a7430000 00007ffa`a7802000   C:\Windows\System32\KERNELBASE.dll
ModLoad: 00007ffa`a8ae0000 00007ffa`a8b88000   C:\Windows\System32\sechost.dll
ModLoad: 00007ffa`a6f80000 00007ffa`a6fa8000   C:\Windows\System32\bcrypt.dll
onecore\base\appmodel\processcreation\src\packagedcreateprocess.cpp(289)\kernelbase.dll!00007FFAA75314BA: (caller: 00007FFAA7431FE2) ReturnHr(1) tid(16ac) 80070780 The file cannot be accessed by the system.
onecore\base\appmodel\processcreation\src\packagedcreateprocess.cpp(761)\kernelbase.dll!00007FFAA7432005: (caller: 00007FFAA74320E0) ReturnHr(2) tid(16ac) 80070780 The file cannot be accessed by the system.
onecore\base\appmodel\processcreation\src\packagedcreateprocess.cpp(952)\kernelbase.dll!00007FFAA7432103: (caller: 00007FFAA7477AA5) LogHr(1) tid(16ac) 80070780 The file cannot be accessed by the system.
ModLoad: 00007ffa`8d930000 00007ffa`8d961000   C:\Windows\SYSTEM32\apisethost.appexecutionalias.dll
ModLoad: 00007ffa`a7810000 00007ffa`a7921000   C:\Windows\System32\ucrtbase.dll
ModLoad: 00007ffa`a8d90000 00007ffa`a9122000   C:\Windows\System32\combase.dll
ModLoad: 00007ffa`a9b90000 00007ffa`a9ca7000   C:\Windows\System32\RPCRT4.dll
ModLoad: 00007ffa`a7230000 00007ffa`a72ca000   C:\Windows\System32\msvcp_win.dll
ModLoad: 00007ffa`a6e30000 00007ffa`a6e5b000   C:\Windows\SYSTEM32\profapi.dll
ModLoad: 00007ffa`a70f0000 00007ffa`a716b000   C:\Windows\System32\bcryptPrimitives.dll
ModLoad: 00007ffa`a5dc0000 00007ffa`a5dd8000   C:\Windows\SYSTEM32\kernel.appcore.dll
ModLoad: 00007ffa`a9cb0000 00007ffa`a9d57000   C:\Windows\System32\msvcrt.dll
ModLoad: 00007ffa`8bf30000 00007ffa`8c048000   C:\Windows\SYSTEM32\daxexec.dll
ModLoad: 00007ffa`a8600000 00007ffa`a86d8000   C:\Windows\System32\OLEAUT32.dll
ModLoad: 00007ffa`a6450000 00007ffa`a6478000   C:\Windows\SYSTEM32\USERENV.dll
ModLoad: 00007ffa`8b080000 00007ffa`8b0c4000   C:\Windows\SYSTEM32\container.dll
ModLoad: 00007ffa`a7e40000 00007ffa`a7ef0000   C:\Windows\System32\clbcatq.dll
ModLoad: 00007ffa`8d640000 00007ffa`8d72b000   C:\Windows\System32\Windows.StateRepositoryPS.dll
ModLoad: 00007ffa`886c0000 00007ffa`88731000   C:\Windows\SYSTEM32\AppXAllUserStore.dll
ModLoad: 00007ffa`969e0000 00007ffa`96a1d000   C:\Windows\SYSTEM32\windows.staterepositoryclient.dll
ModLoad: 00007ffa`96a20000 00007ffa`96a3a000   C:\Windows\SYSTEM32\windows.staterepositorycore.dll
ModLoad: 00007ffa`88590000 00007ffa`885f0000   C:\Windows\SYSTEM32\capauthz.dll
ModLoad: 00007ffa`a86e0000 00007ffa`a8791000   C:\Windows\System32\advapi32.dll
ModLoad: 00007ffa`a6000000 00007ffa`a6034000   C:\Windows\SYSTEM32\ntmarta.dll

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       SRV*C:\symbols*https://msdl.microsoft.com/download/symbols
OK                                             C:\Users\rgrossekunst\forked\pybind11\build\tests
Symbol search path is: SRV*C:\symbols*https://msdl.microsoft.com/download/symbols;C:\Users\rgrossekunst\forked\pybind11\build\tests
Executable search path is:
ModLoad: 00007ff7`b1c50000 00007ff7`b1c7b000   python_uwp.exe
ModLoad: 00007ffa`a9e10000 00007ffa`aa027000   ntdll.dll
ModLoad: 00007ffa`a87d0000 00007ffa`a8894000   C:\Windows\System32\KERNEL32.DLL
ModLoad: 00007ffa`a7430000 00007ffa`a7802000   C:\Windows\System32\KERNELBASE.dll
ModLoad: 00007ffa`a7810000 00007ffa`a7921000   C:\Windows\System32\ucrtbase.dll
ModLoad: 00007ffa`a8d90000 00007ffa`a9122000   C:\Windows\System32\combase.dll
ModLoad: 00007ffa`a9b90000 00007ffa`a9ca7000   C:\Windows\System32\RPCRT4.dll
ModLoad: 00007ffa`a92e0000 00007ffa`a9b81000   C:\Windows\System32\SHELL32.dll
ModLoad: 00007ffa`a5dc0000 00007ffa`a5dd8000   C:\Windows\SYSTEM32\kernel.appcore.dll
ModLoad: 00007ffa`a7230000 00007ffa`a72ca000   C:\Windows\System32\msvcp_win.dll
ModLoad: 00007ffa`a9cb0000 00007ffa`a9d57000   C:\Windows\System32\msvcrt.dll
ModLoad: 00007ffa`a8920000 00007ffa`a8ad1000   C:\Windows\System32\USER32.dll
ModLoad: 00007ffa`a72d0000 00007ffa`a72f6000   C:\Windows\System32\win32u.dll
ModLoad: 00007ffa`a87a0000 00007ffa`a87c9000   C:\Windows\System32\GDI32.dll
ModLoad: 00007ffa`a7300000 00007ffa`a7423000   C:\Windows\System32\gdi32full.dll
ModLoad: 00007ffa`a6fb0000 00007ffa`a70ef000   C:\Windows\System32\wintypes.dll
ModLoad: 00007ffa`a8600000 00007ffa`a86d8000   C:\Windows\System32\OLEAUT32.dll
ModLoad: 00007ffa`4ef30000 00007ffa`4f585000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\python313.dll
ModLoad: 00007ffa`a7fa0000 00007ffa`a8011000   C:\Windows\System32\WS2_32.dll
ModLoad: 00007ffa`9ed20000 00007ffa`9ed2a000   C:\Windows\SYSTEM32\VERSION.dll
ModLoad: 00007ffa`a6f80000 00007ffa`a6fa8000   C:\Windows\System32\bcrypt.dll
ModLoad: 00007ffa`a86e0000 00007ffa`a8791000   C:\Windows\System32\ADVAPI32.dll
ModLoad: 00007ffa`a8ae0000 00007ffa`a8b88000   C:\Windows\System32\sechost.dll
ModLoad: 00007ffa`a10b0000 00007ffa`a10ce000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\VCRUNTIME140.dll
ModLoad: 00007ffa`a7aa0000 00007ffa`a7ad1000   C:\Windows\System32\IMM32.DLL
ModLoad: 00007ffa`96a20000 00007ffa`96a3a000   C:\Windows\SYSTEM32\windows.staterepositorycore.dll
ModLoad: 00007ffa`a4ae0000 00007ffa`a53fa000   C:\Windows\SYSTEM32\windows.storage.dll
ModLoad: 00007ffa`a9130000 00007ffa`a923b000   C:\Windows\System32\SHCORE.dll
ModLoad: 00007ffa`a9d60000 00007ffa`a9dc9000   C:\Windows\System32\shlwapi.dll
ModLoad: 00007ffa`a70f0000 00007ffa`a716b000   C:\Windows\System32\bcryptPrimitives.dll
ModLoad: 00007ffa`a7e40000 00007ffa`a7ef0000   C:\Windows\System32\clbcatq.dll
ModLoad: 00007ffa`5bde0000 00007ffa`5be47000   C:\Windows\System32\Windows.Storage.ApplicationData.dll
ModLoad: 00007ffa`9b850000 00007ffa`9baf6000   C:\Windows\System32\twinapi.appcore.dll
ModLoad: 00007ffa`a8bf0000 00007ffa`a8d90000   C:\Windows\System32\ole32.dll
ModLoad: 00007ffa`a3260000 00007ffa`a3368000   C:\Windows\SYSTEM32\PROPSYS.dll
ModLoad: 00007ffa`5c6b0000 00007ffa`5c6d6000   C:\Windows\system32\mssprxy.dll
ModLoad: 00007ffa`a6b00000 00007ffa`a6b4e000   C:\Windows\SYSTEM32\CFGMGR32.dll
ModLoad: 00007ffa`857f0000 00007ffa`858ac000   C:\Windows\System32\Windows.FileExplorer.Common.dll
ModLoad: 00007ffa`8d640000 00007ffa`8d72b000   C:\Windows\System32\Windows.StateRepositoryPS.dll
ModLoad: 00007ffa`969e0000 00007ffa`96a1d000   C:\Windows\SYSTEM32\windows.staterepositoryclient.dll
ModLoad: 00007ffa`a41f0000 00007ffa`a42a4000   C:\Windows\system32\uxtheme.dll
ModLoad: 00000181`087d0000 00000181`087e0000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\python3.DLL
ModLoad: 00000181`087d0000 00000181`087e0000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\python3.DLL
ModLoad: 00007ffa`9dd70000 00007ffa`9dd86000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\DLLs\_bz2.pyd
ModLoad: 00007ffa`9dd00000 00007ffa`9dd27000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\DLLs\_lzma.pyd
ModLoad: 00007ffa`9dd60000 00007ffa`9dd68000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\DLLs\_uuid.pyd
ModLoad: 00007ffa`6e530000 00007ffa`6e5df000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\DLLs\unicodedata.pyd
ModLoad: 00007ffa`9dd50000 00007ffa`9dd5b000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\DLLs\_wmi.pyd
ModLoad: 00007ffa`9dcf0000 00007ffa`9dcfc000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\VCRUNTIME140_1.dll
ModLoad: 00007ffa`9dca0000 00007ffa`9dce6000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\DLLs\_decimal.pyd
ModLoad: 00007ffa`8dab0000 00007ffa`8dad1000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\DLLs\_elementtree.pyd
ModLoad: 00007ffa`8d2e0000 00007ffa`8d313000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\DLLs\pyexpat.pyd
ModLoad: 00007ffa`8d2b0000 00007ffa`8d2d2000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\DLLs\_ctypes.pyd
ModLoad: 00007ffa`9dc90000 00007ffa`9dc9b000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\DLLs\libffi-8.dll
ModLoad: 00007ffa`9cee0000 00007ffa`9cef6000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\DLLs\_socket.pyd
ModLoad: 00007ffa`a5650000 00007ffa`a567d000   C:\Windows\SYSTEM32\IPHLPAPI.DLL
ModLoad: 00007ffa`9c2d0000 00007ffa`9c2d9000   C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\DLLs\select.pyd
ModLoad: 00007ff9`fb810000 00007ff9`fdbbb000   C:\Users\rgrossekunst\forked\pybind11\build\tests\pybind11_tests.cp313-win_amd64.pyd
ModLoad: 00007ffa`8d280000 00007ffa`8d2b0000   C:\Windows\SYSTEM32\VCRUNTIME140D.dll
ModLoad: 00007ffa`6e370000 00007ffa`6e451000   C:\Windows\SYSTEM32\MSVCP140D.dll
ModLoad: 00007ffa`8d380000 00007ffa`8d38f000   C:\Windows\SYSTEM32\VCRUNTIME140_1D.dll
ModLoad: 00007ffa`50fb0000 00007ffa`511b4000   C:\Windows\SYSTEM32\ucrtbased.dll
ModLoad: 00007ffa`4eb10000 00007ffa`4ef27000   C:\Users\rgrossekunst\forked\Pybind11WinVenv\Lib\site-packages\numpy\_core\_multiarray_umath.cp313-win_amd64.pyd
ModLoad: 00007ffa`8cdd0000 00007ffa`8ce5d000   C:\Users\rgrossekunst\forked\Pybind11WinVenv\Lib\site-packages\numpy.libs\msvcp140-263139962577ecda4cd9469ca360a746.dll
ModLoad: 00007ff9`fa490000 00007ff9`fb80b000   C:\Users\rgrossekunst\forked\Pybind11WinVenv\Lib\site-packages\numpy.libs\libscipy_openblas64_-13e2df515630b4a41f92893938845698.dll
ModLoad: 00007ffa`88570000 00007ffa`8858e000   C:\Users\rgrossekunst\forked\Pybind11WinVenv\Lib\site-packages\numpy\linalg\_umath_linalg.cp313-win_amd64.pyd
(6b28.4a68): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** WARNING: Unable to verify checksum for C:\Users\rgrossekunst\forked\pybind11\build\tests\pybind11_tests.cp313-win_amd64.pyd
pybind11_tests_cp313_win_amd64!<lambda_0ba0aa8a44b5409548e24cc2f74bc1d3>::operator()+0x29:
00007ff9`fc86fcf9 48634004        movsxd  rax,dword ptr [rax+4] ds:00000000`00000004=????????
1:007> cdb: Reading initial command 'sxe av; .symfix; .sympath+ SRV*C:\symbols*https://msdl.microsoft.com/download/symbols;C:\Users\rgrossekunst\forked\pybind11\build\tests; .reload /f; g'
*** WARNING: Unable to verify checksum for C:\Users\rgrossekunst\forked\pybind11\build\tests\pybind11_tests.cp313-win_amd64.pyd
WARNING: Whitespace at start of path element
WARNING: Whitespace at start of path element
*** WARNING: Unable to verify checksum for C:\Users\rgrossekunst\forked\pybind11\build\tests\pybind11_tests.cp313-win_amd64.pyd
Symbol search path is: srv*;SRV*C:\symbols*https://msdl.microsoft.com/download/symbols;C:\Users\rgrossekunst\forked\pybind11\build\tests; .reload /f; g
Expanded Symbol search path is: cache*;SRV*https://msdl.microsoft.com/download/symbols;srv*c:\symbols*https://msdl.microsoft.com/download/symbols;c:\users\rgrossekunst\forked\pybind11\build\tests; .reload /f; g
WARNING: Whitespace at start of path element
WARNING: Whitespace at start of path element

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
Deferred                                       SRV*C:\symbols*https://msdl.microsoft.com/download/symbols
OK                                             C:\Users\rgrossekunst\forked\pybind11\build\tests
1:007> .symfix
*** WARNING: Unable to verify checksum for C:\Users\rgrossekunst\forked\pybind11\build\tests\pybind11_tests.cp313-win_amd64.pyd
1:007> .sympath srv*C:\symbols*https://msdl.microsoft.com/download/symbols;C:\Users\rgrossekunst\forked\pybind11\build\tests
*** WARNING: Unable to verify checksum for C:\Users\rgrossekunst\forked\pybind11\build\tests\pybind11_tests.cp313-win_amd64.pyd
Symbol search path is: srv*C:\symbols*https://msdl.microsoft.com/download/symbols;C:\Users\rgrossekunst\forked\pybind11\build\tests
Expanded Symbol search path is: srv*c:\symbols*https://msdl.microsoft.com/download/symbols;c:\users\rgrossekunst\forked\pybind11\build\tests

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*C:\symbols*https://msdl.microsoft.com/download/symbols
OK                                             C:\Users\rgrossekunst\forked\pybind11\build\tests
1:007> .reload /f
Reloading current modules
....*** WARNING: Unable to verify checksum for C:\Users\rgrossekunst\forked\pybind11\build\tests\pybind11_tests.cp313-win_amd64.pyd
.*** WARNING: Unable to verify timestamp for C:\Users\rgrossekunst\forked\Pybind11WinVenv\Lib\site-packages\numpy\_core\_multiarray_umath.cp313-win_amd64.pyd
........*** WARNING: Unable to verify timestamp for C:\Users\rgrossekunst\forked\Pybind11WinVenv\Lib\site-packages\numpy\linalg\_umath_linalg.cp313-win_amd64.pyd
...................................................
.

************* Symbol Loading Error Summary **************
Module name            Error
python3                The system cannot find the file specified
python_uwp             The system cannot find the file specified
libscipy_openblas64_-1 The system cannot find the file specified
_multiarray_umath.cp31 The system cannot find the file specified
python313              The system cannot find the file specified
unicodedata            The system cannot find the file specified
_umath_linalg.cp313-wi The system cannot find the file specified
_ctypes                The system cannot find the file specified
pyexpat                The system cannot find the file specified
_elementtree           The system cannot find the file specified
select                 The system cannot find the file specified
_socket                The system cannot find the file specified
libffi-8               The system cannot find the file specified
_decimal               The system cannot find the file specified
_lzma                  The system cannot find the file specified
_wmi                   The system cannot find the file specified
_uuid                  The system cannot find the file specified
_bz2                   The system cannot find the file specified

You can troubleshoot most symbol related issues by turning on symbol loading diagnostics (!sym noisy) and repeating the command that caused symbols to be loaded.
You should also verify that your symbol search path (.sympath) is correct.
1:007> .lines -e
Line number information will be loaded
1:007> .ecxr
Unable to get exception context, HRESULT 0x8000FFFF
1:007> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************


KEY_VALUES_STRING: 1

    Key  : AV.Dereference
    Value: NullClassPtr

    Key  : AV.Fault
    Value: Read

    Key  : Timeline.OS.Boot.DeltaSec
    Value: 3610

    Key  : Timeline.Process.Start.DeltaSec
    Value: 39


PROCESSES_ANALYSIS: 1

SERVICE_ANALYSIS: 1

STACKHASH_ANALYSIS: 1

TIMELINE_ANALYSIS: 1

Timeline: !analyze.Start
    Name: <blank>
    Time: 2025-08-31T19:29:57.84Z
    Diff: 84 mSec

Timeline: Dump.Current
    Name: <blank>
    Time: 2025-08-31T19:29:57.0Z
    Diff: 0 mSec

Timeline: Process.Start
    Name: <blank>
    Time: 2025-08-31T19:29:18.0Z
    Diff: 39000 mSec

Timeline: OS.Boot
    Name: <blank>
    Time: 2025-08-31T18:29:47.0Z
    Diff: 3610000 mSec


DUMP_CLASS: 2

DUMP_QUALIFIER: 0

FAULTING_IP:
+0
00007ff9`fc86fcf9 ??              ???

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ff9fc86fcf9
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 0000000000000004
Attempt to read from address 0000000000000004

DEFAULT_BUCKET_ID:  NULL_CLASS_PTR_READ

PROCESS_NAME:  venvlauncher.exe

FOLLOWUP_IP:
venvlauncher+19e5
00007ff6`cf9b19e5 488b4c2458      mov     rcx,qword ptr [rsp+58h]

READ_ADDRESS:  0000000000000004

FAILED_INSTRUCTION_ADDRESS:
+0
00007ff9`fc86fcf9 ??              ???

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  0000000000000000

EXCEPTION_PARAMETER2:  0000000000000004

WATSON_BKT_PROCSTAMP:  689df01a

WATSON_BKT_PROCVER:  3.13.7150.1013

PROCESS_VER_PRODUCT:  Python

WATSON_BKT_MODULE:  unknown

WATSON_BKT_MODVER:  0.0.0.0

WATSON_BKT_MODOFFSET:  fc86fcf9

WATSON_BKT_MODSTAMP:  bbbbbbb4

BUILD_VERSION_STRING:  22621.1.amd64fre.ni_release.220506-1250

MODLIST_WITH_TSCHKSUM_HASH:  26b80ac2af9ba6225aefe2b411bd0d21c1c43dc3

MODLIST_SHA1_HASH:  fdda4e929fffce2f38133b830c7ac1dd2c50d6dd

NTGLOBALFLAG:  70

APPLICATION_VERIFIER_FLAGS:  0

PRODUCT_TYPE:  1

SUITE_MASK:  272

DUMP_TYPE:  fe

ANALYSIS_SESSION_HOST:  RWGK-WIN11

ANALYSIS_SESSION_TIME:  08-31-2025 12:29:57.0084

ANALYSIS_VERSION: 10.0.18362.1 amd64fre

LAST_CONTROL_TRANSFER:  from 00007ffaa746985e to 00007ffaa9eb0cd4

THREAD_ATTRIBUTES:
FAULTING_THREAD:  ffffffff

THREAD_SHA1_HASH_MOD_FUNC:  9dc37859340907f4f41e37c7be4d0b02fd6ed0d5

THREAD_SHA1_HASH_MOD_FUNC_OFFSET:  c56789fb941a770c8d96a16588fac36f1bb36fac

OS_LOCALE:  ENU

BUGCHECK_STR:  APPLICATION_FAULT_NULL_CLASS_PTR_READ_NULL_CLASS_PTR_DEREFERENCE_INVALID_POINTER_READ

PRIMARY_PROBLEM_CLASS:  APPLICATION_FAULT

PROBLEM_CLASSES:

    ID:     [0n313]
    Type:   [@ACCESS_VIOLATION]
    Class:  Addendum
    Scope:  BUCKET_ID
    Name:   Omit
    Data:   Omit
    PID:    [Unspecified]
    TID:    [Unspecified]
    Frame:  [0]

    ID:     [0n285]
    Type:   [INVALID_POINTER_READ]
    Class:  Primary
    Scope:  BUCKET_ID
    Name:   Add
    Data:   Omit
    PID:    [Unspecified]
    TID:    [Unspecified]
    Frame:  [0]

    ID:     [0n309]
    Type:   [NULL_CLASS_PTR_DEREFERENCE]
    Class:  Primary
    Scope:  BUCKET_ID
    Name:   Add
    Data:   Omit
    PID:    [Unspecified]
    TID:    [Unspecified]
    Frame:  [0]

    ID:     [0n310]
    Type:   [NULL_CLASS_PTR_READ]
    Class:  Primary
    Scope:  DEFAULT_BUCKET_ID (Failure Bucket ID prefix)
            BUCKET_ID
    Name:   Add
    Data:   Omit
    PID:    [Unspecified]
    TID:    [Unspecified]
    Frame:  [0]

STACK_TEXT:
000000d9`b0f3f618 00007ffa`a9eb0cd4 ntdll!NtWaitForSingleObject+0x14
000000d9`b0f3f620 00007ffa`a746985e KERNELBASE!WaitForSingleObjectEx+0x8e
000000d9`b0f3f6c0 00007ff6`cf9b19e5 venvlauncher+0x19e5
000000d9`b0f3f860 00007ff6`cf9b1d81 venvlauncher+0x1d81
000000d9`b0f5f8b0 00007ff6`cf9b2270 venvlauncher+0x2270
000000d9`b0f5f8f0 00007ffa`a87e259d KERNEL32!BaseThreadInitThunk+0x1d
000000d9`b0f5f920 00007ffa`a9e6af78 ntdll!RtlUserThreadStart+0x28


STACK_COMMAND:  .ecxr ; kb ; ** Pseudo Context ** Pseudo ** Value: 19788ac9e50 ** ; kb

THREAD_SHA1_HASH_MOD:  ecdfdcb2e6740612190cac58da5d722b1071c0a4

FAULT_INSTR_CODE:  244c8b48

SYMBOL_STACK_INDEX:  2

SYMBOL_NAME:  venvlauncher+19e5

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: venvlauncher

IMAGE_NAME:  venvlauncher.exe

DEBUG_FLR_IMAGE_TIMESTAMP:  689df01a

FAILURE_BUCKET_ID:  NULL_CLASS_PTR_READ_c0000005_venvlauncher.exe!Unknown

BUCKET_ID:  APPLICATION_FAULT_NULL_CLASS_PTR_READ_NULL_CLASS_PTR_DEREFERENCE_INVALID_POINTER_READ_BAD_IP_venvlauncher+19e5

FAILURE_EXCEPTION_CODE:  c0000005

FAILURE_IMAGE_NAME:  venvlauncher.exe

BUCKET_ID_IMAGE_STR:  venvlauncher.exe

FAILURE_MODULE_NAME:  venvlauncher

BUCKET_ID_MODULE_STR:  venvlauncher

FAILURE_FUNCTION_NAME:  Unknown

BUCKET_ID_FUNCTION_STR:  Unknown

BUCKET_ID_OFFSET:  19e5

BUCKET_ID_MODTIMEDATESTAMP:  689df01a

BUCKET_ID_MODCHECKSUM:  4c251

BUCKET_ID_MODVER_STR:  3.13.7150.1013

BUCKET_ID_PREFIX_STR:  APPLICATION_FAULT_NULL_CLASS_PTR_READ_NULL_CLASS_PTR_DEREFERENCE_INVALID_POINTER_READ_BAD_IP_

FAILURE_PROBLEM_CLASS:  APPLICATION_FAULT

FAILURE_SYMBOL_NAME:  venvlauncher.exe!Unknown

WATSON_STAGEONE_URL:  http://watson.microsoft.com/StageOne/venvlauncher.exe/3.13.7150.1013/689df01a/unknown/0.0.0.0/bbbbbbb4/c0000005/fc86fcf9.htm?Retriage=1

TARGET_TIME:  2025-08-31T19:29:57.000Z

OSBUILD:  22631

OSSERVICEPACK:  5415

SERVICEPACK_NUMBER: 0

OS_REVISION: 0

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

OSEDITION:  Windows 10 WinNt SingleUserTS

USER_LCID:  0

OSBUILD_TIMESTAMP:  unknown_date

BUILDDATESTAMP_STR:  220506-1250

BUILDLAB_STR:  ni_release

BUILDOSVER_STR:  10.0.22621.1.amd64fre.ni_release.220506-1250

ANALYSIS_SESSION_ELAPSED_TIME:  2f8

ANALYSIS_SOURCE:  UM

FAILURE_ID_HASH_STRING:  um:null_class_ptr_read_c0000005_venvlauncher.exe!unknown

FAILURE_ID_HASH:  {72b750c5-8419-736a-4dc5-a2b5d4b4d349}

Followup:     MachineOwner
---------

1:007> kvn 50
 # Child-SP          RetAddr           : Args to Child                                                           : Call Site
00 00000025`251fbd90 00007ff9`fc869af6 : 00000000`00000000 00000181`35214b02 00000181`398c3918 cccccccc`cccccccc : pybind11_tests_cp313_win_amd64!<lambda_0ba0aa8a44b5409548e24cc2f74bc1d3>::operator()+0x29 [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\pybind11.h @ 2152]
01 00000025`251fbdb0 00007ff9`fb94b54b : 00000181`35214b02 00000025`251fbe78 00000181`094b51f0 00000181`094b51f8 : pybind11_tests_cp313_win_amd64!<lambda_0ba0aa8a44b5409548e24cc2f74bc1d3>::<lambda_invoker_cdecl>+0x16 [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\pybind11.h @ 2150]
02 00000025`251fbde0 00007ff9`fb94b5b2 : 00000181`35214b02 00000181`398d0280 00000181`39a09db0 00007ff9`fb838056 : pybind11_tests_cp313_win_amd64!pybind11::detail::traverse_offset_bases+0x1bb [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\detail\class.h @ 303]
03 00000025`251fbef0 00007ff9`fb9485e6 : 00000181`3999cfd8 00000181`398d1180 00000181`39a09db0 00007ff9`fb838056 : pybind11_tests_cp313_win_amd64!pybind11::detail::traverse_offset_bases+0x222 [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\detail\class.h @ 307]
04 00000025`251fc000 00007ff9`fc86d684 : 00000181`39a09db0 00000181`3999cfd8 00000181`398d1180 00000025`251fc101 : pybind11_tests_cp313_win_amd64!pybind11::detail::register_instance+0x56 [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\detail\class.h @ 359]
05 00000025`251fc030 00007ff9`fc86eb2c : 00000181`39a09db0 00000025`251fc188 00000181`3999cfd0 00007ff9`fb93e288 : pybind11_tests_cp313_win_amd64!pybind11::class_<pybind11_tests::class_animal::Tiger,pybind11_tests::class_animal::Cat,pybind11::memory::smart_holder>::init_instance<pybind11::memory::smart_holder,0>+0xa4 [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\pybind11.h @ 2497]
06 00000025`251fc0f0 00007ff9`fc871382 : 00000025`251fc3d8 00000025`251fc3c8 00000025`251fc304 00000181`09e44230 : pybind11_tests_cp313_win_amd64!pybind11::detail::smart_holder_type_caster_support::smart_holder_from_shared_ptr<pybind11_tests::class_animal::Animal>+0x2fc [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\detail\type_caster_base.h @ 662]
07 00000025`251fc2b0 00007ff9`fc86ffa4 : 00000025`251fc3d8 00000025`251fc3c8 00000181`3986cb04 00000181`09e44230 : pybind11_tests_cp313_win_amd64!pybind11::detail::copyable_holder_caster<pybind11_tests::class_animal::Animal,std::shared_ptr<pybind11_tests::class_animal::Animal>,void>::cast+0xc2 [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\cast.h @ 1013]
08 00000025`251fc330 00007ff9`fc869b60 : 00000000`00000000 00000025`251fcd90 00000025`251fc5d0 00000025`251fc3e0 : pybind11_tests_cp313_win_amd64!<lambda_0e4815743b644f0d8cf7491d461c9d2f>::operator()+0x244 [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\pybind11.h @ 429]
09 00000025`251fc440 00007ff9`fb935404 : 00000025`251fcd90 00000025`251fc5d0 00000181`09e44230 cccccccc`cccccccc : pybind11_tests_cp313_win_amd64!<lambda_0e4815743b644f0d8cf7491d461c9d2f>::<lambda_invoker_cdecl>+0x20 [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\pybind11.h @ 341]
0a 00000025`251fc470 00007ffa`4efec5e0 : 00000181`39a102d0 00000181`39a26b30 00000000`00000000 00000181`087c16d8 : pybind11_tests_cp313_win_amd64!pybind11::cpp_function::dispatcher+0x12e4 [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\pybind11.h @ 1063]
0b 00000025`251fd1f0 00007ffa`4ef5c8d1 : 00000181`397b4070 00000181`39a07c90 00000181`39a26b30 00000000`00000000 : python313!PyObject_MakeTpCall+0x490
0c 00000025`251fd220 00007ffa`4ef5c229 : 00000000`00000008 00000000`00000000 00000025`251fd3e0 00000181`39aabf1a : python313!PyObject_Vectorcall+0x6e1
0d 00000025`251fd2a0 00007ffa`4ef612f4 : 00000181`00000001 00000181`39a09dc0 00000025`251fd3a8 00000181`000210da : python313!PyObject_Vectorcall+0x39
0e 00000025`251fd2e0 00007ffa`4ef5cf87 : 00000000`00000001 00000000`00000000 00000000`00000000 00000181`09e5a6e0 : python313!PyEval_EvalFrameDefault+0x3294
0f 00000025`251fd5b0 00007ffa`4efb6b02 : 00000181`0925ee80 00007ffa`4f578da0 00007ffa`4f578da0 00000000`00000001 : python313!PyObject_Vectorcall+0xd97
10 00000025`251fd5f0 00007ffa`4f099e37 : 00000025`251fd670 00000000`00000001 00000000`0000007f 00000181`09e5a6e0 : python313!PyObject_VectorcallDict+0x102
11 00000025`251fd640 00007ffa`4f099d62 : 00000181`09c4bd80 00007ffa`4eff67d8 00000181`0925ee80 00007ffa`4f578da0 : python313!PyUnicode_AsRawUnicodeEscapeString+0x13c7
12 00000025`251fd6e0 00007ffa`4ef5c8d1 : 00000181`09c4bd80 00000000`00000000 00000000`00000000 00000000`00000001 : python313!PyUnicode_AsRawUnicodeEscapeString+0x12f2
13 00000025`251fd730 00007ffa`4ef5c229 : 00000000`00000008 00000181`09d0c940 00000025`251fd8f0 00000000`00000000 : python313!PyObject_Vectorcall+0x6e1
14 00000025`251fd7b0 00007ffa`4ef64557 : 00000181`39a59e10 00000181`087c1350 00000025`251fd8b8 00007ffa`4f578da0 : python313!PyObject_Vectorcall+0x39
15 00000025`251fd7f0 00007ffa`4ef5cf87 : 00000000`00000001 00000000`00000000 00000000`00000000 00000181`39a39570 : python313!PyEval_EvalFrameDefault+0x64f7
16 00000025`251fdac0 00007ffa`4efb6b02 : 00000181`0925ee80 00007ffa`4f578da0 00007ffa`4f578da0 00000000`00000001 : python313!PyObject_Vectorcall+0xd97
17 00000025`251fdb00 00007ffa`4f099e37 : 00000025`251fdb80 00000000`00000001 00000000`00000003 00000181`39a39570 : python313!PyObject_VectorcallDict+0x102
18 00000025`251fdb50 00007ffa`4f099d62 : 00000000`00000000 00000000`00000002 00000181`0925ee80 00000181`087c1030 : python313!PyUnicode_AsRawUnicodeEscapeString+0x13c7
19 00000025`251fdbf0 00007ffa`4efc0502 : 00000000`00000000 00007ffa`4f099cf0 00000000`00000044 00000181`00000001 : python313!PyUnicode_AsRawUnicodeEscapeString+0x12f2
1a 00000025`251fdc40 00007ffa`4ef63edc : 00000181`09c4bf60 00000025`251fdd90 00000181`097f198e 00000000`00000002 : python313!PyObject_Call+0xb6
1b 00000025`251fdc90 00007ffa`4ef5cf87 : 00000000`00000002 00000000`00000000 00000000`00000000 00000181`39a1a380 : python313!PyEval_EvalFrameDefault+0x5e7c
1c 00000025`251fdf60 00007ffa`4efb6b02 : 00000181`0925ee80 00007ffa`4f578da0 00007ffa`4f578da0 00000000`00000001 : python313!PyObject_Vectorcall+0xd97
1d 00000025`251fdfa0 00007ffa`4f099e37 : 00000025`251fe020 00000000`00000001 00000000`00000036 00000181`39a1a380 : python313!PyObject_VectorcallDict+0x102
1e 00000025`251fdff0 00007ffa`4f099d62 : 00000181`09c78130 00007ffa`4eff67d8 00000181`0925ee80 00007ffa`4f578da0 : python313!PyUnicode_AsRawUnicodeEscapeString+0x13c7
1f 00000025`251fe090 00007ffa`4ef5c8d1 : 00000181`09c78130 00000000`00000000 00000181`096d1360 00000000`00000001 : python313!PyUnicode_AsRawUnicodeEscapeString+0x12f2
20 00000025`251fe0e0 00007ffa`4ef5c229 : 00000000`00000008 00000181`09e2f080 00000025`251fe2a0 00000000`00000000 : python313!PyObject_Vectorcall+0x6e1
21 00000025`251fe160 00007ffa`4ef64557 : 00000181`099faf90 00000181`087c0a58 00000025`251fe268 00000181`08a9e340 : python313!PyObject_Vectorcall+0x39
22 00000025`251fe1a0 00007ffa`4ef5cf87 : 00000000`00000001 00000000`00000000 00000000`00000000 00000181`39a88070 : python313!PyEval_EvalFrameDefault+0x64f7
23 00000025`251fe470 00007ffa`4efb6b02 : 00000181`0925ee80 00007ffa`4f578da0 00007ffa`4f578da0 00000000`00000001 : python313!PyObject_Vectorcall+0xd97
24 00000025`251fe4b0 00007ffa`4f099e37 : 00000025`251fe530 00000000`00000001 00000000`0000002b 00000181`39a88070 : python313!PyObject_VectorcallDict+0x102
25 00000025`251fe500 00007ffa`4f099d62 : 00000181`09c78220 00007ffa`4eff67d8 00000181`0925ee80 00007ffa`4f578da0 : python313!PyUnicode_AsRawUnicodeEscapeString+0x13c7
26 00000025`251fe5a0 00007ffa`4ef5c8d1 : 00000181`09c78220 00000000`00000000 00000181`096d1360 00000000`00000001 : python313!PyUnicode_AsRawUnicodeEscapeString+0x12f2
27 00000025`251fe5f0 00007ffa`4ef5c229 : 00000000`00000008 00000181`09e3fc00 00000025`251fe7b0 00000000`00000000 : python313!PyObject_Vectorcall+0x6e1
28 00000025`251fe670 00007ffa`4ef64557 : 00000181`099faf90 00000181`087c0778 00000025`251fe778 00007ffa`4f578da0 : python313!PyObject_Vectorcall+0x39
29 00000025`251fe6b0 00007ffa`4ef5cf87 : 00000000`00000001 00000000`00000000 00000000`00000000 00000181`09d6e920 : python313!PyEval_EvalFrameDefault+0x64f7
2a 00000025`251fe980 00007ffa`4efb6b02 : 00000181`0925ee80 00007ffa`4f578da0 00007ffa`4f578da0 00000000`00000001 : python313!PyObject_Vectorcall+0xd97
2b 00000025`251fe9c0 00007ffa`4f099e37 : 00000025`251fea40 00000000`00000001 00000181`0925ee80 00000181`09d6e920 : python313!PyObject_VectorcallDict+0x102
2c 00000025`251fea10 00007ffa`4f099d62 : 00000181`09c4b420 00007ffa`4eff67d8 00000181`0925ee80 00007ffa`4f578da0 : python313!PyUnicode_AsRawUnicodeEscapeString+0x13c7
2d 00000025`251feab0 00007ffa`4ef5c8d1 : 00000181`09c4b420 00000000`00000000 00000181`096d1360 00000000`00000001 : python313!PyUnicode_AsRawUnicodeEscapeString+0x12f2
2e 00000025`251feb00 00007ffa`4ef5c229 : 00000000`00000008 00000181`09e2c100 00000025`251fecc0 00000000`00000000 : python313!PyObject_Vectorcall+0x6e1
2f 00000025`251feb80 00007ffa`4ef64557 : 00000181`099faf90 00000181`087c0360 00000025`251fec88 00000181`09a0d710 : python313!PyObject_Vectorcall+0x39
30 00000025`251febc0 00007ffa`4f015538 : 00000025`251fef00 00007ffa`4f578da0 00007ffa`4f578da0 00000000`00000000 : python313!PyEval_EvalFrameDefault+0x64f7
31 00000025`251fee90 00007ffa`4f0153ee : 00000181`08c7bce0 00000181`08c89840 00000000`00000000 00000000`00000000 : python313!PyEval_EvalCode+0x200
32 00000025`251feed0 00007ffa`4f05bcdf : 00000000`00000000 00000000`00000000 00000181`09973990 00000181`08c89840 : python313!PyEval_EvalCode+0xb6
33 00000025`251fef50 00007ffa`4f05bb1e : 00000181`08a9da30 00000181`08c89840 00007ffa`4f5495c0 00007ffa`4f45f1f0 : python313!PyType_GenericNew+0x21a3
34 00000025`251fefd0 00007ffa`4ef5c8b5 : 00000181`08a9df30 00000000`00000001 00000181`089d48e0 00000000`00000024 : python313!PyType_GenericNew+0x1fe2
35 00000025`251ff070 00007ffa`4ef5c229 : 00000000`00000008 00000181`08ab1970 00000025`251ff230 00000181`08ab1972 : python313!PyObject_Vectorcall+0x6c5
36 00000025`251ff0f0 00007ffa`4ef612f4 : 00000181`08cea500 00000181`08aa6600 00000025`251ff101 00000181`08a9df30 : python313!PyObject_Vectorcall+0x39
37 00000025`251ff130 00007ffa`4ef5cf87 : 00000181`08cdb8d0 00000000`00000000 00000000`00000000 00000000`00000000 : python313!PyEval_EvalFrameDefault+0x3294
38 00000025`251ff400 00007ffa`4efc0571 : 00007ffa`4ef5ced0 00000181`08cf3b00 00000000`00000006 00007ffa`4ef7dbbc : python313!PyObject_Vectorcall+0xd97
39 00000025`251ff440 00007ffa`4efc04bb : 00000000`00000000 00000025`251ff4f0 00000181`08cf3b00 00007ffa`4f578da0 : python313!PyObject_Call+0x125
3a 00000025`251ff480 00007ffa`4f05dc14 : 00000181`08cdb8d0 00000025`251ff4f0 00000181`08cd3ea0 00000000`00000002 : python313!PyObject_Call+0x6f
3b 00000025`251ff4d0 00007ffa`4f05e083 : 00000181`08c72330 00000000`00000000 00000181`08c738c0 4a3dd571`2b474652 : python313!PyRun_StringFlags+0x1ce0
3c 00000025`251ff520 00007ffa`4f05f8b8 : 00000000`00000000 00000181`08c72330 00000025`251ff6c0 00007ffa`00000000 : python313!Py_FinalizeEx+0x1bf
3d 00000025`251ff590 00007ff7`b1c5413b : 00000000`00000000 00000181`0680d240 00000181`0680cb30 00000181`0680cb30 : python313!Py_RunMain+0x18
3e 00000025`251ff5c0 00007ff7`b1c55f30 : 00000000`00000000 00007ff7`b1c55fa9 00000181`0680cb30 00000000`00000000 : python_uwp+0x413b
3f 00000025`251ff880 00007ffa`a87e259d : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : python_uwp+0x5f30
40 00000025`251ff8c0 00007ffa`a9e6af78 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : KERNEL32!BaseThreadInitThunk+0x1d
41 00000025`251ff8f0 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x28
1:007> ln @rip
C:\Users\rgrossekunst\forked\pybind11\include\pybind11\pybind11.h(2152)+0x1a
(00007ff9`fc86fcd0)   pybind11_tests_cp313_win_amd64!<lambda_0ba0aa8a44b5409548e24cc2f74bc1d3>::operator()+0x29   |  (00007ff9`fc86fd30)   pybind11_tests_cp313_win_amd64!<lambda_0c00fa401d97d7f6fd56719922dfd79b>::operator()
1:007> ub @rip-40
                ^ Unable to find valid previous instruction for 'ub @rip-40'
1:007> u @rip L40
pybind11_tests_cp313_win_amd64!<lambda_0ba0aa8a44b5409548e24cc2f74bc1d3>::operator()+0x29 [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\pybind11.h @ 2152]:
00007ff9`fc86fcf9 48634004        movsxd  rax,dword ptr [rax+4]
00007ff9`fc86fcfd 488b4c2428      mov     rcx,qword ptr [rsp+28h]
00007ff9`fc86fd02 4803c8          add     rcx,rax
00007ff9`fc86fd05 488bc1          mov     rax,rcx
00007ff9`fc86fd08 48890424        mov     qword ptr [rsp],rax
00007ff9`fc86fd0c 488b0424        mov     rax,qword ptr [rsp]
00007ff9`fc86fd10 4883c410        add     rsp,10h
00007ff9`fc86fd14 5f              pop     rdi
00007ff9`fc86fd15 c3              ret
00007ff9`fc86fd16 cc              int     3
00007ff9`fc86fd17 cc              int     3
00007ff9`fc86fd18 cc              int     3
00007ff9`fc86fd19 cc              int     3
00007ff9`fc86fd1a cc              int     3
00007ff9`fc86fd1b cc              int     3
00007ff9`fc86fd1c cc              int     3
00007ff9`fc86fd1d cc              int     3
00007ff9`fc86fd1e cc              int     3
00007ff9`fc86fd1f cc              int     3
00007ff9`fc86fd20 cc              int     3
00007ff9`fc86fd21 cc              int     3
00007ff9`fc86fd22 cc              int     3
00007ff9`fc86fd23 cc              int     3
00007ff9`fc86fd24 cc              int     3
00007ff9`fc86fd25 cc              int     3
00007ff9`fc86fd26 cc              int     3
00007ff9`fc86fd27 cc              int     3
00007ff9`fc86fd28 cc              int     3
00007ff9`fc86fd29 cc              int     3
00007ff9`fc86fd2a cc              int     3
00007ff9`fc86fd2b cc              int     3
00007ff9`fc86fd2c cc              int     3
00007ff9`fc86fd2d cc              int     3
00007ff9`fc86fd2e cc              int     3
00007ff9`fc86fd2f cc              int     3
pybind11_tests_cp313_win_amd64!<lambda_0c00fa401d97d7f6fd56719922dfd79b>::operator() [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\pybind11.h @ 2081]:
00007ff9`fc86fd30 4889542410      mov     qword ptr [rsp+10h],rdx
00007ff9`fc86fd35 48894c2408      mov     qword ptr [rsp+8],rcx
00007ff9`fc86fd3a 57              push    rdi
00007ff9`fc86fd3b 4883ec20        sub     rsp,20h
00007ff9`fc86fd3f 488b4c2438      mov     rcx,qword ptr [rsp+38h]
00007ff9`fc86fd44 e84572fdfe      call    pybind11_tests_cp313_win_amd64!ILT+221065(??$dynamic_raw_ptr_cast_if_possibleUtrampoline_self_life_supportpybind11VCatclass_animalpybind11_tests$0Adetailpybind11YAPEAUtrampoline_self_life_support (00007ff9`fb846f8e)
00007ff9`fc86fd49 4883c420        add     rsp,20h
00007ff9`fc86fd4d 5f              pop     rdi
00007ff9`fc86fd4e c3              ret
00007ff9`fc86fd4f cc              int     3
00007ff9`fc86fd50 cc              int     3
00007ff9`fc86fd51 cc              int     3
00007ff9`fc86fd52 cc              int     3
00007ff9`fc86fd53 cc              int     3
00007ff9`fc86fd54 cc              int     3
00007ff9`fc86fd55 cc              int     3
00007ff9`fc86fd56 cc              int     3
00007ff9`fc86fd57 cc              int     3
00007ff9`fc86fd58 cc              int     3
00007ff9`fc86fd59 cc              int     3
00007ff9`fc86fd5a cc              int     3
00007ff9`fc86fd5b cc              int     3
00007ff9`fc86fd5c cc              int     3
00007ff9`fc86fd5d cc              int     3
00007ff9`fc86fd5e cc              int     3
00007ff9`fc86fd5f cc              int     3
pybind11_tests_cp313_win_amd64!<lambda_0e4815743b644f0d8cf7491d461c9d2f>::operator() [C:\Users\rgrossekunst\forked\pybind11\include\pybind11\pybind11.h @ 341]:
00007ff9`fc86fd60 4c89442418      mov     qword ptr [rsp+18h],r8
00007ff9`fc86fd65 4889542410      mov     qword ptr [rsp+10h],rdx
00007ff9`fc86fd6a 48894c2408      mov     qword ptr [rsp+8],rcx
1:007> lm vm pybind11_tests*
start             end                 module name
00007ff9`fb810000 00007ff9`fdbbb000   pybind11_tests_cp313_win_amd64 C (private pdb symbols)  c:\users\rgrossekunst\forked\pybind11\build\tests\pybind11_tests.pdb
    Loaded symbol image file: C:\Users\rgrossekunst\forked\pybind11\build\tests\pybind11_tests.cp313-win_amd64.pyd
    Image path: C:\Users\rgrossekunst\forked\pybind11\build\tests\pybind11_tests.cp313-win_amd64.pyd
    Image name: pybind11_tests.cp313-win_amd64.pyd
    Timestamp:        Sat Aug 30 23:32:33 2025 (68B3EC81)
    CheckSum:         00000000
    ImageSize:        023AB000
    Translations:     0000.04b0 0000.04e4 0409.04b0 0409.04e4
    Information from resource tables:
1:007> .dump /ma C:\symbols\pybind_av.dmp
Unable to create file 'C:\symbols\pybind_av.dmp' - Win32 error 0n80
    "The file exists."
1:007> q
quit:
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\atlmfc.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\concurrency.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\cpp_rest.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\stl.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\Windows.Data.Json.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\Windows.Devices.Geolocation.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\Windows.Devices.Sensors.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\Windows.Media.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\windows.natvis'
NatVis script unloaded from 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\Visualizers\winrt.natvis'

C:\Users\rgrossekunst\forked\pybind11>

rwgk and others added 3 commits September 1, 2025 22:23
…shared_ptr(): new test passes, but test_shared_ptr_alias_nonpython breaks, test_iostream.py has failures.

```
..\..\tests\test_iostream.py:255: AssertionError
================================================================ test session starts ================================================================
platform win32 -- Python 3.13.7, pytest-8.4.1, pluggy-1.6.0
installed packages of interest: build==1.3.0 numpy==2.2.6
C++ Info: MSVC 194435211 C++17 __pybind11_internals_v11_msvc_md_mscver19_debug__ PYBIND11_SIMPLE_GIL_MANAGEMENT=False
rootdir: C:\Users\rgrossekunst\forked\pybind11\tests
configfile: pytest.ini
plugins: timeout-2.4.0
collected 1281 items

..\..\tests\test_animal_cat_tiger.py .                                                                                                         [  0%]
..\..\tests\test_async.py ..                                                                                                                   [  0%]
... <cut> ...
============================================================== short test summary info ==============================================================
SKIPPED [1] ..\..\tests\test_buffers.py:56: cpp_name=`long double`: `long double` and `double` have same size.
SKIPPED [1] ..\..\tests\test_buffers.py:56: cpp_name=`std::complex<long double>`: `long double` and `double` have same size.
SKIPPED [24] ..\..\tests\test_chrono.py:80: TZ environment variable only supported on POSIX
SKIPPED [1] ..\..\tests\test_eigen_matrix.py:754: could not import 'scipy': No module named 'scipy'
SKIPPED [1] ..\..\tests\test_eigen_matrix.py:764: could not import 'scipy': No module named 'scipy'
SKIPPED [1] ..\..\tests\test_multiple_interpreters.py:127: Requires 3.14.0b3+
SKIPPED [1] ..\..\tests\test_pytypes.py:1044: C++20 non-type template args feature not available.
SKIPPED [1] ..\..\tests\test_pytypes.py:1088: C++20 non-type template args feature not available.
SKIPPED [3] ..\..\tests\test_pytypes.py:1103: <ranges> not available.
SKIPPED [3] ..\..\tests\test_pytypes.py:1116: <ranges> not available.
SKIPPED [3] ..\..\tests\test_pytypes.py:1128: <ranges> not available.
SKIPPED [1] ..\..\tests\test_scoped_critical_section.py:15: no <barrier>
SKIPPED [1] ..\..\tests\test_scoped_critical_section.py:21: no <barrier>
SKIPPED [1] ..\..\tests\test_scoped_critical_section.py:27: no <barrier>
SKIPPED [1] ..\..\tests\test_stl.py:168: no <experimental/optional>
SKIPPED [1] ..\..\tests\test_stl.py:200: no <boost/optional>
FAILED ..\..\tests\test_iostream.py::test_not_captured - AssertionError: assert '' == 'Something th...how up in log'
FAILED ..\..\tests\test_iostream.py::test_err - AssertionError: assert '' == 'Something th...how up in log'
FAILED ..\..\tests\test_iostream.py::test_multi_captured - AssertionError: assert '' == 'bd'
FAILED ..\..\tests\test_iostream.py::test_redirect - AssertionError: assert '' == 'Should not be in log!'
FAILED ..\..\tests\test_iostream.py::test_redirect_err - AssertionError: assert '' == 'StdOut'
==================================================== 5 failed, 1231 passed, 45 skipped in 27.68s ====================================================
Batch file failed at line 3 with errorcode 1
FAILED: [code=1] tests/CMakeFiles/pytest C:/Users/rgrossekunst/forked/pybind11/build/tests/CMakeFiles/pytest
tests\CMakeFiles\pytest-e16405e.bat 69c50e2372e6acf3
ninja: build stopped: subcommand failed.
```
@rwgk rwgk closed this Sep 2, 2025
@rwgk rwgk reopened this Sep 2, 2025
@rwgk
Copy link
Collaborator

rwgk commented Sep 2, 2025

After several hours of debugging: commit 41c37a3 pin-points a definite problem. See commit message for more information.

I just triggered the CI to see if the test_iostream errors show up here, too.

And to see what still works in general.

Worth noting:

Previously I wrote:

"the reproducer only triggers under MSVC x64"

This is because MSVC handles multiple inheritance very differently than other compilers. Concretely:

    std::shared_ptr<Animal> clone() const override { return std::make_shared<Tiger>(*this); }

The Animal pointer is different from the Tiger pointer under Windows, but the pointers are identical everywhere else.

The problem is in the pybind11 smart_holder code for sure, but only Windows stumbles over the bug.

rwgk added 3 commits September 2, 2025 08:42
…2@v2 cannot be run twice anymore):

https://github.com/pybind/pybind11/actions/runs/17394902023/job/49417376616?pr=5796

```
Run msys2/setup-msys2@v2
  with:
    msystem: mingw64
    install: mingw-w64-x86_64-python-numpy mingw-w64-x86_64-python-scipy mingw-w64-x86_64-eigen3
    path-type: minimal
    update: false
    pacboy: false
    release: true
    location: RUNNER_TEMP
    platform-check-severity: fatal
    cache: true
  env:
    PYTHONDEVMODE: 1
    PIP_BREAK_SYSTEM_PACKAGES: 1
    PIP_ONLY_BINARY: numpy
    FORCE_COLOR: 3
    PYTEST_TIMEOUT: 300
    VERBOSE: 1
    CMAKE_COLOR_DIAGNOSTICS: 1
    MSYSTEM: MINGW64
Error: Trying to install MSYS2 to D:\a\_temp\msys64 but that already exists, cannot continue.
```
…IND11_RUN_TESTING_WITH_SMART_HOLDER_AS_DEFAULT_BUT_NEVER_USE_IN_PRODUCTION_PLEASE
@rwgk
Copy link
Collaborator

rwgk commented Sep 2, 2025

Quick comment:

The lines touched by

are there due to a misunderstanding of mine, probably from work very early on (~2021). It's quite amazing that these didn't trigger any test failures before.

I still need to figure out proper fixes, that don't break the two existing tests. (It could take me another couple weeks before I find the time.)

@MannixYang
Copy link
Author

Quick comment:

The lines touched by

are there due to a misunderstanding of mine, probably from work very early on (~2021). It's quite amazing that these didn't trigger any test failures before.

I still need to figure out proper fixes, that don't break the two existing tests. (It could take me another couple weeks before I find the time.)

Thanks a lot for the quick follow-up and clarification! Really appreciate your time and effort. No worries about the timeline — totally understand it may take some time to sort out.


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

Successfully merging this pull request may close these issues.

2 participants