Assert in Symbol Properties

Bug #1817965 reported by Seth Hillbrand on 2019-02-27
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
High
Jeff Young

Bug Description

When editing the Symbol Properties from Eeschema, if you click and drag in the grid twice, you get the following assertion in GTK (2 and 3).

After this, the dialog cannot be closed using the mouse. It can only be closed using the keyboard (shift + Enter) but Eeschema will segfault when closing. The assertion immediately before the segfault is (Destroying window with mouse capture). I'll add the second assertion in the next message.

#0 0x00007ffff63a857b in raise (sig=5) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff7868e2d in wxGUIAppTraits::ShowAssertDialog(wxString const&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#2 0x00007ffff7346ab2 in () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#3 0x00007ffff73489b0 in wxAppConsoleBase::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*) ()
    at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#4 0x00007ffff78383b0 in wxApp::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*) ()
    at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#5 0x00007ffff7348c68 in () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#6 0x00007ffff7344b16 in wxOnAssert(char const*, int, char const*, char const*, char const*) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#7 0x00007ffff7e026f7 in wxGrid::DoGridDragEvent(wxMouseEvent&, wxGridCellCoords const&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0
#8 0x00007ffff7e02b9e in wxGrid::ProcessGridCellMouseEvent(wxMouseEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0
#9 0x00007ffff74a97ae in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
    at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#10 0x00007ffff74a98b3 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#11 0x00007ffff74a9bec in wxEvtHandler::TryHereOnly(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#12 0x00007ffff74a9c73 in wxEvtHandler::ProcessEventLocally(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#13 0x00007ffff74a9d11 in wxEvtHandler::ProcessEvent(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#14 0x00007ffff74a9ab7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#15 0x00007ffff7871585 in () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#16 0x00007ffff5ec11eb in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#17 0x00007ffff5c90c7d in g_closure_invoke () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#18 0x00007ffff5ca4345 in () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007ffff5cac94b in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x00007ffff5cad91f in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007ffff5fd7cac in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#22 0x00007ffff5ebf48c in gtk_propagate_event () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#23 0x00007ffff5ebf87b in gtk_main_do_event () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#24 0x00007ffff5d32bac in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#25 0x00007ffff59fcf2e in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007ffff59fd1c8 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#27 0x00007ffff59fd4c2 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007ffff5ebe8e7 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#29 0x00007ffff7851845 in wxGUIEventLoop::DoRun() () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#30 0x00007ffff737f48d in wxEventLoopBase::Run() () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#31 0x00007ffff12b94dc in DIALOG_SHIM::ShowQuasiModal() (this=0x7fffffffd1d0) at /home/seth/code/kicad/kicad-launchpad/common/dialog_shim.cpp:382
#32 0x00007ffff10f184f in SCH_EDIT_FRAME::EditComponent(SCH_COMPONENT*) (this=0x55555692ce20, aComponent=0x555557c516d0)
    at /home/seth/code/kicad/kicad-launchpad/eeschema/edit_component_in_schematic.cpp:132
#33 0x00007ffff114d432 in SCH_EDIT_FRAME::OnLeftDClick(wxDC*, wxPoint const&) (this=0x55555692ce20, aDC=0x0, aPosition=...)
    at /home/seth/code/kicad/kicad-launchpad/eeschema/onleftclick.cpp:416
#34 0x00007ffff1163f00 in SCH_DRAW_PANEL::OnMouseEvent(wxMouseEvent&) (this=0x555556c4a260, event=...)
    at /home/seth/code/kicad/kicad-launchpad/eeschema/sch_draw_panel.cpp:352
#35 0x00007ffff74a97ae in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
    at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#36 0x00007ffff74a9b2a in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#37 0x00007ffff74a9bc0 in wxEvtHandler::TryHereOnly(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#38 0x00007ffff74a9c73 in wxEvtHandler::ProcessEventLocally(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#39 0x00007ffff74a9d11 in wxEvtHandler::ProcessEvent(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#40 0x00007ffff74aa6b4 in wxEvtHandler::ProcessPendingEvents() () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#41 0x00007ffff734787f in wxAppConsoleBase::ProcessPendingEvents() () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#42 0x00007ffff7834649 in wxApp::DoIdle() () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#43 0x00007ffff7834743 in () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#44 0x00007ffff59fcdd8 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007ffff59fd1c8 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007ffff59fd4c2 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007ffff5ebe8e7 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#48 0x00007ffff7851845 in wxGUIEventLoop::DoRun() () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#49 0x00007ffff737f48d in wxEventLoopBase::Run() () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#50 0x00007ffff7348616 in wxAppConsoleBase::MainLoop() () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#51 0x000055555559a2ab in APP_SINGLE_TOP::OnRun() (this=0x5555556adfd0) at /home/seth/code/kicad/kicad-launchpad/common/single_top.cpp:197
#52 0x00007ffff73c9cf9 in wxEntry(int&, wchar_t**) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#53 0x0000555555595e06 in main(int, char**) (argc=1, argv=0x7fffffffe0f8) at /home/seth/code/kicad/kicad-launchpad/common/single_top.cpp:271

Application: kicad
Version: (5.1.0-rc2-10-g13249b723b), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.0 OpenSSL/1.1.1a zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Platform: Linux 4.19.0-2-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.67.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.64.0
    Compiler: Clang 7.0.1 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Seth Hillbrand (sethh) wrote :
Download full text (7.4 KiB)

Assertion backtrace when closing Symbol Properties

#0 0x00007ffff63a857b in raise (sig=5) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff7348ded in () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#2 0x00007ffff7348041 in wxOnAssert(char const*, int, char const*, char const*, wchar_t const*) ()
    at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#3 0x00007ffff7a1d316 in wxWindowBase::NotifyCaptureLost() () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#4 0x00007ffff786f96d in () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#5 0x00007ffff5ec11eb in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#6 0x00007ffff5c90c7d in g_closure_invoke () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#7 0x00007ffff5ca4345 in () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#8 0x00007ffff5cac94b in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9 0x00007ffff5cad91f in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff5fd7cac in () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#11 0x00007ffff5ebfa1b in gtk_main_do_event () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#12 0x00007ffff5d32bac in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#13 0x00007ffff59fcf2e in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff59fd1c8 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007ffff59fd4c2 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007ffff5e48e16 in gtk_dialog_run () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#17 0x00007ffff7868d54 in wxGUIAppTraits::ShowAssertDialog(wxString const&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#18 0x00007ffff7346ab2 in () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#19 0x00007ffff73489b0 in wxAppConsoleBase::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*) ()
    at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#20 0x00007ffff78383b0 in wxApp::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*) ()
    at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#21 0x00007ffff7348c68 in () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#22 0x00007ffff7348041 in wxOnAssert(char const*, int, char const*, char const*, wchar_t const*) ()
    at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#23 0x00007ffff786dd3b in wxWindow::~wxWindow() () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#24 0x00007ffff7e0491c in () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0
#25 0x00007ffff7a19527 in wxWindowBase::Destroy() () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#26 0x00007ffff7a1955c in wxWindowBase::DestroyChildren() () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#27 0x00007ffff786dbf3 in wxWindow::~wxWindow() () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#28 0x00007ffff128c46b in WX_GRID::~WX_GRID() (this=0x55555e638200, __in_chrg=<optimized out>)
    at /home/seth/code/kicad/kicad-launchpad/common/widgets/wx_grid.cpp:40
#29 0x00007ffff128c490 in WX_GRID::~WX_GRID() (this=0x55555e638200, _...

Read more...

John Beard (john-j-beard) wrote :

Interesting: I cannot reproduce on Arch with GTK+ 3. Exactly where do you click/drag to set it off?

Seth Hillbrand (sethh) wrote :

A bit more investigating, there needs to be a datasheet value in the symbol. Then, click and drag on the datasheet cell twice.

Seth Hillbrand (sethh) wrote :
Download full text (8.7 KiB)

Also happens on MacOS

