Oops, also got a segfault when hitting the "Reload button" on a github library. Here's the backtrace:
#0 0x00007fffd69a1ccc in std::vector<std::unique_ptr<FOOTPRINT_INFO, std::default_delete<FOOTPRINT_INFO> >, std::allocator<std::unique_ptr<FOOTPRINT_INFO, std::default_delete<FOOTPRINT_INFO> > > >::size (this=0x10) at /usr/include/c++/6/bits/stl_vector.h:656 #1 0x00007fffd69c0a90 in FOOTPRINT_LIST::GetCount (this=0x0) at /home/seth/code/kicad/kicad-launchpad/include/footprint_info.h:199 #2 0x00007fffd6e4bac9 in FOOTPRINT_FILTER::end (this=0x555559140bf8) at /home/seth/code/kicad/kicad-launchpad/common/footprint_filter.cpp:231 #3 0x00007fffd6753475 in FOOTPRINT_VIEWER_FRAME::FilterLibs (this=0x55555913e640) at /home/seth/code/kicad/kicad-launchpad/pcbnew/modview_frame.cpp:428 #4 0x00007fffd6752f71 in FOOTPRINT_VIEWER_FRAME::OnFilterUpdated (this=0x55555913e640, event=...) at /home/seth/code/kicad/kicad-launchpad/pcbnew/modview_frame.cpp:365 #5 0x00007ffff634440e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #6 0x00007ffff64c9ea5 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #7 0x00007ffff64c9f9b in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #8 0x00007ffff64ca34b in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #9 0x00007fffd6deffb7 in EDA_BASE_FRAME::ProcessEvent (this=0x55555913e640, aEvent=...) at /home/seth/code/kicad/kicad-launchpad/common/basicframe.cpp:187 #10 0x00007ffff64ca153 in wxEvtHandler::DoTryChain(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #11 0x00007ffff64ca435 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #12 0x00007ffff6e562f8 in wxWindowBase::TryAfter(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0 #13 0x00007ffff6e562f8 in wxWindowBase::TryAfter(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0 #14 0x00007ffff6ed0740 in ?? () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0 #15 0x00007ffff634440e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #16 0x00007ffff64c9ea5 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #17 0x00007ffff64c9f9b in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #18 0x00007ffff64ca34b in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #19 0x00007ffff64ca3d3 in wxEvtHandler::ProcessEventLocally(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #20 0x00007ffff64ca435 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #21 0x00007ffff64ca1a7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #22 0x00007ffff6e4277f in wxTextEntryBase::SendTextUpdatedEvent(wxWindow*) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0 #23 0x00007ffff6d0a69c in wxTextEntry::DoSetValue(wxString const&, int) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0 #24 0x00007ffff6d08a6c in wxTextCtrl::DoSetValue(wxString const&, int) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0 #25 0x00007ffff6ecc04a in wxSearchCtrl::Clear() () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0 #26 0x00007fffd6752e21 in FOOTPRINT_VIEWER_FRAME::ClearFilter (this=0x55555913e640) at /home/seth/code/kicad/kicad-launchpad/pcbnew/modview_frame.cpp:350 #27 0x00007fffd67537c2 in FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList (this=0x55555913e640) at /home/seth/code/kicad/kicad-launchpad/pcbnew/modview_frame.cpp:482 #28 0x00007fffd6759eae in FOOTPRINT_VIEWER_FRAME::ReloadAllLibraries (this=0x55555913e640, event=...) at /home/seth/code/kicad/kicad-launchpad/pcbnew/./modview_frame.h:166 #29 0x00007ffff634440e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #30 0x00007ffff64c9ea5 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #31 0x00007ffff64c9f9b in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #32 0x00007ffff64ca34b in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #33 0x00007fffd6deffb7 in EDA_BASE_FRAME::ProcessEvent (this=0x55555913e640, aEvent=...) at /home/seth/code/kicad/kicad-launchpad/common/basicframe.cpp:187 #34 0x00007ffff64ca153 in wxEvtHandler::DoTryChain(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #35 0x00007ffff64ca435 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #36 0x00007ffff6e562f8 in wxWindowBase::TryAfter(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0 #37 0x00007ffff7989878 in wxAuiToolBar::OnLeftUp(wxMouseEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0 #38 0x00007ffff634440e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #39 0x00007ffff64c9ea5 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #40 0x00007ffff64c9f9b in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #41 0x00007ffff64ca34b in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #42 0x00007ffff64ca3d3 in wxEvtHandler::ProcessEventLocally(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #43 0x00007ffff64ca435 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 #44 0x00007ffff64ca1a7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 -S On Thu, Nov 16, 2017 at 9:37 AM, Seth Hillbrand <seth.hillbr...@gmail.com> wrote: > Hi Oliver- > > I tried the new patchset but I can't seem to get it to work. It only > loads the local libraries (none of the Github libraries). > > I get the error: > Error: IO_ERROR: Footprint library path 'https:/github.com/KiCad/ > Connectors_JST.pretty' does not exist > > -S > > On Thu, Nov 16, 2017 at 5:23 AM, Oliver Walters < > oliver.henry.walt...@gmail.com> wrote: > >> Important! Patch 0008 (attached) fixes a nullpointer error. >> >> BUT more importantly, it also reintroduces the ability to filter out >> libraries using the ':' separator! >> >> Now we are getting somewhere! >> >> On Thu, Nov 16, 2017 at 11:38 PM, Oliver Walters < >> oliver.henry.walt...@gmail.com> wrote: >> >>> Wayne, >>> >>> I have finally found some time to readdress this. >>> >>> I have reimplemented the filtering using the existing FOOTPRINT_FILTER >>> class. I have also reverted behaviour to work only on the currently >>> selected footprint library. This removes the requirement to load all the >>> libraries when the dialog opens. >>> >>> I think all requirements are satisfied now. Please find modified patch >>> set attached. >>> >>> Regards, >>> Oliver >>> >>> On Wed, Nov 1, 2017 at 11:21 AM, Wayne Stambaugh <stambau...@gmail.com> >>> wrote: >>> >>>> On 10/31/2017 5:01 PM, Oliver Walters wrote: >>>> > How should I proceed here then? >>>> > >>>> > I would like to see the various libraries being "cached" in the >>>> > background, but this is increasing the scope of the work by a large >>>> factor. >>>> > >>>> > One thing I have noticed: >>>> > >>>> > In eeschema when you launch the component viewer, it (on first run) >>>> maps >>>> > and caches all the footprint libraries. This can take AGES (especially >>>> > on Windows). However on subsequent launches of the component viewer it >>>> > appears instantly. It appears to be keeping a static map of the >>>> > footprint library data. >>>> > >>>> > a) Would this be an acceptable approach for the footprint viewer >>>> window >>>> >>>> Sure. Code reuse is a good thing. I'm pretty sure the threaded >>>> footprint library code is split out from the component chooser so it >>>> should be reusable. >>>> >>>> > b) What happens when the library data changes externally? Does >>>> component >>>> > viewer need to be reloaded? >>>> >>>> No, only the library that changed gets reloaded the next time it's >>>> accessed. It is not automatic. I thought about using wxFileWatcher but >>>> that could be a lot of overhead for little net gain. See the pcb plugin >>>> cache() functions. >>>> >>>> > c) Can we globally perform this caching in a background thread when >>>> > KiCad launches? This will hide the large pauses (up to a minute under >>>> > Windows) from the user... >>>> >>>> Yes, this should be done as a project element so that it can be accessed >>>> from all of the main windows. Please keep in mind, this could be a lot >>>> of work and given that we are nearing a stable 5 release feature freeze, >>>> so if it's not by then it will not make it into the stable 5 release. >>>> >>>> > >>>> > Oliver >>>> > >>>> > On Tue, Oct 31, 2017 at 11:32 PM, Wayne Stambaugh < >>>> stambau...@gmail.com >>>> > <mailto:stambau...@gmail.com>> wrote: >>>> > >>>> > On 10/31/2017 1:25 AM, Oliver Walters wrote: >>>> > > Hmm, I had thought that there was a way to load only the >>>> *names* of >>>> > > footprints, rather than individually parsing each footprint >>>> file. It >>>> > > appears that this is not the case. Any suggestions on how the >>>> speed >>>> > > could be improved? Currently I'm reading out all the footprint >>>> names in >>>> > > each footprint library and only storing the names (wxString) >>>> rather than >>>> > > the MODULE* objects. However, I still have to parse the entire >>>> library >>>> > > on load. >>>> > > >>>> > > Ideally, I think it would be good to just read in the names, >>>> and then >>>> > > load and display individual MODULE objects on demand.. Is this >>>> possible? >>>> > >>>> > This is possible (although not implemented) for library types >>>> (kicad, >>>> > geda) that use one file per footprint. You could just read the >>>> file >>>> > names from the folder and load the files as required. If you >>>> want to >>>> > search any other properties of the footprint, then you will have >>>> to load >>>> > all of the footprints anyway. I don't know if this would be >>>> worth the >>>> > effort. >>>> > >>>> > For library types that contain multiple footprints per file >>>> (legacy, >>>> > Eagle), this wouldn't make much sense. Parsing the entire file >>>> just to >>>> > pick out the footprint names probably isn't going to save you >>>> very much >>>> > time. >>>> > >>>> > > >>>> > > On Tue, Oct 31, 2017 at 10:40 AM, Wayne Stambaugh < >>>> stambau...@gmail.com <mailto:stambau...@gmail.com> >>>> > > <mailto:stambau...@gmail.com <mailto:stambau...@gmail.com>>> >>>> wrote: >>>> > > >>>> > > On 10/30/2017 5:23 PM, Oliver Walters wrote: >>>> > > > Thanks for the suggestions on fixing the text. I have >>>> that sorted. >>>> > > > >>>> > > > I will look into different ways of caching footprint data >>>> so it is quicker. >>>> > > > >>>> > > > Wayne, I didn't know about FOOTPRINT_FILTER I will switch >>>> to using that >>>> > > > instead (and provide regex search). >>>> > > >>>> > > Thanks Oliver! >>>> > > >>>> > > > >>>> > > > On 31 Oct 2017 06:55, "Seth Hillbrand" < >>>> seth.hillbr...@gmail.com <mailto:seth.hillbr...@gmail.com> >>>> > <mailto:seth.hillbr...@gmail.com <mailto:seth.hillbr...@gmail.com >>>> >> >>>> > > > <mailto:seth.hillbr...@gmail.com <mailto: >>>> seth.hillbr...@gmail.com> >>>> > <mailto:seth.hillbr...@gmail.com >>>> > <mailto:seth.hillbr...@gmail.com>>>> wrote: >>>> > > > >>>> > > > On Mon, Oct 30, 2017 at 11:42 AM, Wayne Stambaugh >>>> > > > <stambau...@gmail.com <mailto:stambau...@gmail.com> >>>> > <mailto:stambau...@gmail.com <mailto:stambau...@gmail.com>> >>>> > > <mailto:stambau...@gmail.com <mailto:stambau...@gmail.com> >>>> > <mailto:stambau...@gmail.com <mailto:stambau...@gmail.com>> >>>> >>wrote: >>>> > > > >>>> > > > On 10/30/2017 1:16 PM, Seth Hillbrand wrote: >>>> > > > > Oliver, this is neat and very helpful. >>>> > > > > >>>> > > > > The greyed-out thing is a wx2.8 bug. You can >>>> work >>>> > > around it by setting >>>> > > > > the foreground color when updating the filter >>>> like >>>> > this: >>>> > > > > >>>> > > > > void FOOTPRINT_VIEWER_FRAME::OnFilterUpdated( >>>> > > wxCommandEvent& event ) >>>> > > > > { >>>> > > > > + // Workaround wx2.8 bug showing greyed >>>> color >>>> > > > > + if( m_searchBox->GetValue() != >>>> > > m_searchBox->GetDescriptiveText() ) >>>> > > > > + m_searchBox->SetForegroundColour( >>>> > > > > m_searchBox->GetDefaultAttributes().colFg ); >>>> > > > > + >>>> > > > > // Filter is non case sensitive >>>> > > > > wxString filter = >>>> > m_searchBox->GetValue().Lower(); >>>> > > > > >>>> > > > > The searchbox handles resetting it to grey on >>>> idle() >>>> > > when the text is empty. >>>> > > > >>>> > > > Don't you mean wx 3.0? CMake should not even >>>> > generate the >>>> > > build >>>> > > > configuration files without wx 3.0 or greater. >>>> > > > >>>> > > > >>>> > > > Hmm... This was an issue back in 2.8 that appears to >>>> be only >>>> > > partly >>>> > > > fixed. The workaround I suggest above is functional >>>> > but, for >>>> > > this, >>>> > > > we can also execute a cleaner fix by setting the >>>> descriptive >>>> > > text in >>>> > > > the declaration: >>>> > > > >>>> > > > @@ -67,9 +67,10 @@ void >>>> > FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() >>>> > > > KiBitmap( module_xpm >>>> ), >>>> > > > _( "Select footprint >>>> to >>>> > > browse" ) ); >>>> > > > >>>> > > > - m_searchBox = new wxSearchCtrl( >>>> m_mainToolBar, >>>> > > > ID_MODVIEW_SEARCH_TEXT ); >>>> > > > + m_searchBox = new wxSearchCtrl( >>>> m_mainToolBar, >>>> > > > ID_MODVIEW_SEARCH_TEXT, >>>> > > > + _( "Enter filter string" ) ); >>>> > > > m_searchBox->SetMinSize( wxSize( 250, 30 ) ); >>>> > > > - m_searchBox->SetDescriptiveText( _( "Enter >>>> filter >>>> > > string" ) ); >>>> > > > >>>> > > > >>>> > > > >>>> > > > _______________________________________________ >>>> > > > Mailing list: https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers> >>>> > > <https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers>> >>>> > > > <https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers> >>>> > > <https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers>>> >>>> > > > Post to : kicad-developers@lists.launchpad.net >>>> > <mailto:kicad-developers@lists.launchpad.net> >>>> > > <mailto:kicad-developers@lists.launchpad.net >>>> > <mailto:kicad-developers@lists.launchpad.net>> >>>> > > > <mailto:kicad-developers@lists.launchpad.net >>>> > <mailto:kicad-developers@lists.launchpad.net> >>>> > > <mailto:kicad-developers@lists.launchpad.net >>>> > <mailto:kicad-developers@lists.launchpad.net>>> >>>> > > > Unsubscribe : https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers> >>>> > > <https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers>> >>>> > > > <https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers> >>>> > > <https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers>>> >>>> > > > More help : https://help.launchpad.net/ListHelp >>>> > <https://help.launchpad.net/ListHelp> >>>> > > <https://help.launchpad.net/ListHelp >>>> > <https://help.launchpad.net/ListHelp>> >>>> > > > <https://help.launchpad.net/ListHelp >>>> > <https://help.launchpad.net/ListHelp> >>>> > > <https://help.launchpad.net/ListHelp >>>> > <https://help.launchpad.net/ListHelp>>> >>>> > > > >>>> > > > >>>> > > > >>>> > > > _______________________________________________ >>>> > > > Mailing list: https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers> >>>> > > <https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers>> >>>> > > > Post to : kicad-developers@lists.launchpad.net >>>> > <mailto:kicad-developers@lists.launchpad.net> >>>> > > <mailto:kicad-developers@lists.launchpad.net >>>> > <mailto:kicad-developers@lists.launchpad.net>> >>>> > > > Unsubscribe : https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers> >>>> > > <https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers>> >>>> > > > More help : https://help.launchpad.net/ListHelp >>>> > <https://help.launchpad.net/ListHelp> >>>> > > <https://help.launchpad.net/ListHelp >>>> > <https://help.launchpad.net/ListHelp>> >>>> > > > >>>> > > >>>> > > >>>> > > _______________________________________________ >>>> > > Mailing list: https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers> >>>> > > <https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers>> >>>> > > Post to : kicad-developers@lists.launchpad.net >>>> > <mailto:kicad-developers@lists.launchpad.net> >>>> > > <mailto:kicad-developers@lists.launchpad.net >>>> > <mailto:kicad-developers@lists.launchpad.net>> >>>> > > Unsubscribe : https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers> >>>> > > <https://launchpad.net/~kicad-developers >>>> > <https://launchpad.net/~kicad-developers>> >>>> > > More help : https://help.launchpad.net/ListHelp >>>> > <https://help.launchpad.net/ListHelp> >>>> > > <https://help.launchpad.net/ListHelp >>>> > <https://help.launchpad.net/ListHelp>> >>>> > > >>>> > > >>>> > >>>> > >>>> >>>> >>> >> >> _______________________________________________ >> Mailing list: https://launchpad.net/~kicad-developers >> Post to : kicad-developers@lists.launchpad.net >> Unsubscribe : https://launchpad.net/~kicad-developers >> More help : https://help.launchpad.net/ListHelp >> >> >
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp