Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#52730 - [kicad] Segfault with system boost libraries with 4.0.5

Attached to Project: Community Packages
Opened by Kyle (2bluesc) - Friday, 27 January 2017, 10:10 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 04 May 2021, 06:14 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Kyle Keen (keenerd)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

When using the interactive trace router in pcbnew, dragging a trace interactively will cause a segmentation fault.


Additional info:
* kicad-4.0.4 and kicad-4.0.5-2, possibly earlier versions
* Tested on Arch Linux on my desktop and laptop
* boost-libs 1.63.0-1
* Same issue as Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841539


Steps to reproduce:
1. Launch /usr/bin/pcbnew
2. In a new pcb layout (or existing) draw a copper trace with a few segments
3. Go to Preferences -> Interactive Routing and change "Mouse drag behaviour" to "interactive drag"
4. Drag a segment of the copper trace, program will crash with segmentation fault.

I built the 4.0.5-2 release with Debug and have the following stack trace:
https://gist.github.com/e351fa3360eea1145bfb1d6f63237795#file-kicad-stack-trace-dump-txt


This seems like an upstream problem with kicad + boost. A workaround appears to be to use the included boost build version instead of the system libraries, to do that an additional patch is needed to fix another breakage. This patch comes from the upstream 4.0 branch and is assumed to be in 4.0.6.

The build script warns against using the system library with:

> WARNING: You decided to skip building boost library.
> KiCad developers strongly advise you to build the bundled boost library, as it is known to work with KiCad.
> Other versions may contain bugs that may result in KiCad errors.

I’ve built and tested a patch that works on my system:
https://gist.github.com/kylemanna/e351fa3360eea1145bfb1d6f63237795#file-0001-kicad-use-recommended-boost-library-over-system-libr-patch and also attached. It uses the cmake managed static build and includes a patch to fix the build with the github plugin.


Earlier discussion in Kicad forums:
* https://forum.kicad.info/t/interactive-drag-segfaults-debian-linux/4159
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Tuesday, 04 May 2021, 06:14 GMT
Reason for closing:  None
Additional comments about closing:  Assuming this has been fixed with all the updates went into our repos.
Comment by Kyle (2bluesc) - Friday, 27 January 2017, 19:49 GMT
My patch results in a kicad with the following version information:

Application: kicad
Version: 4.0.5 release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1010,GCC 6.3.1,wx containers,compatible with 2.8)
Platform: Linux 4.8.13-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.54.0
Curl version: libcurl/7.52.1 OpenSSL/1.0.2j zlib/1.2.11 libpsl/0.16.1 (+libicu/58.2) libssh2/1.8.0
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=ON
USE_FP_LIB_TABLE=HARD_CODED_ON
BUILD_GITHUB_PLUGIN=ON

And no longer has the trace drag bug.
Comment by Kyle Keen (keenerd) - Tuesday, 21 March 2017, 21:50 GMT
Is this still an issue on 4.0.6? The "interactive routing" is now disabled.
Comment by Kyle (2bluesc) - Wednesday, 22 March 2017, 13:37 GMT
This is still a problem on both my machines using vanilla Arch packages, kicad 4.0.6-1.


Application: kicad
Version: 4.0.6 release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1010,GCC 6.3.1,wx containers,compatible with 2.8)
Platform: Linux 4.10.3-1-ARCH x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.63.0
Curl version: libcurl/7.53.1 OpenSSL/1.0.2k zlib/1.2.11 libpsl/0.17.0 (+libicu/58.2) libssh2/1.8.0
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=ON
USE_FP_LIB_TABLE=HARD_CODED_ON
BUILD_GITHUB_PLUGIN=ON

Here's a short video showing it crashing when dragging the trace: https://youtu.be/iETcp1Z9pYQ
Comment by Kyle Keen (keenerd) - Wednesday, 22 March 2017, 14:20 GMT
I think you are missing what I am saying - to my knowledge and experience the option for interactive routing is not enabled in our package. Now I could just close this Not A Bug because of that, but I want to dig a little deeper. Why/how is it an option for you?
Comment by Kyle (2bluesc) - Wednesday, 22 March 2017, 14:33 GMT
Kyle,

I think you're missing what I'm saying and ignoring the additional evidence I took time to present in the video in an effort to help out.

You are the packager of the exact binary that I tested on two of my systems. Signature validated and all as `pacman -Qi kicad` shows this. Furthermore, `pacman -Qkk kicad` shows 345 files, no alter files. This is your verbatim build.

Turning off interactive routing (which is definitely not disabled) effectively cripples this package. It's comparable to turning off video support for web browser -- a core feature that almost everyone who uses such a tool everyday will need.

Furthermore, the package *explicitly* warns against system boost libraries (see original post) for the stable release because the stable release is behind the upstream boost libraries (the Kicad master branch seems fine, but I can't run master due to design file format changes). I'd rather have static boost libraries then a major feature missing. Using the boost library should be as simple as changing a cmake parameter.

Also, why is closing everything as "Not A Bug" such a standard goto with Arch maintainers? The users are here to help and many of them know what they are talking about and understand what it's like to be a maintainer and have to deal with issues. Spare me the "Not A Bug" threats and lets get this working.

Loading...