wxWidgets / Phoenix

wxPython's Project Phoenix. A new implementation of wxPython, better, stronger, faster than he was before.
http://wxpython.org/
2.21k stars 509 forks source link

A Segmentation fault is caused by wxpython 4.2.1 + python 3.12.1 #2543

Open sandy-lcq opened 1 month ago

sandy-lcq commented 1 month ago

Operating system: Yocto bases system

wxPython version & source:
4.2.1 self-built with

Python version & source:
3.12.1

Description of the problem:

  1. On my yocto based system, with python3.12.1, if I installed wxPython, and run "pydoc3 modules" on target, A Segmentation fault will happened:

    Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
    0x00007ffff79b3311 in ?? () from /lib64/libpython3.12.so.1.0
    (gdb) bt
    #0  0x00007ffff79b3311 in ?? () from /lib64/libpython3.12.so.1.0
    #1  0x00007fffddc3f8df in ?? () from /usr/lib64/python3.12/site-packages/wx/siplib.cpython-312-x86_64-linux-gnu.so
    #2  0x00007ffff7a9a416 in Py_FinalizeEx () from /lib64/libpython3.12.so.1.0
    #3  0x00007ffff7ac55ef in Py_RunMain () from /lib64/libpython3.12.so.1.0
    #4  0x00007ffff7ac61da in Py_BytesMain () from /lib64/libpython3.12.so.1.0
    #5  0x00007ffff7646f3b in __libc_start_call_main (main=main@entry=0x555555555050, argc=argc@entry=3, 
    argv=argv@entry=0x7fffffffebc8) at /usr/src/debug/glibc/2.39+git/sysdeps/nptl/libc_start_call_main.h:58
    #6  0x00007ffff7646ff9 in __libc_start_main_impl (main=0x555555555050, argc=3, argv=0x7fffffffebc8, init=<optimized out>, 
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffebb8)
    at /usr/src/debug/glibc/2.39+git/csu/libc-start.c:360
    #7  0x0000555555555085 in _start ()
    (gdb) i  r
    rax            0x0                 0
    rbx            0x561938696330      94666320601904
    rcx            0x7fffffffffffffff  9223372036854775807
    rdx            0x561935efaeb0      94666279071408
    rsi            0x561938696330      94666320601904
    rdi            0x7f2ec76fdf08      139838891220744
    rbp            0x0                 0x0
    rsp            0x7ffe10e2a310      0x7ffe10e2a310
    r8             0x7ffe10eda080      140729182429312
    r9             0x3927b             234107
    r10            0x6b0636a           112223082
    r11            0x400000            4194304
    r12            0x7f2ec77fa6a0      139838892254880
    r13            0x7f2eacc26830      139838443644976
    r14            0x7f2ec59f9a30      139838860794416
    r15            0x0                 0
    rip            0x7f2ec73b3311      0x7f2ec73b3311
    eflags         0x10202             [ IF RF ]
    cs             0x33                51
    ss             0x2b                43
    ds             0x0                 0
    es             0x0                 0
    fs             0x0                 0
    gs             0x0                 0
    fs_base        0x7f2ec789c740      139838892918592
    gs_base        0x0                 0
    (gdb) 
  2. if I don't install wxpython on my system, "pydoc3 modules" works well

  3. rebuild my yocto bases systemd with python downgrade to 3.11.5, and also with wxPython installed, "pydoc3 modules" works well

Seems like wxPython have some problem with python3.12.1, but I don't know how to debug more, could you please provide some help or check this issue? if anything more info is needed, let me know, thanks.

swt2c commented 1 month ago

Likely duplicate of #2455