Application: kicad
Version: (5.1.0-rc2-9-ge30f37bfb), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.6.4 zlib/1.2.11 nghttp2/1.24.1
Platform: Mac OS X (Darwin 18.2.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (UTF-8,STL containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=ON
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Process: kicad [51614]
Path: /Applications/KiCad/kicad.app/Contents/MacOS/kicad
Identifier: org.kicad-pcb.kicad
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: kicad [51614]
User ID: 501

Date/Time: 2019-03-02 06:28:15.851 -0800
OS Version: Mac OS X 10.14.3 (18D42)
Report Version: 12
Anonymous UUID: C083AEEE-2E06-47E7-F44A-A7C580754DDB

Sleep/Wake UUID: 7AC51B70-B9CA-43EB-9406-B61CACF4DF48

Time Awake Since Boot: 1100000 seconds
Time Since Wake: 37000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGTRAP)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff666e723e __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff6679dc1c pthread_kill + 285
2 libsystem_c.dylib 0x00007fff66603096 raise + 26
3 libwx_osx_cocoau-3.0.0.4.0.dylib 0x000000010cec6745 wxGUIAppTraitsBase::ShowAssertDialog(wxString const&) + 357
4 libwx_osx_cocoau-3.0.0.4.0.dylib 0x000000010cc72186 ShowAssertDialog(wxString const&, int, wxString const&, wxString const&, wxString const&, wxAppTraits*) + 774
5 libwx_osx_cocoau-3.0.0.4.0.dylib 0x000000010cc71c91 wxAppConsoleBase::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*) + 145
6 libwx_osx_cocoau-3.0.0.4.0.dylib 0x000000010cc72c74 wxDefaultAssertHandler(wxString const&, int, wxString const&, wxString const&, wxString const&) + 340
7 libwx_osx_cocoau-3.0.0.4.0.dylib 0x000000010cc702b2 wxOnAssert(char const*, int, char const*, char const*, char const*) + 130
8 libwx_osx_cocoau-3.0.0.4.0.dylib 0x000000010d07689d wxGrid::DoGridDragEvent(wxMouseEvent&, wxGridCellCoords const&) + 317
9 libwx_osx_cocoau-3.0.0.4.0.dylib 0x000000010d06ec76 wxGrid::ProcessGridCellMouseEvent(wxMouseEvent&) + 246
10 libwx_osx_cocoau-3.0.0.4.0.dylib 0x000000010cdbb90f wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) + 239
11 libwx_osx_cocoau-3.0.0.4.0.dylib 0x000000010cdbce2d wxEvtHandler::ProcessEventLocally(wxEvent&) + 93
12 libwx_osx_cocoau-3.0.0.4.0.dyl...

Read more...

Wayne Stambaugh (stambaughw) wrote :

I cannot duplicate this either on my Debian system. Maybe I'm not dragging the right combination of characters in the cell.

Application: kicad
Version: (5.1.0-rc2-21-g16b3c80a7-dirty), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.0 OpenSSL/1.1.1a zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) libssh2/1.8.0 nghttp2/1.36.0 librtmp/2.3
Platform: Linux 4.19.0-2-amd64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.62.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.64.0
    Compiler: Clang 7.0.1 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Seth Hillbrand (sethh) wrote :

Here's triggering the assert on MacOS

Wayne Stambaugh (stambaughw) wrote :

@Seth, I finally managed to trigger this but it wasn't easy even after viewing your video. One thing that I did notice is if I chose to ignore all further asserts, UI controls for other open windows (not just kicad) where completely frozen until I killed KiCad. All I could do was Alt-Tab to an open terminal to run the kill command. This is pretty serious but it doesn't seem to be anything we are doing AFAICT. At least the stack trace that I am seeing doesn't show any of our code running after the assert. It could be something deep in the bowels of wxWidgets and/or gtk3.

Seth Hillbrand (sethh) wrote :

The fact that it triggers the same on MacOS makes me think it is related to how are are invoking the cell editor. I was hoping that someone more familiar than myself with the UI stuff had some insight into where this could come from.

Seth Hillbrand (sethh) wrote :

This appears to happen for all cells that we have the icon button on the right hand side when editing.

Wayne Stambaugh (stambaughw) wrote :

@Seth, have you narrowed it down to only cells with the icon buttons? If so, we could remove them for the 5.1.0 release and revisit them when we get time.

@Jeff, you implemented this correct? If so, would have time to look at it soon? I would rather not remove the buttons from the grid cells but this bug is pretty serious on Linux so it needs to be addressed for 5.1.0.

Jeff Young (jeyjey) wrote :

It is not specific to icon buttons. It can be reproduced in "normal" grid cells as well.

There's some sort of timing issue going on. After the first drag the mouse is a pointer over the cell when it should be an I-beam. If you wait for it to switch to an I-beam (by moving it in and out of the cell), the second drag works fine. If you don't, the second drag produces the assert.

Jeff Young (jeyjey) wrote :

Removing GRID_TRICKS does make it go away, though....

Jeff Young (jeyjey) wrote :

I believe I have a fix, but I want to bang on it a bit more.

The issue is that our work-around for the wxWidgets bug in mouse-up processing is getting tied in knots. I found another work-around in wxWidgets itself for the same bug that I think I can get our WX_GRID shim class to trigger.

Jeff Young (jeyjey) wrote :

This appears to have been caused by @Baranovskiy Konstantin's fix for cell selection (8400ee41c0efa926244392aa920561a7090a9893).

