← Back to team overview

kicad-developers team mailing list archive

[RFC] wxPhoenix support

 

Hi,

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.

https://github.com/pointhi/kicad-source-mirror/tree/wx-python

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.

https://jenkins.simonrichter.eu/job/windows-kicad-msys2-patch/169/

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
/usr/lib/libwx_baseu-3.0.so.0
#1  0x00007ffff7826cfb in wxApp::DoIdle() () at
/usr/lib/libwx_gtk3u_core-3.0.so.0
#2  0x00007ffff7826e94 in  () at /usr/lib/libwx_gtk3u_core-3.0.so.0
#3  0x00007ffff52ee271 in g_main_context_dispatch () at
/usr/lib/libglib-2.0.so.0
#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
/usr/lib/libwx_gtk3u_core-3.0.so.0
#8  0x00007ffff7390bae in wxEventLoopBase::Run() () at
/usr/lib/libwx_baseu-3.0.so.0
#9  0x00007ffff7355517 in wxAppConsoleBase::MainLoop() () at
/usr/lib/libwx_baseu-3.0.so.0
#10 0x0000555555589955 in APP_SINGLE_TOP::OnRun() (this=0x5555556b1f50)
at kicad/common/single_top.cpp:186
#11 0x00007ffff73dd4c8 in wxEntry(int&, wchar_t**) () at
/usr/lib/libwx_baseu-3.0.so.0
#12 0x0000555555584a50 in main(int, char**) (argc=1,
argv=0x7fffffffd9e8) at kicad/common/single_top.cpp:260
```



Regards,
Thomas



Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups