symbol editor: Assert on "enter" key

Bug #1828826 reported by Dino Ghilardi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
Medium
Jeff Young

Bug Description

In symbol editor, pressing the "enter" key opens the "an assertion failed" window.

ASSERT INFO:
/home/dinoghi/SANDBOXKICAD5/src/kicad/include/tool/tool_event.h(448): assert "HasPosition()" failed in returnCheckedPosition(): Attempted to get position from non-position event

BACKTRACE:
[1] make_fcontext

----------------
Tested on commit: 92ccb766ab197157bba3c545cc721e7f20e46d2e, branch master.
-------------------------------------------

Application: kicad
Version: (5.1.0-550-g92ccb766a), debug build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.52.1 OpenSSL/1.0.2r zlib/1.2.8 libidn2/0.16 libpsl/0.17.0 (+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3
Platform: Linux 4.9.0-8-amd64 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.69.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.52.1
    Compiler: GCC 6.3.0 with C++ ABI 1010

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    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

Tags: eeschema
tags: added: eeschema
Jeff Young (jeyjey)
Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
milestone: none → 6.0.0-rc1
status: New → In Progress
Revision history for this message
Dino Ghilardi (dino-ghilardi) wrote :

Also in eeschema the same behaviour, with the same message.
--------------------------------------

ASSERT INFO:
/home/dinoghi/SANDBOXKICAD5/src/kicad/include/tool/tool_event.h(448): assert "HasPosition()" failed in returnCheckedPosition(): Attempted to get position from non-position event

BACKTRACE:
[1] make_fcontext

Revision history for this message
Jeff Young (jeyjey) wrote :

Odd that I don't get that assert on OSX.

In any case it's harmless (if annoying). You can "Continue" without harm.

Changed in kicad:
importance: Undecided → Medium
Revision history for this message
Dino Ghilardi (dino-ghilardi) wrote :

Now I can see it in pcbnew also.
gerbv seems to work without this issue.

Revision history for this message
Dino Ghilardi (dino-ghilardi) wrote :

Update: In eeschema if any tool is selected the issue does not appear.

In pcbnew if I end a "circle" command with enter I get a segmentation fault.
Also if I end a "add graphic line" using enter.
Also "add text on copper layer or graphic text"

"Add graphic polygon" works fine.

Using left click works fine. May be this is related to the enter key behaviour I'm experiencing, so I don't know if I should file a new bug for this.

Ending the "add graphic circle" with enter gdb gives:

Thread 1 "pcbnew" received signal SIGSEGV, Segmentation fault.
0x00007fffe08b8a79 in jump_fcontext () from /home/dinoghi/SANDBOXKICAD5/usr/bin/_pcbnew.kiface
(gdb) cont
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)

Revision history for this message
Jeff Young (jeyjey) wrote :

I don't get the segfault ending a circle with an <enter>, but it does start a new circle at the same point, which isn't right.

Let me fix that and see if your segfault also goes away. If, not, we should put it under a separate bug.

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision ef5c69167a493683c81d44cf752fc141dcf174de
https://git.launchpad.net/kicad/patch/?id=ef5c69167a493683c81d44cf752fc141dcf174de

Changed in kicad:
status: In Progress → Fix Committed
Revision history for this message
Dino Ghilardi (dino-ghilardi) wrote : Re: [Bug 1828826] Re: symbol editor: Assert on "enter" key

On 13/05/19 23:25, KiCad Janitor wrote:
> Fixed in revision ef5c69167a493683c81d44cf752fc141dcf174de
> https://git.launchpad.net/kicad/patch/?id=ef5c69167a493683c81d44cf752fc141dcf174de
>
> ** Changed in: kicad
> Status: In Progress => Fix Committed
>

Testing commit ef5c69167a493683c81d44cf752fc141dcf174de: works for me too.

Also the segfault on pcbnew when ending drawing operations with enter is
working for me now.

Now I have a new assert launching pcbnew "Assert failure" failed in
UpdateHotKeys(): Duplicate hotkey definitions for <unknown>:
pcbnew.Control.switchUnits and common.Control.toggleUnits", but I think
this is a new bug, not related to the "enter" assert.

Cheers,
Dino.

Revision history for this message
Dino Ghilardi (dino-ghilardi) wrote :

On 14/05/19 09:56, Dino Ghilardi wrote:
> On 13/05/19 23:25, KiCad Janitor wrote:
>> Fixed in revision ef5c69167a493683c81d44cf752fc141dcf174de
>> https://git.launchpad.net/kicad/patch/?id=ef5c69167a493683c81d44cf752fc141dcf174de
>>
>>
>> ** Changed in: kicad
>>         Status: In Progress => Fix Committed
>>
>
> Testing commit ef5c69167a493683c81d44cf752fc141dcf174de: works for me too.
>
> Also the segfault on pcbnew when ending drawing operations with enter is
> working for me now.
>
> Now I have a new assert launching pcbnew "Assert failure" failed in
> UpdateHotKeys(): Duplicate hotkey definitions for <unknown>:
> pcbnew.Control.switchUnits and common.Control.toggleUnits", but I think
> this is a new bug, not related to the "enter" assert.
>
> Cheers,
> Dino.

Also the key is used in pcbnew/tools/pcbnew_control.cpp

TOOL_ACTION PCB_ACTIONS::switchUnits( "pcbnew.Control.switchUnits",
         AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_SWITCH_UNITS ),
         "", "" );

and common/tool/actions.cpp
TOOL_ACTION ACTIONS::toggleUnits( "common.Control.toggleUnits",
+ AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_SWITCH_UNITS ),
+ _( "Switch units" ), _( "Switch between inches and millimeters"
...

so it is not possible to work it around changing the hotkey assignment.

Cheers,
Dino.

Revision history for this message
Jeff Young (jeyjey) wrote :

Yeah, the PCB_ACTION is no longer needed now that there's a COMMON equivalent. I'll remove the PCBNew one (and GerbView has a duplicate as well).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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