I've removed those changes to restore single-click access; hopefully the change to the use of the wxWidgets work-around for delayed editor opening will fix the bugs Baranovskiy was originally trying to fix (although there's no bug reference so I'm not entirely sure what those were).

Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
status: New → In Progress
Jeff Young (jeyjey) wrote :

@Seth, when you get a chance could you see if you can still reproduce this with the new code?

Changed in kicad:
status: In Progress → Fix Committed
Frank Severinsen (shack) wrote :

Hi Jeff
When I try compiling I get the following, Might be because I'm using Wx_widgets 3.1.2?:

/home/shack/GIT/kicad-source/common/grid_tricks.cpp: In member function ‘bool GRID_TRICKS::showEditor(int, int)’:
/home/shack/GIT/kicad-source/common/grid_tricks.cpp:99:17: error: ‘class WX_GRID’ has no member named ‘GetCursorRow’; did you mean ‘GetCursor’?
     if( m_grid->GetCursorRow() != aRow || m_grid->GetCursorColumn() != aCol )
                 ^~~~~~~~~~~~
                 GetCursor
/home/shack/GIT/kicad-source/common/grid_tricks.cpp:99:51: error: ‘class WX_GRID’ has no member named ‘GetCursorColumn’; did you mean ‘GetSortingColumn’?
     if( m_grid->GetCursorRow() != aRow || m_grid->GetCursorColumn() != aCol )
                                                   ^~~~~~~~~~~~~~~
                                                   GetSortingColumn
