GerbView assertion when opening multiple files

Bug #1847743 reported by Mishka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
Undecided
Unassigned

Bug Description

Hi,

the recent GerbView throws me assertion when I try to open multiple files at once. The same assertion occurs when I'm reloading already opened files. Please note, I still can open several files, but one by one only.

The assertion (wxWidgets Debug Alert):

vagrant/build/wxwidgets-dest/include/wx-3.0/wx/strvararg.h(456): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type

Call stack:
[00] wxArgNormalizerWchar<unsigned long>::wxArgNormalizerWchar(unsigned long, wxFormatString const*, unsigned int)
[01] wxString wxString::Format<unsigned int, unsigned long, wxString>(wxFormatString const&, unsigned int, unsigned long, wxString)
[02] GERBVIEW_FRAME::loadListOfGerberAndDrillFiles(wxString const&, wxArrayString const&, std::__1::vector<int, std::__1::allocator<int> > const*)
[03] GERBVIEW_FRAME::LoadGerberFiles(wxString const&)
[04] GERBVIEW_FRAME::Files_io(wxCommandEvent&)
[05] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[06] wxEvtHandler::ProcessEvent(wxEvent&)
[07] EDA_BASE_FRAME::ProcessEvent(wxEvent&)
[08] wxEvtHandler::ProcessEventLocally(wxEvent&)
[09] wxEvtHandler::ProcessEvent(wxEvent&)
[10] wxWindowBase::TryAfter(wxEvent&)
[11] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[12] wxMenuBase::SendEvent(int, int)
[13] wxMenu::HandleCommandProcess(wxMenuItem*, wxWindow*)
[14] -[wxNSMenuItem clickedAction:]
[15] -[NSApplication(NSResponder) sendAction:to:from:]
[16] -[NSMenuItem _corePerformAction]
[17] -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]
[18] -[NSMenu performActionForItemAtIndex:]
[19] -[NSMenu _internalPerformActionForItemAtIndex:]
[20] -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:]
Do you want to stop the program?
You can also choose [Cancel] to suppress further warnings.

Pressing Cancel button results in GerbView not responding with intense CPU use (wait for 5 minutes before killing it).

Application: GerbView
Version: (5.99.0-216-gf0b29de6e), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    Build date: Oct 9 2019 04:52:13
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    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
    KICAD_STDLIB_DEBUG=OFF
    KICAD_STDLIB_LIGHT_DEBUG=OFF
    KICAD_SANITIZE=OFF

Tags: gerbview
Revision history for this message
David Pearce (halzia) wrote :

I corrected the title spelling from Grebview, so that a search might find it

summary: - GrebView assertion when opening multiple files
+ GerbView assertion when opening multiple files
Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

@Mishka, does this still occur on a recent nightly? Can you provide any example files if it is file specific?

Changed in kicad:
status: New → Incomplete
Revision history for this message
Mishka (mike-volokhov) wrote :

Hi, @Michael, yes, the assertion still happen on the recent gerbview. It's enough to open two arbitary gerbers. For the reference please take a look to screenshot and some gerbview diagnostics (the process hanged on CPU).

Application: GerbView
Version: (5.99.0-388-g93a17f929), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    Build date: Nov 17 2019 05:47:07
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    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
    KICAD_STDLIB_DEBUG=OFF
    KICAD_STDLIB_LIGHT_DEBUG=OFF
    KICAD_SANITIZE=OFF

Revision history for this message
Mishka (mike-volokhov) wrote :
Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

I can't recreate this.

Application: GerbView
Version: (5.99.0-416-gf7ded3040), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.64.1 SecureTransport (LibreSSL/2.8.3) zlib/1.2.11 nghttp2/1.39.2
Platform: Mac OS X (Darwin 19.0.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    Build date: Nov 24 2019 17:43:28
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.70.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 11.0.0 with C++ ABI 1002

Build settings:
    KICAD_SCRIPTING=OFF
    KICAD_SCRIPTING_MODULES=OFF
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=OFF
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON
    KICAD_STDLIB_DEBUG=OFF
    KICAD_STDLIB_LIGHT_DEBUG=OFF
    KICAD_SANITIZE=OFF

Revision history for this message
Mishka (mike-volokhov) wrote :

Hrm, I see you have newer macOS and clang...

Interesting, that the 5.1.4 works just fine for me too.

Revision history for this message
Seth Hillbrand (sethh) wrote :

John Beard fixed this in 44a6a61ff909d559c436bbfe8f4adfab9a082889

Changed in kicad:
milestone: none → 6.0.0-rc1
status: Incomplete → 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.