"Assert failure" failed in DoInsert (lp:#1792201)

[Original report](https://bugs.launchpad.net/bugs/1792201) created by **Francisco Leite (xxleite)**
```
Application: pcbnew
Version: 6.0.0-rc1-unknown, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.4.0-75-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=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=OFF

build: https://jenkins.simonrichter.eu/job/linux-kicad-eeschema_gal-
head/10/

This is a96b7aa1d741247034b7717bf0a79aeaef132446 from Jeff's repo with
branch tom-eeschema-gal-aug27


Assert failure dialog appears after I try to edit a circle in a pcb in
pcbnew, when appending pcbs.

ASSERT INFO:
../src/common/sizer.cpp(1401): assert "Assert failure" failed in
DoInsert(): too many items (13 > 3*4) in grid sizer (maybe you should omit
the number of either rows or columns?)

BACKTRACE:
[1] wxGridSizer::DoInsert(unsigned long, wxSizerItem*)
[2] wxSizer::Add(wxSizerItem*)
[3] wxSizer::Add(wxWindow*, int, int, int, wxObject*)
[4] make_fcontext

... after I close the dialog the application closes, I manage to capture
this in gdb:

gdb pcbnew
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pcbnew...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/leite/install/bin/pcbnew
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
14:15:42: Debug: Checking template path
'/home/leite/install/share/kicad/template' exists
14:15:42: Debug: Checking template path '/usr/share/kicad/template' exists
14:15:43: Debug: Adding duplicate image handler for 'PNG file'
14:15:43: Debug: Adding duplicate image handler for 'JPEG file'
14:15:43: Debug: Adding duplicate image handler for 'TIFF file'
14:15:43: Debug: Adding duplicate image handler for 'GIF file'
14:15:43: Debug: Adding duplicate image handler for 'PNM file'
14:15:43: Debug: Adding duplicate image handler for 'PCX file'
14:15:43: Debug: Adding duplicate image handler for 'IFF file'
14:15:43: Debug: Adding duplicate image handler for 'Windows icon file'
14:15:43: Debug: Adding duplicate image handler for 'Windows cursor file'
14:15:43: Debug: Adding duplicate image handler for 'Windows animated
cursor file'
14:15:43: Debug: Adding duplicate image handler for 'TGA file'
14:15:43: Debug: Adding duplicate image handler for 'XPM file'
[New Thread 0x7fffe07e1700 (LWP 19810)]
[New Thread 0x7fffdffe0700 (LWP 19811)]
[New Thread 0x7fffdf7df700 (LWP 19812)]
[New Thread 0x7fffdefde700 (LWP 19813)]
[New Thread 0x7fffde7dd700 (LWP 19814)]
[New Thread 0x7fffddfdc700 (LWP 19815)]
[New Thread 0x7fffdd7db700 (LWP 19816)]
[New Thread 0x7fffdcfda700 (LWP 19823)]
[New Thread 0x7fffd7fff700 (LWP 19824)]
[New Thread 0x7fffd77fe700 (LWP 19825)]
[New Thread 0x7fffd6ffd700 (LWP 19826)]
[New Thread 0x7fffc7fff700 (LWP 19827)]
[New Thread 0x7fffc77fe700 (LWP 19828)]
[New Thread 0x7fffc6ffd700 (LWP 19829)]
[New Thread 0x7fffc67fc700 (LWP 19830)]
[Thread 0x7fffc6ffd700 (LWP 19829) exited]
[Thread 0x7fffc7fff700 (LWP 19827) exited]
[Thread 0x7fffc77fe700 (LWP 19828) exited]
[Thread 0x7fffd6ffd700 (LWP 19826) exited]
[Thread 0x7fffd77fe700 (LWP 19825) exited]
[New Thread 0x7fffc77fe700 (LWP 19887)]
[Thread 0x7fffc77fe700 (LWP 19887) exited]
[New Thread 0x7fffc77fe700 (LWP 19888)]
[Thread 0x7fffc67fc700 (LWP 19830) exited]
../src/common/sizer.cpp(1401): assert "Assert failure" failed in
DoInsert(): too many items (13 > 3*4) in grid sizer (maybe you should omit
the number of either rows or columns?)
[Thread 0x7fffc77fe700 (LWP 19888) exited]

Thread 1 "pcbnew" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff5e5e269 in raise (sig=5) at ../sysdeps/unix/sysv/linux/pt-
raise.c:35
35      ../sysdeps/unix/sysv/linux/pt-raise.c: No such file or directory.
(gdb)   backtrace
#0  0x00007ffff5e5e269 in raise (sig=5) at ../sysdeps/unix/sysv/linux/pt-
raise.c:35
#1  0x00007ffff7275990 in wxGUIAppTraits::ShowAssertDialog(wxString const&)
() from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#2  0x00007ffff696ea92 in ?? () from /usr/lib/x86_64-linux-
gnu/libwx_baseu-3.0.so.0
#3  0x00007ffff6972ab7 in wxAppConsoleBase::OnAssertFailure(wchar_t const*,
int, wchar_t const*, wchar_t const*, wchar_t const*) () from
/usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#4  0x00007ffff7233e50 in wxApp::OnAssertFailure(wchar_t const*, int,
wchar_t const*, wchar_t const*, wchar_t const*) () from
/usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#5  0x00007ffff6973182 in ?? () from /usr/lib/x86_64-linux-
gnu/libwx_baseu-3.0.so.0
#6  0x00007ffff696c202 in wxOnAssert(char const*, int, char const*, char
const*, wxString const&) () from /usr/lib/x86_64-linux-
gnu/libwx_baseu-3.0.so.0
#7  0x00007ffff743041a in wxGridSizer::DoInsert(unsigned long,
wxSizerItem*) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#8  0x00007fffebfdec9e in wxSizer::Add(wxSizerItem*) () from
/home/leite/install/bin/_pcbnew.kiface
#9  0x00007fffebfded05 in wxSizer::Add(wxWindow*, int, int, int, wxObject*)
() from /home/leite/install/bin/_pcbnew.kiface
#10 0x00007fffec07ee1a in
DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE(wxWindow*,
int, wxString const&, wxPoint const&, wxSize const&, long) ()
   from /home/leite/install/bin/_pcbnew.kiface
#11 0x00007fffec07b357 in
DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES(PCB_BASE_EDIT_FRAME*,
BOARD_ITEM*, wxDC*) () from /home/leite/install/bin/_pcbnew.kiface
#12 0x00007fffec07bbde in
PCB_BASE_EDIT_FRAME::InstallGraphicItemPropertiesDialog(BOARD_ITEM*, wxDC*)
() from /home/leite/install/bin/_pcbnew.kiface
#13 0x00007fffec29770e in PCB_EDIT_FRAME::OnEditItemRequest(wxDC*,
BOARD_ITEM*) () from /home/leite/install/bin/_pcbnew.kiface
#14 0x00007fffec34cceb in EDIT_TOOL::Properties(TOOL_EVENT const&) () from
/home/leite/install/bin/_pcbnew.kiface
#15 0x00007fffec3589b4 in int std::_Mem_fn_base<int
(EDIT_TOOL::*)(TOOL_EVENT const&), true>::operator()<TOOL_EVENT const&,
void>(EDIT_TOOL*, TOOL_EVENT const&) const ()
   from /home/leite/install/bin/_pcbnew.kiface
#16 0x00007fffec358710 in int std::_Bind<std::_Mem_fn<int
(EDIT_TOOL::*)(TOOL_EVENT const&)> (EDIT_TOOL*,
std::_Placeholder<1>)>::__call<int, TOOL_EVENT const&, 0ul,
1ul>(std::tuple<TOOL_EVENT const&>&&, std::_Index_tuple<0ul, 1ul>) () from
/home/leite/install/bin/_pcbnew.kiface
#17 0x00007fffec358158 in int std::_Bind<std::_Mem_fn<int
(EDIT_TOOL::*)(TOOL_EVENT const&)> (EDIT_TOOL*,
std::_Placeholder<1>)>::operator()<TOOL_EVENT const&, int>(TOOL_EVENT
const&) ()
   from /home/leite/install/bin/_pcbnew.kiface
#18 0x00007fffec357a8f in std::_Function_handler<int (TOOL_EVENT const&),
std::_Bind<std::_Mem_fn<int (EDIT_TOOL::*)(TOOL_EVENT const&)> (EDIT_TOOL*,
std::_Placeholder<1>)> >::_M_invoke(std::_Any_data const&, TOOL_EVENT
const&) () from /home/leite/install/bin/_pcbnew.kiface
#19 0x00007fffeca41321 in std::function<int (TOOL_EVENT
const&)>::operator()(TOOL_EVENT const&) const () from
/home/leite/install/bin/_pcbnew.kiface
#20 0x00007fffeca3e161 in COROUTINE<int, TOOL_EVENT
const&>::callerStub(long) () from /home/leite/install/bin/_pcbnew.kiface
#21 0x00007fffeca9d7a1 in make_fcontext () from
/home/leite/install/bin/_pcbnew.kiface
#22 0x0000000000000000 in ?? ()
(gdb) quit
```

Story points: 6.0