UI bug when using action plugins or switching canvas

Bug #1780575 reported by Andrzej Szombierski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Invalid
Undecided
Unassigned

Bug Description

Tested with the latest GIT version as of today (101b68b610d4334db68f1e4ba9e287b37f65c9a6), under Ubuntu 16.04.4 LTS, kicad installed from nightly PPA behaves the same as built from source.

1. Launch pcbnew (from a project or standalone, does not matter)
2. Execute any action plugin script (may be empty). OR switch the canvas to legacy and back
3. See an assertion on the console:
Gdk-CRITICAL **: IA__gdk_window_thaw_updates: assertion 'impl_window->update_freeze_count > 0' failed

4. Observe that the current layer combobox gets cleared, and the Layers/Items panel does weird things when switching (see screenshot). Other aspects of the UI also have problems.

I've traced the problem down to the following area:

After executing a plugin, PCB_EDIT_FRAME::UpdateUserInterface() is called. This in turn calls:
m_Layers->Freeze() ... m_layers->SelectLayer (from syncLayerWidgetLayer) ... m_layers->Thaw()

Inside LAYER_WIDGET::SelectLayer (->SelectLayerRow), commenting out the following lines makes the assertion go away:
m_notebook->SetSelection( 0 );
getLayerComp( aRow, 1 )->SetFocus();

I don't understand how this can interfere with freezing/thawing.

Revision history for this message
Andrzej Szombierski (qq-q) wrote :
Revision history for this message
Andrzej Szombierski (qq-q) wrote :

Full version info dump:

Application: pcbnew
Version: 5.0.0-rc3-unknown-101b68b~65~ubuntu16.04.1, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.4.0-130-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.58.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.47.0
    Compiler: GCC 5.4.0 with C++ ABI 1009

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

tags: added: pcbnew
Revision history for this message
Andrzej Szombierski (qq-q) wrote :

This turned out to be a bug in wxWidgets (wxGtk). Dropping this information here for anyone else stumbling upon this problem.

Bug tracker: http://trac.wxwidgets.org/ticket/16795
Fix commit: https://github.com/wxWidgets/wxWidgets/commit/b7cf54d24afb76c87b106435c01fee774284e1a6

I've managed to solve this issue by rebuilting wxGtk with the above commit backported.

tags: added: exeidgets
tags: added: wxwidgets
removed: exeidgets
Revision history for this message
Jeff Young (jeyjey) wrote :

The fix appears to be in wxWidgets 3.1.0, which we will hopefully be moving to at some not-too-distant future.

Changed in kicad:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.