← Back to team overview

kicad-developers team mailing list archive

[RFC] wxPhoenix support



Now with Python 3 merged it would be nice to get support for (optional)
wxPhoenix support into 5.1 as well. I have a preliminary branch running,
which works on Linux quite well (wx3.0.4+GTK3+python3.7+wxPhoenix). It's
mainly based on
patch-sets @mmccoo wrote some time ago.


For windows, nickoe helped me to get a first build of this branch with
Python2+wxPython to ensure the old stack is not broken. Unfortunately,
closing the scripting console causes pcbnew to hang and then crash.


I was able to reproduce the problem on Linux with
(wx3.0.4+GTK3+python2.7+wxPython). It seems some mutex is not
initialized, but I don't know how to fix this issue. The bug is likely
introduced due to the fact that the new code uses wx.FindWindowById to
find the parent instead of providing a direct reference to the window.
Unfortunately, keeping the old code-path would require us to include
wxpy_api.h (which will be included in the next wxPhoenix release) and
the introduction of SIP as new dependency.

[Thread 0x7fffd6739700 (LWP 29045) exited]
12:39:51: Debug: pthread_mutex_[timed]lock(): mutex not initialized

Thread 1 "pcbnew" received signal SIGSEGV, Segmentation fault.
0x00007ffff7492d50 in wxMutex::Lock() () from /usr/lib/libwx_baseu-3.0.so.0
(gdb) backtrace
#0  0x00007ffff7492d50 in wxMutex::Lock() () at
#1  0x00007ffff7826cfb in wxApp::DoIdle() () at
#2  0x00007ffff7826e94 in  () at /usr/lib/libwx_gtk3u_core-3.0.so.0
#3  0x00007ffff52ee271 in g_main_context_dispatch () at
#4  0x00007ffff52eff89 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007ffff52f0f62 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#6  0x00007ffff58e41af in gtk_main () at /usr/lib/libgtk-3.so.0
#7  0x00007ffff7843c46 in wxGUIEventLoop::DoRun() () at
#8  0x00007ffff7390bae in wxEventLoopBase::Run() () at
#9  0x00007ffff7355517 in wxAppConsoleBase::MainLoop() () at
#10 0x0000555555589955 in APP_SINGLE_TOP::OnRun() (this=0x5555556b1f50)
at kicad/common/single_top.cpp:186
#11 0x00007ffff73dd4c8 in wxEntry(int&, wchar_t**) () at
#12 0x0000555555584a50 in main(int, char**) (argc=1,
argv=0x7fffffffd9e8) at kicad/common/single_top.cpp:260


Attachment: signature.asc
Description: OpenPGP digital signature

Follow ups