make[2]: *** [common/CMakeFiles/common.dir/build.make:1617: common/CMakeFiles/common.dir/grid_tricks.cpp.o] Error 1
make[2]: *** Venter på uafsluttede job....
make[1]: *** [CMakeFiles/Makefile2:547: common/CMakeFiles/common.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Download full text (9.5 KiB)

Hi Frank,

Yes, it’s a wxWidgets version issue. The replacements are GetGridCursorRow() and GetGridCursorCol(). I’ll fix it once my build is done.

Cheers,
Jeff.

> On 4 Mar 2019, at 12:12, Frank Severinsen <email address hidden> wrote:
>
> Hi Jeff
> When I try compiling I get the following, Might be because I'm using Wx_widgets 3.1.2?:
>
>
> /home/shack/GIT/kicad-source/common/grid_tricks.cpp: In member function ‘bool GRID_TRICKS::showEditor(int, int)’:
> /home/shack/GIT/kicad-source/common/grid_tricks.cpp:99:17: error: ‘class WX_GRID’ has no member named ‘GetCursorRow’; did you mean ‘GetCursor’?
> if( m_grid->GetCursorRow() != aRow || m_grid->GetCursorColumn() != aCol )
> ^~~~~~~~~~~~
> GetCursor
> /home/shack/GIT/kicad-source/common/grid_tricks.cpp:99:51: error: ‘class WX_GRID’ has no member named ‘GetCursorColumn’; did you mean ‘GetSortingColumn’?
> if( m_grid->GetCursorRow() != aRow || m_grid->GetCursorColumn() != aCol )
> ^~~~~~~~~~~~~~~
> GetSortingColumn
> make[2]: *** [common/CMakeFiles/common.dir/build.make:1617: common/CMakeFiles/common.dir/grid_tricks.cpp.o] Error 1
> make[2]: *** Venter på uafsluttede job....
> make[1]: *** [CMakeFiles/Makefile2:547: common/CMakeFiles/common.dir/all] Error 2
> make: *** [Makefile:163: all] Error 2
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1817965
>
> Title:
> Assert in Symbol Properties
>
> Status in KiCad:
> Fix Committed
>
> Bug description:
> When editing the Symbol Properties from Eeschema, if you click and
> drag in the grid twice, you get the following assertion in GTK (2 and
> 3).
>
> After this, the dialog cannot be closed using the mouse. It can only
> be closed using the keyboard (shift + Enter) but Eeschema will
> segfault when closing. The assertion immediately before the segfault
> is (Destroying window with mouse capture). I'll add the second
> assertion in the next message.
>
> #0 0x00007ffff63a857b in raise (sig=5) at ../sysdeps/unix/sysv/linux/raise.c:50
> #1 0x00007ffff7868e2d in wxGUIAppTraits::ShowAssertDialog(wxString const&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
> #2 0x00007ffff7346ab2 in () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #3 0x00007ffff73489b0 in wxAppConsoleBase::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*) ()
> at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #4 0x00007ffff78383b0 in wxApp::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*) ()
> at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
> #5 0x00007ffff7348c68 in () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #6 0x00007ffff7344b16 in wxOnAssert(char const*, int, char const*, char const*, char const*) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
> #7 0x00007ffff7e026f7 in wxGrid::DoGridDragEvent(wxMouseEvent&, wxGridCellCoords const&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0
> #8 0x00007ffff7e02b9e i...

Read more...

Jeff Young (jeyjey) wrote :
Download full text (9.6 KiB)

Fixes are in.

> On 4 Mar 2019, at 12:24, Jeff Young <email address hidden> wrote:
>
> Hi Frank,
>
> Yes, it’s a wxWidgets version issue. The replacements are GetGridCursorRow() and GetGridCursorCol(). I’ll fix it once my build is done.
>
> Cheers,
> Jeff.
>
>> On 4 Mar 2019, at 12:12, Frank Severinsen <email address hidden> wrote:
>>
>> Hi Jeff
>> When I try compiling I get the following, Might be because I'm using Wx_widgets 3.1.2?:
>>
>>
>> /home/shack/GIT/kicad-source/common/grid_tricks.cpp: In member function ‘bool GRID_TRICKS::showEditor(int, int)’:
>> /home/shack/GIT/kicad-source/common/grid_tricks.cpp:99:17: error: ‘class WX_GRID’ has no member named ‘GetCursorRow’; did you mean ‘GetCursor’?
>> if( m_grid->GetCursorRow() != aRow || m_grid->GetCursorColumn() != aCol )
>> ^~~~~~~~~~~~
>> GetCursor
>> /home/shack/GIT/kicad-source/common/grid_tricks.cpp:99:51: error: ‘class WX_GRID’ has no member named ‘GetCursorColumn’; did you mean ‘GetSortingColumn’?
>> if( m_grid->GetCursorRow() != aRow || m_grid->GetCursorColumn() != aCol )
>> ^~~~~~~~~~~~~~~
>> GetSortingColumn
>> make[2]: *** [common/CMakeFiles/common.dir/build.make:1617: common/CMakeFiles/common.dir/grid_tricks.cpp.o] Error 1
>> make[2]: *** Venter på uafsluttede job....
>> make[1]: *** [CMakeFiles/Makefile2:547: common/CMakeFiles/common.dir/all] Error 2
>> make: *** [Makefile:163: all] Error 2
>>
>> --
>> You received this bug notification because you are a bug assignee.
>> https://bugs.launchpad.net/bugs/1817965
>>
>> Title:
>> Assert in Symbol Properties
>>
>> Status in KiCad:
>> Fix Committed
>>
>> Bug description:
>> When editing the Symbol Properties from Eeschema, if you click and
>> drag in the grid twice, you get the following assertion in GTK (2 and
>> 3).
>>
>> After this, the dialog cannot be closed using the mouse. It can only
>> be closed using the keyboard (shift + Enter) but Eeschema will
>> segfault when closing. The assertion immediately before the segfault
>> is (Destroying window with mouse capture). I'll add the second
>> assertion in the next message.
>>
>> #0 0x00007ffff63a857b in raise (sig=5) at ../sysdeps/unix/sysv/linux/raise.c:50
>> #1 0x00007ffff7868e2d in wxGUIAppTraits::ShowAssertDialog(wxString const&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
>> #2 0x00007ffff7346ab2 in () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
>> #3 0x00007ffff73489b0 in wxAppConsoleBase::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*) ()
>> at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
>> #4 0x00007ffff78383b0 in wxApp::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*) ()
>> at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
>> #5 0x00007ffff7348c68 in () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
>> #6 0x00007ffff7344b16 in wxOnAssert(char const*, int, char const*, char const*, char const*) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
>> #7 0x00007ffff7e026f7 in wxGrid::DoGridDragEvent(wxMou...

Read more...

Frank Severinsen (shack) wrote :

Thanks Jeff!

Wayne Stambaugh (stambaughw) wrote :

@Jeff, I just pulled 49aa2503 and I'm still getting this build error on windows:

C:/msys64/home/wstambaugh/src/kicad-trunk/common/grid_tricks.cpp: In member function 'bool GRID_TRICKS::showEditor(int, int)':
C:/msys64/home/wstambaugh/src/kicad-trunk/common/grid_tricks.cpp:108:42: error: 'class wxArrayInt' has no member named 'at'; did you mean 'Last'?
             if( rows.size() != 1 || rows.at( 0 ) != aRow )

Seth Hillbrand (sethh) wrote :

Hi Jeff-

Tested and works well after a small mod to enable compiling on Linux. Can you check that I didn't break anything for you?

Jeff Young (jeyjey) wrote :

@Wayne, Seth's change should fix you up. (I didn't notice that at() is C++17.)
@Seth, yes the change looks good.

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments