EEschema footprint selector crashes on listing contents of github library

Bug #1484331 reported by Jacek Radzikowski
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
High
Unassigned

Bug Description

Footprint selector in EEschema crashes on listing contents of a library hosted on github. Listing local library works fine. After crash eeschema prints to the console the following message:

terminate called after throwing an instance of 'std::logic_error'
  what(): basic_string::_S_construct null not valid
Aborted (core dumped)

OS: Fedora22
kicad package: kicad-6086-nightlies.fc22.x86_64 from mangelajo-kicad
wxGTK packages: wxGTK3-3.0.2-1003.fc22.x86_64, wxGTK-2.8.12-16.fc22.x86_64

Tags: pcbnew github

Related branches

Revision history for this message
Jacek Radzikowski (jacek-radzikowski) wrote :
Revision history for this message
Jacek Radzikowski (jacek-radzikowski) wrote :
Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

I've heard from at least one other person reporting this issue, usually from pcbnew, and usually on Fedora.

Changed in kicad:
importance: Undecided → High
tags: added: github pcbnew
Revision history for this message
Nick Østergaard (nickoe) wrote :
Revision history for this message
Kenzu (jlindeberg) wrote :
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Are you using an externally defined KIGITHUB environment variable. If so, what is the value of your KIGITHUB environment variable? I cannot duplicate this error on either windows or Debian testing. The only other thing I can think of is you internet connection is causing issues while attempting to connect to github.

Revision history for this message
Jacek Radzikowski (jacek-radzikowski) wrote :

$ echo $KIGITHUB
https://github.com/KiCad

Revision history for this message
Nick Østergaard (nickoe) wrote :

@Jacek, to check if it is a connectivity issue; please grab any other computer (preferably not fedora) and retest.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Even if it is a connectivity issue, KiCad shouldn't crash. From the stack traces, it looks as though there are some unhandled exceptions that are causing the crash.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

This bug may also be due using the multi-threaded footprint library loading. Do you have the capability or know someone who can build KiCad for you with the multi-threaded footprint library loading disabled? After taking another look at the stack trace, it could be this as well. If you or someone else can provide you with a Fedora package built with #define USE_WORKER_THREADS in the file common/footprint_info.cpp set to 0, would you please test it to see if this resolves the issue. I have also created a patch to catch any unhandled exceptions in GITHUB_PLUGIN::remote_get_zip() that we could test as well if disabling the multi-threaded footprint library loading does not resolve the issue. I know this doesn't necessarily solve your footprint loading problem but I would appreciate if you would help us resolve the crash issue on Fedora.

Revision history for this message
Jacek Radzikowski (jacek-radzikowski) wrote :

kicad package compiled with USE_WORKER_THREADS set to 0 and patch applied:
Listing github library throws the following error:

Errors were encountered loading footprints
IO_ERROR: An unexpected github exception "basic_string::_S_construct null not valid" occurred performing http GET command.
from /home/jacek/rpmbuild/BUILD/kicad-6081jrr/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 587

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1484331] Re: EEschema footprint selector crashes on listing contents of github library

On 8/17/2015 4:26 PM, Jacek Radzikowski wrote:
> kicad package compiled with USE_WORKER_THREADS set to 0 and patch applied:
> Listing github library throws the following error:
>
> Errors were encountered loading footprints
> IO_ERROR: An unexpected github exception "basic_string::_S_construct null not valid" occurred performing http GET command.
> from /home/jacek/rpmbuild/BUILD/kicad-6081jrr/pcbnew/github/github_plugin.cpp : remote_get_zip() : line 587
>

Thanks. Did you get a chance to test the patch and see if it at least
prevents a crash.

Revision history for this message
Jacek Radzikowski (jacek-radzikowski) wrote :

The rpm was built with your patch applied. Instead of crashing footprint selector showed window with the above message.

Revision history for this message
Jacek Radzikowski (jacek-radzikowski) wrote :

The crash is F22 specific. Stock kicad-6081 works fine on F21 installed in VM from Live image.
@stambaughw if you need more information you can find me on freenode ( piranha32, session on screen, but not always on #kicad).

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

At least this fixes the crash which is a good thing. I know that doesn't help you. I'm wondering if it's a bug in glibc on F22 or some compiler abi version mismatch between glibc and kicad causing the problem. I'm not a Fedora user so I'm at a loss to help you.

Revision history for this message
Jacek Radzikowski (jacek-radzikowski) wrote :

The problem may be related to the build process (and possibly use of boost downloaded by kicad makefile). I compiled kicad manually from sources of kicad-6081 using boost from the system, and the browser works fine. Compilation using boost downloaded by makefile never finished successfully.

Script I used to run cmake attached. Cmake invocation is based on setup process from rpm SPEC. The main difference is addition of -DKICAD_SKIP_BOOST=ON

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Good catch! If F22 has boost version 1.57 or greater you really should be building kicad with the -DKICAD_SKIP_BOOST=ON option defined during the cmake configuration. Now the question remains whether or not my patch makes any sense given this information. It may be that with the correct boost libraries, an exception raised by boost would not cause this to crash. I guess this bug report can be marked as invalid since it was caused by an invalid build.

Revision history for this message
Jacek Radzikowski (jacek-radzikowski) wrote :

The patch does not solve the problem, but adds additional layer of error handling, so it makes sense. IMHO the only thing which has to be changed in order to solve the issue is the SPEC file for binary package for F22.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Fix committed in r6120 of the product branch for the crash part of this bug report. Marking as fix committed since the actual bug was due to a boost configuration build issues.

Changed in kicad:
status: New → Fix Committed
Revision history for this message
Jacek Radzikowski (jacek-radzikowski) wrote :

Kicad package updated to kicad-6125-nightlies does not crash anymore, but still does not list library contents properly. I tried to reproduce the behavior with hand compiled binaries, but they works fine. RPM version (from repo, and rebuilt from SRPM) is still not usable, and I ran out of ideas. What would be a good place to get in touch with package maintainer?

Revision history for this message
Nick Østergaard (nickoe) wrote :

Write to him directly, you can click on Ajo's name on the right and send a message to him.

Revision history for this message
Jacek Radzikowski (jacek-radzikowski) wrote :

I sent him a message. Thanks.

Jon Neal (reportingsjr)
Changed in kicad:
status: Fix Committed → Fix Released
Revision history for this message
Patrick Laurin (plaurin) wrote :

Hi, I am having the same issue on this version of Kicad:

Installed Packages
Name : kicad
Arch : x86_64
Epoch : 0
Version : 6281
Release : nightlies.fc22
Size : 1.0 G
Repo : @System
From repo : mangelajo-kicad

Here's a gist of the bug when I try to run CvPcb ro associate components and footprints:

https://gist.github.com/mosieurlaurin/2a4214225e574b5a82f6

And then I get this:

https://gist.github.com/mosieurlaurin/834073d351f692affa1b

Revision history for this message
Patrick Laurin (plaurin) wrote :

Update: I just did a fedup from Fedora 22 to Fedora 23 beta.

Kicad actually downgraded to rev. 6041 while doing so, and issue is gone now.

Revision history for this message
Jacek Radzikowski (jacek-radzikowski) wrote :

Rev 6284 installed on FC22 from kicad-6284-nightlies.fc22.x86_64.rpm still does not list github libraries properly.

Revision history for this message
Nick Østergaard (nickoe) wrote :

What do you really mean with "does not list github libraries properly"? But anyway, please open a new bug report and maybe refer this bug as a reference, since this bug is fixed (does not crash anymore).

Revision history for this message
Sherif Eid (sherif-eid) wrote :

Hi there, I still this bug on the nightly build 6347. I just installed kicad on fedora 22 through mangelajo/kicad repo

Revision history for this message
Sherif Eid (sherif-eid) wrote :

just realized that I didn't post the error message, here is it

Revision history for this message
Nick Østergaard (nickoe) wrote :

@Sherif Eifl, the error you describe there is not related ot this bug which describes a crash.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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