Eeschema crash filtering in Choose Symbol dialog

Bug #1825170 reported by Hildo Guillardi Júnior
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KiCad
Expired
Undecided
Unassigned

Bug Description

Eeschema crash searching symbol at "Choose Symbol" dialog.

Application: pcbnew
Version: 5.1.0-unknown-ead5bfe~82~ubuntu16.04.1, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.4.0-145-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_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

Tags: eeschema
Revision history for this message
Jeff Young (jeyjey) wrote :

@Hildo, is this reproducible for you? Are there any specific steps? (It's not crashing for me....)

Changed in kicad:
status: New → Incomplete
Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Yes, totally. Just type and it crash.
Even after I update to today's Nightly (201904212302+223e24f~82~ubuntu16.04.1). I am using in two computer with same operational system (Ubuntu) but, this behavior is just in one of them (as far I now).

I can provide some traceback/bug if you guide me.

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

You may try to start out with a simple gdb sessions.

1. gdb eeschema
2. run
3. <make it crash>
4. bt

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

@all, follow log:

Thread 1 "eeschema" received signal SIGSEGV, Segmentation fault.
0x00007fffd93b98d1 in ?? () from /usr/bin/_eeschema.kiface

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :
Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :
Download full text (3.3 KiB)

I am attaching this new log because the same bug appear to be cause by a different segment fault (before in _eeschema.kiface, in this on libthread_db.so.1).

Starting program: /usr/bin/eeschema
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeace1700 (LWP 17928)]
[New Thread 0x7fffea4e0700 (LWP 17929)]
[New Thread 0x7fffe9cdf700 (LWP 17930)]
[New Thread 0x7fffd1c26700 (LWP 17947)]
[New Thread 0x7fffd1425700 (LWP 17948)]
[Thread 0x7fffd1c26700 (LWP 17947) exited]
[New Thread 0x7fffd1c26700 (LWP 17954)]
[New Thread 0x7fffc9f7e700 (LWP 17955)]
[New Thread 0x7fffc977d700 (LWP 17956)]
[Thread 0x7fffc9f7e700 (LWP 17955) exited]
[New Thread 0x7fffc8f7c700 (LWP 17957)]
[Thread 0x7fffc977d700 (LWP 17956) exited]
[Thread 0x7fffc8f7c700 (LWP 17957) exited]
[Thread 0x7fffd1c26700 (LWP 17954) exited]
[New Thread 0x7fffc8f7c700 (LWP 17958)]
[New Thread 0x7fffc977d700 (LWP 17959)]
[New Thread 0x7fffc9f7e700 (LWP 17960)]
[New Thread 0x7fffd1c26700 (LWP 17961)]
[Thread 0x7fffd1c26700 (LWP 17961) exited]
[Thread 0x7fffc9f7e700 (LWP 17960) exited]
[Thread 0x7fffc977d700 (LWP 17959) exited]
[Thread 0x7fffc8f7c700 (LWP 17958) exited]
[New Thread 0x7fffd1c26700 (LWP 17963)]
[New Thread 0x7fffc9f7e700 (LWP 17964)]
[New Thread 0x7fffc977d700 (LWP 17965)]
[New Thread 0x7fffc8f7c700 (LWP 17966)]
[New Thread 0x7fffac022700 (LWP 17967)]
[New Thread 0x7fffab821700 (LWP 17968)]
[New Thread 0x7fffab020700 (LWP 17969)]
[Thread 0x7fffc8f7c700 (LWP 17966) exited]
[Thread 0x7fffc977d700 (LWP 17965) exited]
[Thread 0x7fffc9f7e700 (LWP 17964) exited]
[Thread 0x7fffab821700 (LWP 17968) exited]
[Thread 0x7fffab020700 (LWP 17969) exited]
[Thread 0x7fffac022700 (LWP 17967) exited]
[New Thread 0x7fffab020700 (LWP 17971)]
[New Thread 0x7fffab821700 (LWP 17972)]
[New Thread 0x7fffac022700 (LWP 17973)]
[New Thread 0x7fffc8f7c700 (LWP 17974)]
[New Thread 0x7fffc9f7e700 (LWP 17975)]
[Thread 0x7fffc8f7c700 (LWP 17974) exited]
[Thread 0x7fffab821700 (LWP 17972) exited]
[Thread 0x7fffab020700 (LWP 17971) exited]
[Thread 0x7fffc9f7e700 (LWP 17975) exited]
[Thread 0x7fffac022700 (LWP 17973) exited]

Thread 1 "eeschema" received signal SIGSEGV, Segmentation fault.
0x00007ffff51c7510 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
(gdb) bt
#0 0x00007ffff51c7510 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#1 0x00007ffff5277254 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#2 0x00007ffff527deda in gtk_tree_view_row_expanded ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#3 0x00007fffed58a9b3 in ?? ()
   from /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libgail.so
#4 0x00007fffed58aad8 in ?? ()
   from /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libgail.so
#5 0x00007fffed58aad8 in ?? ()
   from /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libgail.so
#6 0x00007fffed58aad8 in ?? ()
   from /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libgail.so
#7 0x00007fffed58aad8 in ?? ()
   from /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libgail.so
#8 0x00007fffed58aad8 in ?? ()
   from /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libgail.so
#9 0x00007fffed58aad8 in ?? (...

Read more...

Revision history for this message
Jeff Young (jeyjey) wrote :

Sadly the logs don't contain much of use.

Can someone else try this on GTK? Is it GTK-specific, or is it another case of the wxString multi-threading crash which is setup-specific?

summary: - Eeschema crash searching symbol
+ Eeschema crash filtering in Choose Symbol dialog
Changed in kicad:
status: Incomplete → New
Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

The duplicate has a more descriptive stack trace: https://bugs.launchpad.net/kicad/+bug/1826613

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Just to some useful information:

In last version 6.0.0-unknown-2e8d930~86~ubuntu16.04.1 (but I release some days ago). This but is but reproducible if I start the search by a alphabetical character. I want to mean that if I start with a number, it works just fine without the bug.

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

I cannot reproduce this with gtk2 or gtk3 builds on my Debian testing system so I am at a loss unless someone else can duplicate this. It may have something to do with the Unity desktop since the reporter's system is Ubuntu 16.04. Anyone else out there using Ubuntu 16.04 that can confirm this?

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Could it be. For example lp:1797680 from lp:779854 implementation never worked at Ubuntu 16.04 Unity but, one I tested in a Gnome desktop installed at Ubuntu 16.04 and worked.

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Correction lp:1797680 from lp:1779854

Revision history for this message
jean-pierre charras (jp-charras) wrote :

On my Ubuntu 16.04 LTS with Unity, I cannot reproduce this crash.

@Hildo,
Can you build Kicad in Debug mode (the release mode is useless with gdb), and see if the trace shown by gdb shows a reference to a kicad source code?

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Yes I can. But I will need some help / instructions (the git link to clone and commands to run to compile).
My experience with gcc / make / compilers are just for embedded systems.

Revision history for this message
Jon Evans (craftyjon) wrote :

Docs server is giving me 504 error right now so here are basic build instructions

git clone https://git.launchpad.net/kicad
cd kicad
mkdir -p build/debug
cd build/debug
cmake -DCMAKE_BUILD_TYPE=Debug ../..
make
sudo make install

If you are missing dependencies, cmake will tell you.
On ubuntu one way to get the dependencies is to uncomment the "deb-src" line in the PPA file in /etc/apt/sources/list.d/js-reynaud<whatever> assuming you use the PPA, and then do:

apt update
apt build-dep kicad

(this will take a while and a fair amount of disk space because it installs all the dependencies not only for building kicad itself, but also building the documentation)

Feel free to email me if you get stuck, I can try to help

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Will the `sudo make install` overwrite my current installation? How to reverse at the end?

Revision history for this message
Jon Evans (craftyjon) wrote :

by default it will install to /usr/local instead of /usr like the PPA.
If you want to install it somewhere specific, you can add -DCMAKE_INSTALL_PREFIX=/whatever to the cmake command line. If you specify a prefix somewhere in your home directory, you should not even need the sudo to run make install.
Keep in mind if you make a prefix that is not in your PATH, you will have to manually run kicad by the full path, like /home/username/whatever/bin/kicad

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Running `make` from 'build/debug' I had "make: *** No targets specified and no makefile found. Stop."

Revision history for this message
Jon Evans (craftyjon) wrote :

did the cmake command succeed? If cmake fails it will not generate the makefile.

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Error of `cmake`:

CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find GLEW (missing: GLEW_INCLUDE_DIR GLEW_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  CMakeModules/FindGLEW.cmake:38 (find_package_handle_standard_args)
  CMakeLists.txt:557 (find_package)

Revision history for this message
Jon Evans (craftyjon) wrote :

Looks like you are missing GLEW library dependency. I think this command should get you most of the requirements:

sudo apt-get -y install libwxgtk3.0-0v5 libglew-dev libcairo2-dev libbz2-dev doxygen libssl-dev libboost-dev libboost-thread-dev libboost-context-dev libboost-filesystem-dev libboost-iostreams-dev libboost-locale-dev libboost-program-options-dev libboost-all-dev swig python-wxgtk3.0* git cmake libwxgtk3.0 libglm-dev libcurl3 libcurl3-dev python-dev

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

I could use this information to create a "how to start developing using KiCad code".

Other missing, that I installed: ngspice

Now:

CMake Error at CMakeLists.txt:613 (find_package):
  By not providing "FindOCE.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OCE", but
  CMake did not find one.

  Could not find a package configuration file provided by "OCE" (requested
  version 0.16) with any of the following names:

    OCEConfig.cmake
    oce-config.cmake

  Add the installation prefix of "OCE" to CMAKE_PREFIX_PATH or set "OCE_DIR"
  to a directory containing one of the above files. If "OCE" provides a
  separate development package or SDK, be sure it has been installed.

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

If you are using JS Reynaud's PPA I don't think you need to build from source. There are debug symbols available for nightly builds. See https://code.launchpad.net/~js-reynaud/+archive/ubuntu/ppa-kicad/+packages?batch=75&direction=backwards&memo=75.

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Yes. I am using (yesterday compilation) Nigthly at Ubuntu 16.04 from PPA.
So, I just need to change some configuration?

Revision history for this message
Jon Evans (craftyjon) wrote :

I think for OCE you need:

sudo apt-get -y install liboce-foundation-dev liboce-modeling-dev liboce-ocaf-lite-dev liboce-ocaf-dev liboce-visualization-dev

(taking this from the PPA build dependencies here: https://git.launchpad.net/~js-reynaud/+git/kicad-daily-pkg/tree/debian/control?id=master )

Revision history for this message
Jon Evans (craftyjon) wrote :

Ah, I didn't know that Wayne.
Hildo -- you can try `apt-get install kicad-dbg` and re-run kicad

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Thanks Jons, more simple and keep ENVIROMENT mine that reproduce the bug.

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :
Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :
Revision history for this message
Jeff Young (jeyjey) wrote :

@Hildo, do you need the footprint previews? They're causing the crashes. (You can turn them off in Preferences / Eeschema / Show footprint previews in symbol chooser.)

Revision history for this message
Jeff Young (jeyjey) wrote :

@JP, were you running on a French system when you tried to reproduce it? The reason I ask is https://bugs.launchpad.net/kicad/+bug/1676047.

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Thanks @Jeff, I really like the footprint previews. And I am experience not more crash by the search, was there some changes in this portion of the code? (I am using the last Ubuntu 16.04 Nightly, always updated).

Revision history for this message
Jeff Young (jeyjey) wrote :

@Hildo, there were no changes that I'm aware of. However, the crash is due to memory corruption, so changes elsewhere can render the corruption benign. I suspect, though, that the bug will come back at some point.

I'm going to mark it "incomplete" so it will time-out in 60 days if it isn't reported again.

Changed in kicad:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for KiCad because there has been no activity for 60 days.]

Changed in kicad:
status: Incomplete → Expired
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.