eeschema and symbol editor: "assert" on dragging a control point of line/polyline/circle/arc outside the visible window

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

Bug Description

Tested on commit 92ccb766ab197157bba3c545cc721e7f20e46d2e.

If you drag a rectangle vertex in order to change its size, after some time an "assert" is issued.

How to reproduce:

-Create a new symbol
-Insert a rectangle
-Select the rectancle and drag one vertex.
-After some drawing with a "flashing" rectangle you get:

"An assertion failed"
...kicad/common/gal/opengl/gpu_manager.cpp(119): assert "m_isDrawing" failed in DrawIndices().

and in backtrace box, under the "Function prototype" you get:
make_fcontext

Then the assert window, clicking on "continue" is shown some more time.

P.S.: Dragging a circles cotrol point seems to work correctly.

Cheers,
Dino Ghilardi.

---------------------------------
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
Revision history for this message
Dino Ghilardi (dino-ghilardi) wrote :

Probably related also to Bug #1828791 reported by eelik.

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

I don't think this is the same bug. I've seen it a few times too, but it needs a GAL expert to look at it.

Reliable steps to reproduce would be a huge benefit, although it may not be deterministic.

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

Same behaviour using polylines ("Add lines and polygons to symbol body" tool).

To reproduce it:

-add a polyline
-select it and drag a point
-continue dragging the point around until the "assert".

Tested on commit 2aea26de1e38eadf868fead7e89d92913885fbe3

Dragging the control point of an arc does not show this assert (but another strange behaviour: it moves the little squares that should be the start and the end point of the arc, but the arc is not redrawn/changed), but this seems a bug unrelated to this one).

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

Also dragging faster the control points triggers the assert faster, but I do not understand if the behaviour depends on the number of the mouse events or on its frequency (as when you have two threads "colliding" without a semaphore or a mutex for shared data access)

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

Also in eeschema, dragging a point of a line or poly-line (created using "place graphic lines or polygons" i got 50 asserts ...then clicked on "continue")

To reproduce:
-drag a vertex of a graphic line. After some movements the assert.

Tested on commit 2aea26de1e38eadf868fead7e89d92913885fbe3

Changed in kicad:
milestone: none → 6.0.0-rc1
Revision history for this message
Dino Ghilardi (dino-ghilardi) wrote :

Update: Found the deterministic behaviour for eeschema and symbol editor. dragging the vertex outside the screen causes the assert: seems related to the request for a window scroll while dragging a point.

Verified dragging control point of
-segments (lines an polylines, eeschema and symbol editor)
-rectangle (symbol editor)
-circle (symbol editor)
-arc (that also has another bug on dragging) (symbol editor).

eepcb seems not affected.

Tested on commit d701637eab3daf314a301516b77555c03243e102

Cheers,
Dino.

summary: - symbol editor: "assert" on dragging a rectangle vertex
+ symbol editor: "assert" on dragging a control point of
+ line/polyline/circle/arc outside the visible window
summary: - symbol editor: "assert" on dragging a control point of
+ eeschema and symbol editor: "assert" on dragging a control point of
line/polyline/circle/arc outside the visible window
Jon Evans (craftyjon)
Changed in kicad:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Jon Evans (craftyjon) wrote :

Hi Jeff,
I think the problem is that you call VIEW::Redraw() inside the tool event loop (ee_point_editor.cpp:311)
This should not be necessary because it will be called by the repaint handler, and I think having it also run from the tool coroutine is causing some issues. If I comment out this call, everything works fine and no more asserts.
-Jon

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

Thanks, Jon. I'll test it out on OSX and merge it if all looks OK.

Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
status: Confirmed → In Progress
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: In Progress → Fix Committed
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.