Skip to content

servicemanager LogInfoMsg and LogErrorMsg are crashing #2155

@zapdaniels

Description

@zapdaniels

First of all, thank you for the great library and the effort you put in!

I'm using

Python 3.12.0 (tags/v3.12.0:0fb18b0, Oct  2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)] on win32
pywin32==306

I ran into an issue after updating a Windows background service from Py3.11 to Py3.12

Using the servicemanager.LogInfoMsg function in Python 3.12 may result in a C-level crash, and it cannot be caught as an exception. No log visible in the Windows Event Viewer.

> py -3.12 -c "import servicemanager;servicemanager.LogInfoMsg('Test');print('ok')"

The same sequence of commands with Python 3.11 works properly.
Log is visible in Windows Event Viewer.

> py -3.11 -c "import servicemanager;servicemanager.LogInfoMsg('Test');print('ok')"
ok

Not sure if this data is helpful: Starting my entire application, I see such information in the Event Viewer as error.

Faulting application name: pythonservice.exe, version: 3.12.306.0, time stamp: 0x641ef01c
Faulting module name: python312.dll, version: 3.12.150.1013, time stamp: 0x651ac03d
Exception code: 0xc0000005
Fault offset: 0x000000000003809f
Faulting process id: 0x284c
Faulting application start time: 0x01da2804bd693713
Faulting application path: c:\tools\Python312\pythonservice.exe
Faulting module path: c:\tools\Python312\python312.dll
Report Id: ebca65a0-8bc8-4be5-a14f-a9f8053c9ea7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions